Starting traccar service in Ubuntu causing the followoing NullPointerException

Mudassar Ijaz7 years ago

Traccar was working yesterday but than too many open file exception appeared, I changed the file limit in security.conf. After that I tried to restart the traccar service and since than this is the exception I am getting when I run these commands:

sudo systemctl start traccar.service

and than check its status:
sudo service traccar status

Jan 07 13:53:11 ip-172-31-45-26 traccar[4426]:         at org.traccar.Main.run(Main.java:152)
Jan 07 13:53:11 ip-172-31-45-26 traccar[4426]:         at org.traccar.Main.main(Main.java:104)
Jan 07 13:53:11 ip-172-31-45-26 traccar[4426]: Caused by: java.lang.NullPointerException
Jan 07 13:53:11 ip-172-31-45-26 traccar[4426]:         at org.traccar.helper.Log.setupDefaultLogger(Log.java:160)
Jan 07 13:53:11 ip-172-31-45-26 traccar[4426]:         at org.traccar.Context.init(Context.java:361)
Jan 07 13:53:11 ip-172-31-45-26 traccar[4426]:         at org.traccar.Main.run(Main.java:110)
Mudassar Ijaz7 years ago

This was the Log warning when I tried to increase open file limit:

2019-01-07 12:45:35  WARN: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception. - Too many open files - IOException (...)
2019-01-07 12:45:35  WARN: Too many open files - IOException (...)
Anton Tananaev7 years ago

You have a problem with configuration file.

Mudassar Ijaz7 years ago

Ah, true that. Due to lack of my JAVA expertise I was not able to figure out but I was trying to change timeout value to 5 min using:

<entery key='web.timeout'>300000</entery>

i guess I am not using this correctly than. I removed it and it worked.

My device Heart Beat time is 3 min so I was setting it to 5 min. Bcoz i was having connection limit problem.

Plus, your support is great, really loved the response for an open source software. In past 3 days I had 2 problems and both time you came up with a quick response. Keep it up!

Thanks

Mudassar Ijaz7 years ago

I am surprised by number of connections it needs. I have 40 to 50 devices sending data during a day. And the number of connections on my ports increase very rapidly. Although I have set my limit pretty high. But was wondering if may be the connections are not getting timed out properly.

Anton Tananaev7 years ago

Have you configured connection timeouts?

Mudassar Ijaz7 years ago

Well that is when I messed up the config file when i added this line to my config. Is there any mistake in this line?

<entery key='web.timeout'>300000</entery>
Anton Tananaev7 years ago

I don't see any errors in this particular line, but I don't know why you would change the default value.