Traccar service stops inmediately after starting

carlosAguA8 years ago

I downloaded Traccar (server) version 3.9
Something weird is happening.
-The traccar service doesn't start inmediately when I start up the computer.
-When I go to the Services feature on Windows 7 I start the service but it inmediately stops after 5 seconds.
As a result, when opening localhost:8082, it doesn't work.
I'm checking the log file since I check some people doing so within the forums.
From that I can highlight these two following lines
From the wrapper.log I get the following:

INFO|6908/0|Service traccar|16-12-16 19:27:31|Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:5005
-INFO|6908/0|Service traccar|16-12-16 19:27:31|Caused by: java.net.BindException: Address already in use: .

The whole log is the following one.

WARNING|wrapper|Service traccar|16-12-16 19:27:18|YAJSW: yajsw-beta-12.07
WARNING|wrapper|Service traccar|16-12-16 19:27:18|OS   : Windows 7/6.1/amd64
WARNING|wrapper|Service traccar|16-12-16 19:27:18|JVM  : Oracle Corporation/1.8.0_112/C:\Program Files\Java\jre1.8.0_112/64
INFO|wrapper|Service traccar|16-12-16 19:27:19|start delay: 0
INFO|wrapper|Service traccar|16-12-16 19:27:20|started process with pid 6908
INFO|6908/0|Service traccar|16-12-16 19:27:22|[INFO] StandardFileSystemManager - Using "C:\Windows\TEMP\vfs_cache" as temporary files store.
INFO|6908/0|Service traccar|16-12-16 19:27:25|[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Started.
INFO|6908/0|Service traccar|16-12-16 19:27:26|INFO 12/16/16 7:27 PM: liquibase: Clearing database change log checksums
INFO|6908/0|Service traccar|16-12-16 19:27:26|INFO 12/16/16 7:27 PM: liquibase: Successfully acquired change log lock
INFO|6908/0|Service traccar|16-12-16 19:27:26|INFO 12/16/16 7:27 PM: liquibase: Successfully released change log lock
INFO|6908/0|Service traccar|16-12-16 19:27:26|INFO 12/16/16 7:27 PM: liquibase: Successfully acquired change log lock
INFO|6908/0|Service traccar|16-12-16 19:27:29|INFO 12/16/16 7:27 PM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
INFO|6908/0|Service traccar|16-12-16 19:27:29|INFO 12/16/16 7:27 PM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
INFO|6908/0|Service traccar|16-12-16 19:27:29|INFO 12/16/16 7:27 PM: liquibase: ./schema/changelog-master.xml: changelog-3.8::changelog-3.8-dropuniquetoken::author: Change set changelog-3.8::changelog-3.8-dropuniquetoken::author failed, but failOnError was false.  Error: Constraint "UK_USER_TOKEN" not found; SQL statement:
INFO|6908/0|Service traccar|16-12-16 19:27:29|ALTER TABLE PUBLIC.users DROP CONSTRAINT uk_user_token [90057-193] [Failed SQL: ALTER TABLE PUBLIC.users DROP CONSTRAINT uk_user_token]
INFO|6908/0|Service traccar|16-12-16 19:27:29|INFO 12/16/16 7:27 PM: liquibase: Successfully released change log lock
INFO|6908/0|Service traccar|16-12-16 19:27:30|[main] INFO org.eclipse.jetty.util.log - Logging initialized @9803ms
INFO|6908/0|Service traccar|16-12-16 19:27:31|java.lang.reflect.InvocationTargetException
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at java.lang.reflect.Method.invoke(Unknown Source)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)
INFO|6908/0|Service traccar|16-12-16 19:27:31|Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:5005
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.bootstrap.ConnectionlessBootstrap.bind(ConnectionlessBootstrap.java:204)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.traccar.TrackerServer.start(TrackerServer.java:138)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.traccar.ServerManager.start(ServerManager.java:73)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.traccar.Main.main(Main.java:38)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	... 6 more
INFO|6908/0|Service traccar|16-12-16 19:27:31|Caused by: java.net.BindException: Address already in use: bind
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at sun.nio.ch.Net.bind0(Native Method)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at sun.nio.ch.Net.bind(Unknown Source)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at sun.nio.ch.DatagramChannelImpl.bind(Unknown Source)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at sun.nio.ch.DatagramSocketAdaptor.bind(Unknown Source)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.socket.nio.NioDatagramPipelineSink.bind(NioDatagramPipelineSink.java:129)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.socket.nio.NioDatagramPipelineSink.eventSunk(NioDatagramPipelineSink.java:77)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:779)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.SimpleChannelHandler.bindRequested(SimpleChannelHandler.java:299)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:265)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.handler.logging.LoggingHandler.handleDownstream(LoggingHandler.java:338)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.SimpleChannelHandler.bindRequested(SimpleChannelHandler.java:299)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:265)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.Channels.bind(Channels.java:561)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:197)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	at org.jboss.netty.bootstrap.ConnectionlessBootstrap.bind(ConnectionlessBootstrap.java:198)
INFO|6908/0|Service traccar|16-12-16 19:27:31|	... 9 more
INFO|wrapper|Service traccar|16-12-16 19:27:32|calling onStop
INFO|wrapper|Service traccar|16-12-16 19:27:32|Win service stop - timeout: 30000
INFO|wrapper|Service traccar|16-12-16 19:27:32|Win service wrapper.control -> stopping application
INFO|wrapper|Service traccar|16-12-16 19:27:32|Win service stop - after shutdown
INFO|wrapper|Service traccar|16-12-16 19:27:32|Win service stop - before notify

I don't know if I can handle it through the firewall since I already changed something there.
I will appreciate your help. I don't know how to fix this issue and I've been checking different sources.

Thanks

Anton Tananaev8 years ago

Some other process is using port 5005. You need to either stop that process or change/remove port.

najeem8 years ago

I am experiencing a similar problem. How do we know which process is using that port? How will it be changed? I will appreciate assistance too.

carlosAguA8 years ago

I solved the problem. Thank you. It was useful that you pointed out I would need to stop the process.

What I did was :

  1. I look up Find PID proces that use a port on windows

In the command line I wrote :
netstat -a -n -o | find "5005"
And I was able to see that --->

UDP 0.0.0.0:5005 *:* 6608 UDP [::]:5005 *:* 6608
  1. I went to the task manager> services and I checked which service had the PID 6608 in use.
  2. Then, I went to services and found the name of the service which was WMPNetwork (Windows MEdia Network someting) and I stopped it and changed it to disable when starting up the system.

After that I was able to go to localhost:8082.

Thank you Anton!

najeem8 years ago

Please, I have not been able to solve my own similar problem.
I made a search for app using port 5005 but none was displayed. It shows for other ports that I tried.
Is my traccar running on 5005 too? Please help. The service usually stops few seconds after starting it.

Anton Tananaev8 years ago

If you get "Address already in use" error, it means some other process is already using the port.

najeem8 years ago

Anton, thank you for always responding.
The service normally switches to stopped without displaying any error message.

Anton Tananaev8 years ago

You should check logs for errors. Where do you expect to see error message if it's a service without any user interface?

carlosAguA8 years ago

najeem

You should check the errors from the folder where you installed trackar> logs and check both (wrapper.log and server-tracker.log)

Mehdisn657 years ago

Hello dear Anton

i have the same problem
the service is stop working and don't run again
when i enter the localhost:8082 it show unable to connect
please kindly check the log

WARNING|wrapper|Service traccar|17-08-25 00:26:08|YAJSW: yajsw-stable-12.09
WARNING|wrapper|Service traccar|17-08-25 00:26:08|OS   : Windows Server 2008 R2/6.1/amd64
WARNING|wrapper|Service traccar|17-08-25 00:26:08|JVM  : Oracle Corporation/1.8.0_131/C:\Program Files\Java\jre1.8.0_131/64
INFO|wrapper|Service traccar|17-08-25 00:26:08|start delay: 0
INFO|wrapper|Service traccar|17-08-25 00:26:08|started process with pid 1036
INFO|1036/0|Service traccar|17-08-25 00:26:09|[INFO] StandardFileSystemManager - Using "C:\Windows\TEMP\vfs_cache" as temporary files store.
INFO|1036/0|Service traccar|17-08-25 00:26:09|[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
INFO|1036/0|Service traccar|17-08-25 00:26:10|[main] ERROR com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Exception during pool initialization.
INFO|1036/0|Service traccar|17-08-25 00:26:10|org.h2.jdbc.JdbcSQLException: File corrupted while reading record: null. Possible solution: use the recovery tool [90030-196]
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.message.DbException.get(DbException.java:168)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:196)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:168)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:100)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.engine.Database.getPageStore(Database.java:2476)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.engine.Database.open(Database.java:697)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.engine.Database.openDatabase(Database.java:276)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.engine.Database.<init>(Database.java:270)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.engine.Engine.openSession(Engine.java:64)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.engine.Engine.openSession(Engine.java:176)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.engine.Engine.createSession(Engine.java:137)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.engine.Engine.createSession(Engine.java:27)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:116)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:100)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.h2.Driver.connect(Driver.java:69)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:112)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:118)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:341)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:193)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:428)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:499)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:112)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:72)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.traccar.database.DataManager.initDatabase(DataManager.java:120)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.traccar.database.DataManager.<init>(DataManager.java:75)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.traccar.Context.init(Context.java:221)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.traccar.Main.main(Main.java:35)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at java.lang.reflect.Method.invoke(Unknown Source)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|1036/0|Service traccar|17-08-25 00:26:10|	at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)
INFO|1036/0|Service traccar|17-08-25 00:26:10|Caused by: java.lang.IllegalStateException: File corrupted in chunk 3431518, expected page length 4..1024, got 1131373669 [1.4.196/6]
Anton Tananaev7 years ago

Your database file is corrupted.

Mehdisn657 years ago

Dear Anton, what i do to solve this problem

Anton Tananaev7 years ago

Well, you remove it or restore it from backup.

Mehdisn657 years ago

how can i edit H2 database in windows ?
may i able to clean damages section in data base?

Anton Tananaev7 years ago

I don't know. You would need to research it yourself if you want to try to repair it.