Service can't running after setting mysql

Mohd Syukri6 years ago

Hi,
I have problem when setting mysql, the service cannot runing.

INFO|3916/0|Service traccar|18-11-15 07:38:28|Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at java.lang.reflect.Constructor.newInstance(Unknown Source)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.Util.getInstance(Util.java:408)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:918)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:897)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:886)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2163)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2088)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:806)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at java.lang.reflect.Constructor.newInstance(Unknown Source)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:410)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:328)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:101)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:341)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:508)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	... 12 more
INFO|3916/0|Service traccar|18-11-15 07:38:28|Caused by: java.sql.SQLException: Access denied for user 'traccar'@'localhost' (using password: YES)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3970)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:873)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1710)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1226)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2253)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2104)
INFO|3916/0|Service traccar|18-11-15 07:38:28|	... 26 more
INFO|wrapper|Service traccar|18-11-15 07:38:28|calling onStop
INFO|wrapper|Service traccar|18-11-15 07:38:28|Win service stop - timeout: 30000
INFO|wrapper|Service traccar|18-11-15 07:38:28|Win service wrapper.control -> stopping application
INFO|wrapper|Service traccar|18-11-15 07:38:28|Win service stop - after shutdown
INFO|wrapper|Service traccar|18-11-15 07:38:28|Win service stop - before notify
INFO|wrapper|Service traccar|18-11-15 07:38:28|Win service terminated
<this my setting on traccar.xml>
<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <!--

    This is the main configuration file. All your configuration parameters should be placed in this file.

    Default configuration parameters are located in the "default.xml" file. You should not modify it to avoid issues
    with upgrading to a new version. Parameters in the main config file override values in the default file. Do not
    remove "config.default" parameter from this file unless you know what you are doing.

    For list of available parameters see following page: https://www.traccar.org/configuration-file/

    -->

    <entry key="config.default">./conf/default.xml</entry>

    <entry key='database.driver'>com.mysql.jdbc.Driver</entry> 
    <entry key='database.url'>jdbc:mysql://localhost:3306/traccar?useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>traccar</entry> 
    <entry key='database.password'>12345678</entry>

</properties>

I'm using Mysql 5.5 and Traccar 3.9 running on windows server 2008 r2

Please help.

Anton Tananaev6 years ago

The problem is pretty clear from the log:

Access denied for user 'traccar'@'localhost' (using password: YES)
Mohd Syukri6 years ago

this is after i setup new application

  1. Traccar 3.9
  2. MySql 8.0.13
  3. Connector /j 8.0.13

After setting this service same cannot running but have new error on warpper log

WARNING|wrapper|Service traccar|18-11-15 09:38:51|YAJSW: yajsw-beta-12.07
WARNING|wrapper|Service traccar|18-11-15 09:38:51|OS   : Windows Server 2008 R2/6.1/amd64
WARNING|wrapper|Service traccar|18-11-15 09:38:51|JVM  : Oracle Corporation/1.8.0_191/C:\Program Files\Java\jre1.8.0_191/64
INFO|wrapper|Service traccar|18-11-15 09:38:51|start delay: 0
INFO|wrapper|Service traccar|18-11-15 09:38:51|started process with pid 1396
INFO|1396/0|Service traccar|18-11-15 09:38:52|[INFO] StandardFileSystemManager - Using "C:\Windows\TEMP\vfs_cache" as temporary files store.
INFO|1396/0|Service traccar|18-11-15 09:38:53|java.lang.reflect.InvocationTargetException
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at java.lang.reflect.Method.invoke(Unknown Source)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)
INFO|1396/0|Service traccar|18-11-15 09:38:53|Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at java.net.URLClassLoader.findClass(Unknown Source)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at java.lang.ClassLoader.loadClass(Unknown Source)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at java.lang.ClassLoader.loadClass(Unknown Source)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at java.lang.Class.forName0(Native Method)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at java.lang.Class.forName(Unknown Source)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at org.traccar.database.DataManager.initDatabase(DataManager.java:95)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at org.traccar.database.DataManager.<init>(DataManager.java:67)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at org.traccar.Context.init(Context.java:176)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	at org.traccar.Main.main(Main.java:35)
INFO|1396/0|Service traccar|18-11-15 09:38:53|	... 6 more
INFO|wrapper|Service traccar|18-11-15 09:38:54|calling onStop
INFO|wrapper|Service traccar|18-11-15 09:38:54|Win service stop - timeout: 30000
INFO|wrapper|Service traccar|18-11-15 09:38:54|Win service wrapper.control -> stopping application
INFO|wrapper|Service traccar|18-11-15 09:38:54|Win service stop - after shutdown
INFO|wrapper|Service traccar|18-11-15 09:38:54|Win service stop - before notify
INFO|wrapper|Service traccar|18-11-15 09:38:54|Win service terminated
Anton Tananaev6 years ago

Traccar 3.9 doesn't support MySQL 8.x.

Mohd Syukri6 years ago

For 3.9 what better mysql server version?

I Have trying setup traccar 4.2, but not have 'bat' folder.

Anton Tananaev6 years ago

Why do you need "bat" folder?

Mohd Syukri6 years ago

In "bat" folder have installing service, stopservice, startservice command. When I install version 4.2, no service installed in server service list.

Anton Tananaev6 years ago

Service should be set up automatically by the installer. You can also install it this way:

java -jar tracker-server.jar --install conf/traccar.xml
Mohd Syukri6 years ago

Ok thank you very much

Mohd Syukri6 years ago

hi anton before that I already ask you what stable mysql version for traccar 3.9? can you help me?

Anton Tananaev6 years ago

Latest version before 8.x.