After change webserver port: connection refused

Henk-Jan6 years ago

Hello,

First of all thank you for your great software. I have used traccar a few times ago and you could a lot with it :)

But i have a problem with my installation on my Orange Pi One. If i have installed it looks it works perfect. I could login. But when i change the webserver port for practice reasons i get continuesly a connection refused. On the old and new port. Even after a complete restart of te Orange Pi.

What do i run?

ARMBIAN 5.73 stable Ubuntu 18.04.2 LTS 4.19.20-sunxi

How do i install?

From SSH:

sudo wget https://github.com/traccar/traccar/releases/download/v4.3/traccar-linux-arm-4.3.zip
sudo unzip traccar-linux-arm-4.3.zip
sudo ./traccar.run
sudo service traccar start

And yeah! After a short time traccar is running on http://orangepione:8082 ! :)

But now i want to change the port to, let we say for a example, port 8084.

cd /
cd opt/traccar/conf
sudo nano default.conf and i changed 8082 into 8084
saved the file
sudo server traccar restart

But now traccar is not working anymore. Not on 8082 not on 8084. If i say wget 127.0.0.1:8084 i get connection refused and also on port 8082... Reboot of the whole orange pi didn't help.

The service status say:

● traccar.service - traccar
   Loaded: loaded (/etc/systemd/system/traccar.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-03-03 15:40:47 CET; 4s ago
 Main PID: 3145 (java)
    Tasks: 11 (limit: 855)
   CGroup: /system.slice/traccar.service
           └─3145 /opt/traccar/jre/bin/java -jar tracker-server.jar conf/traccar.xml

mrt 03 15:40:47 ONE-OrangePi systemd[1]: Started traccar.

The only log i could found is in opt/traccar/log. You could read here down.

What do i wrong??? Oh btw there is nothing running on port 8084! Also no other services.

2019-03-03 15:33:46  INFO: HikariPool-1 - Starting...
...
2019-03-03 15:41:33  INFO: Version: 4.3-SNAPSHOT
2019-03-03 15:41:33  INFO: Starting server...
2019-03-03 15:41:34  INFO: jetty-9.4.14.v20181114; built: 2018-11-14T21:20:31.478Z; git: c4550056e785fb5665914545889f21dc136ad9e6; jvm 11.0.2-ojdkbuild+9
2019-03-03 15:41:36  INFO: Started o.t.w.@d9df9f{/,null,AVAILABLE}
2019-03-03 15:41:36  INFO: DefaultSessionIdManager workerName=node0
2019-03-03 15:41:36  INFO: No SessionScavenger set, using defaults
2019-03-03 15:41:36  INFO: node0 Scavenging every 660000ms
2019-03-03 15:41:42  INFO: Started o.e.j.s.ServletContextHandler@15d54d6{/,null,AVAILABLE}
2019-03-03 15:41:42  INFO: Started ServerConnector@1bb3d7d{HTTP/1.1,[http/1.1]}{0.0.0.0:8084}
2019-03-03 15:41:42  INFO: Started @55256ms
Tony Shelver6 years ago

From terminal, try sudo netstat -tulpn
You can also pipe (|) to grep 8084 or java or whatever to narrow down the list.
That gives a full list of ports and services running on the machine.

Did you open up the port on the firewall? If you are using port forwarding on a router, did you change that?

Also I would highly recommend not getting the software from the repository. Do this https://www.traccar.org/linux/ instead. Worked for me, i am running on 18.04 on Intel.

Looks like the installer is also available for ARM: https://www.traccar.org/download/

Henk-Jan6 years ago

Thank you very much for your help! I know something more! When i NOT use the included jre. i stopped the service (sudo service traccar stop) and i just start with the installed system java in /opt/traccar/ with the command (sudo java -jar tracker-server.jar conf/traccar.xml) it works like a charm. I think it's a problem with IPv6 because all the open ports coupled on java are TCP6 or UDP6. But i have disabled IPv6 on my machine.

Anton Tananaev6 years ago

According to the log, your server is running and everything should be working.

Why would you disable IPv6?

Henk-Jan6 years ago

Because i can't access the webserver after a change of the port. But what i also concluded is that it works with changed port with the system java machine but not with the included version with Traccar ARM 32bit. So i don't know exactly the problem of this. The java included or the IPv6. Fact is that the webinterface doesn't work after a port change.

How do i btw change the startup service from traccar to run with the system installed java jre?

Anton Tananaev6 years ago

Change systemd service configuration file.