forward.url

Richard3 months ago

Hello everyone,
I think I'm too stupid to configure the forward URL correctly.

  1. I have a Traccar (latest version) on an Ubuntu Linux VPS, it works perfectly
  2. a Traccar version V5.12 is running on a Synology Docker

to connect the Docker variant I use 6Tunnel on the Linux VPS
this then establishes a connection to Synology via the IP/port (VPS-IP:8083), the connection is then routed via a reverse to the Synology Docker port (e.g.: VPS-IP:8083 -> Synology-IP:49161 access to Docker Traccar)

this also works great, if I now access the VPS-IP:8083 (6Tunnel connection) (all required router ports open) with my cell phone (Traccar Client), the 6Tunnel connects me to the Docker Traccar and my position is displayed.
However, this only seems to work with the OsmAnd protocol, other GPS protocols are not passed through.

I have no idea how to get around this, as they use other ports.

But my actual question comes now.

I would like to have 2 running Traccar instances (VPS + Docker) but either 1 access to the database or a copy of the location data when it is received by the main Traccer (VPS).

In the documentation I found Forward.url and made the following in the configuration (traccar.xml)
after the database entry:

<!-- transmit in Osmand protocol -->

<entry key='forward.enable'>true</entry>

<entry key='forward.url'>http://VPS-IP:8083/traccar?id={uniqueId}&amp;protocol={protocol}&amp;name={name}&amp;latitude={latitude}&amp;longitude={longitude}&amp;altitude={altitude}&amp;speed={speed}&amp;attributes={attributes}</entry>

Now, if I have understood correctly, all data that comes into the VPS Traccar is copied and transmitted to the Docker Traccar?

So both instances should have the same values ​​or location data.

But this doesn't work with Docker.

Did I make a mistake or is my forward.url interpretation wrong?

Turbovix3 months ago

I faced a similar problem with Cloudflare's solution (Zero Trust Free). After a lot of brainstorming, I discovered that unfortunately the free tunnel does not support UDP traffic, or only traffic on port 80, something like that, I don't remember exactly. So unfortunately I gave up trying to use the tunneling service to send device information to the Traccar platform in this way. Maybe it will be possible with the paid solution.

Richard3 months ago

It works via the Traccar Client app, but if I start it via the 6tunnel connection, my location is displayed, the data is sent and received by Docker.
the ports on the router are only open for TCP as far as I remember, so that can't really be the problem.
best wishes

Anton Tananaev3 months ago

Are you sure you're using the correct port for OsmAnd? Because you shouldn't be using the same port as the web app. Default port for OsmAnd is 5055.

Richard3 months ago

Hello Anton,

the VPS runs on port 80 (traccar.xml port 80)
the Docker on port (container port: 8085 and local: 49161)
only port 49161 allows the Traccar web interface to start locally
via Ipv4:8083 -> 6Tunnel -> reverse I also get access

the APP connects to the VPS Ipv4:8083
this redirects via 6 tunnels to the router port tcp IPv6 of the Synology.

The following ports in the router to Synology are open:

Synology IP: 443 to 80
Synology IP: 5001
Synology IP: 5013
Synology IP: 8081 - 8089 (reverse)

each for IPv4 & IPv6

Synology reverse proxy from HTTP input 8083 to HTTP Synology Docker Port: 49161
additional setting in reverse:

  • Header Upgrade: $http_upgrade
  • Header Connection: $connection_upgrade

The connection works with the Traccar client and very quickly. Even though the port is not forwarded, it works.
just not from server to server, is the configuration correct?

best regards

Anton Tananaev3 months ago

Again, you should not use web port for OsmAnd protocol.

Richard3 months ago

So the problem is that the server is not sending any data to the docker because the Osmand protocol 5055 cannot be forwarded?

Anton Tananaev3 months ago

Why it cannot be forwarded?

Richard3 months ago

if I want to create port 5055 IP 5055 via 6Tunnel I get the answer: bind: Address already in use
but these are not created.

they are entered in the router
however I am also a bit confused about the reverse entry:

there I would then route the incoming port from VPS:5055 via 6tunnel to Router: 5055 on Synology Reverse 5055 on to Docker: 49161. ??!

that is quite complicated.

it would be easier if all GPS sent to one port and Traccar processed this internally.

I am probably just thinking too complicated.
first I have to solve the 6tunnel problem Address already in use

best wishes

Anton Tananaev3 months ago

If it was possible to have all devices on the same port, we would have done it.