Connection Traccar 3,9 to database MS SQL

asnet8 years ago

Hi,
I have problem to connect my Traccar server to my localhost database ms sql.

My log from wrapper.log

WARNING|wrapper|Service traccar|17-01-14 20:31:15|YAJSW: yajsw-beta-12.07
WARNING|wrapper|Service traccar|17-01-14 20:31:15|OS   : Windows 7/6.1/amd64
WARNING|wrapper|Service traccar|17-01-14 20:31:15|JVM  : Oracle Corporation/1.8.0_111/C:\Program Files\Java\jre1.8.0_111/64
INFO|wrapper|Service traccar|17-01-14 20:31:15|start delay: 0
INFO|wrapper|Service traccar|17-01-14 20:31:16|started process with pid 2576
INFO|2576/0|Service traccar|17-01-14 20:31:20|[INFO] StandardFileSystemManager - Using "C:\Windows\TEMP\vfs_cache" as temporary files store.
INFO|2576/0|Service traccar|17-01-14 20:31:23|[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Started.
INFO|2576/0|Service traccar|17-01-14 20:31:54|java.lang.reflect.InvocationTargetException
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at java.lang.reflect.Method.invoke(Unknown Source)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)
INFO|2576/0|Service traccar|17-01-14 20:31:54|Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: The connection to the host GPS-KOMPUTER, named instance sqlexpress failed. Error: "java.net.SocketTimeoutException: Receive timed out". Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434.  For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:514)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:107)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:71)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at org.traccar.database.DataManager.initDatabase(DataManager.java:112)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at org.traccar.database.DataManager.<init>(DataManager.java:67)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at org.traccar.Context.init(Context.java:176)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at org.traccar.Main.main(Main.java:35)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	... 6 more
INFO|2576/0|Service traccar|17-01-14 20:31:54|Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the host GPS-KOMPUTER, named instance sqlexpress failed. Error: "java.net.SocketTimeoutException: Receive timed out". Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434.  For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:206)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.microsoft.sqlserver.jdbc.SQLServerConnection.getInstancePort(SQLServerConnection.java:5294)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.microsoft.sqlserver.jdbc.SQLServerConnection.primaryPermissionCheck(SQLServerConnection.java:1859)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1596)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1447)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:788)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1187)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:101)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:341)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:508)
INFO|2576/0|Service traccar|17-01-14 20:31:54|	... 12 more
INFO|wrapper|Service traccar|17-01-14 20:31:54|calling onStop
INFO|wrapper|Service traccar|17-01-14 20:31:54|Win service stop - timeout: 30000
INFO|wrapper|Service traccar|17-01-14 20:31:54|Win service wrapper.control -> stopping application
INFO|wrapper|Service traccar|17-01-14 20:31:54|Win service stop - after shutdown
INFO|wrapper|Service traccar|17-01-14 20:31:54|Win service stop - before notify
INFO|wrapper|Service traccar|17-01-14 20:31:54|Win service terminated

My configuration to database

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

    <entry key='database.driverFile'>C:\Program Files\Traccar\lib\mssql-jdbc-6.1.0.jre7.jar</entry>
    <entry key='database.driver'>com.microsoft.sqlserver.jdbc.SQLServerDriver</entry>
    <entry key='database.url'>jdbc:sqlserver://KOMPUTER\SQLEXPRESS;user=traccar;password=traccardatabase;databaseName=traccardatabase;</entry>
    <entry key='database.user'>traccar</entry>
    <entry key='database.password'>traccardatabase</entry>

</properties>

In h2 java database everything works ok

Please help me solve my problem

Anton Tananaev8 years ago

The issue is pretty clear and they even suggest how to diagnose it:

The connection to the host GPS-KOMPUTER, named instance sqlexpress failed. Error: "java.net.SocketTimeoutException: Receive timed out". Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.