FreeBSD, NAS4Free and FreeNAS Install failing to start Traccar

Keith Skidmore7 years ago

Hi,

I have been trying to install Traccar on my NAS4Free server which is running FreeBSD 11. I was also trying to install it on FreeNAS in a FreeBSD 11 jail. I had followed the installation instructions for both OpenBSD and FreeBSD from the documentation pages. This was a good starting point although some of the commands a now slightly different in version 11. The Linux version works for installation purposes and when checking the system after installation the processes appeared to be running, daemon and traccar. The problem I was encountering is that although the Traccar process service was running I was unable to access the web page login.

After spending some time trying to find out why the service appeared to be running but the page not accessible I managed to get the following error:

Exception in thread "main" java.io.FileNotFoundException: ./conf/default.xml (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:146)
    at java.io.FileInputStream.<init>(FileInputStream.java:101)
    at org.traccar.Config.load(Config.java:39)
    at org.traccar.Context.init(Context.java:318)
    at org.traccar.Main.main(Main.java:35)

Changing to the installation directory and running the service command "service traccar start" the system started to run. This indicated a problem with the application finding the path when the daemon started. The fix/hack I have implemented to allow the service to start at bootup and run is to modify the <installation directory>/conf/traccar.xml and hard code the path into the lines of the file. In my case the installation was done under /usr/local/traccar therefore I edited /usr/local/traccar/conf/traccar.xml :-

<properties>

    <entry key='config.default'>/usr/local/traccar/conf/default.xml</entry>
    <entry key='logger.file'>/usr/local/traccar/logs/tracker-server.log</entry>
    <entry key='media.path'>/usr/local/traccar/media</entry>
    <entry key='database.changelog'>/usr/local/traccar/schema/changelog-master.xml</entry>
    <entry key='web.path'>/usr/local/traccar/web</entry>

I now have it fully working on NAS4Free and also FreeNAS (in a FreeBSD jail). I hope this helps anyone having the same issue.

Anton Tananaev7 years ago

Thanks for sharing.

yourmate5 years ago

Hi Keith,

I know it's an old thread but nobody seems to be interested to install this on a FreeNAS system. I could do this in a docker VM but I would rather try it first in a jail. Have you got any updates for the new 11.3 by any chance?

Keith Skidmore5 years ago

Hi yourmate,

I have not upgraded to 11.3 at this stage, although I do intend to at some stage, I have to also upgrade the other services running on my NAS such as PlexMedia Server. Any upgrade I do is quite major as this is my backup NAS as well as the traccar server.

Have you tried to install this yourself and if so did you have any errors following the fix that I posted above? If you have not then tell me what you are trying to achieve, for example FreeNAS version and Traccar version. If I get time I can try and build a test system on some other hardware I have similar to your configuration, although I can not promise anything.

My current version of XigmaNAS is 11.2.0.4 - Omnius (revision 6154) with Traccar 3.17 for Linux (Which I know is outdated but like I say this is a major upgrade for me to undertake)

yourmate5 years ago

Hi Keith,
Really appreciated that you are getting back to me on this ancient thread :)

We are in the same boat, I use mine as backup server as well, also planning to run/installing jails for different applications (media/zoneminder/etc). I've done a major rehaul recently, storage has been doubled to 48TB and memory upped from 32GB to 128GB on a Xeon 16 core board. So it would be quite capable of running a rancher VM but I'd rather try to do it in a jail, although unix is not my strong suit...

I have not made any attempt to install traccar yet but will definitely give it a go this weekend as you confirmed that it's doable.

Will update you on my progress, thanks again for the heads up.