RAW forward

asicar2 years ago

Greetings, for the new RAW forward function, what would be the keys in traccar.xml?

<entry key='forward.enable'>true</entry>
<entry key='forward.url'>http:(ip only?)</entry> 

any additional configuration? thank you?

Anton Tananaev2 years ago

For raw data forwarding you need to configure this parameter:

<entry key='server.forward'>server.example.com</entry>
Alex Meléndez2 years ago

Hi, is it possible to send raw data from a server (1) with SSL to one without SSL (2)? I have configured key='server.forward' in traccar.xml on server 1 and configured on the destination router the forwarding of the same used ports (5001-5220) but I don't see that it fills the tables on server 2. I got the error on server 1:

2023-05-07 00:29:29 WARN: Network forwarding error - Connection timed out - ConnectException (... < NetworkForwarder:56 < NetworkForwarderHandler:60 < ...)

How should server 2 be configured? Thanks in advance.

Anton Tananaev2 years ago

It looks like your second server is not accepting connections.

Alex Meléndez2 years ago

I have corrected a configuration and now it does reach server 2, but now I get the following error, what could it be?

2023-05-07 21:45:03 WARN: Network forwarding error - Broken pipe (Write failed) - SocketException (... < NetworkForwarder:59 < NetworkForwarderHandler:60 < ...)

Thanks for any help.

Alex Meléndez2 years ago

I discovered that the previous error was because I did not have the remote connections option configured in my mariadb (mysql) file, I have corrected it:

bind-address = 0.0.0.0.0

Now I have a connection but I get an error on the destination server side:

2023-05-13 12:55:58 INFO: [T08734f25] connected
2023-05-13 12:55:58 INFO: [T08734f25: progress < XXX.XXX.XXX. XXX] 2a48512c393137353133373038352c56312c3138353535352c412c323230392e343533362c4e2c31303130302e303633312c572c302e30302c3332372c3133303532332c66626666666266662c3333342c30322c333532342c333639323923
2023-05-13 12:55:58 INFO: [T08734f25] error - Adjusted frame length exceeds 1024: 11353 - discarded - TooLongFrameException (... < WrapperInboundHandler:57 < ... < StandardLoggingHandler:44 < ... < NetworkMessageHandler:37 < ...)
2023-05-13 12:55:58 INFO: [T08734f25] disconnected

Does it have to do that the source server has SSL connection and the destination server does not?
Or is it too much information to send and it can only send the last 1024 positions?
Thank you.

Anton Tananaev2 years ago

Have you compared the logs on both? Obviously make sure to compare full connection session.

Alex Meléndez2 years ago

Regarding network forwarding on the origin server side the error persists:

2023-05-13 13:55:50 WARN: Network forwarding error - Broken pipe (Write failed) - SocketException (... < NetworkForwarder:59 < NetworkForwarderHandler:60 < ...)

That's the closest warning, the 1 hour difference is because of the timezone configured on the servers.

Anton Tananaev2 years ago

I checked your sample and you're using the wrong port. You should probably sort out problems on a single server before attempting forwarding.

Alex Meléndez2 years ago

Thanks for checking, the logs in the source server are INFO type, the only WARN type are NETWORK FORWARDING, which problems are you referring to?
The ports I currently use on the source server with SLL are: 80, 443, 5001-5220.
The ports I currently use on the destination server without SSL are: 80, 5001-5220.

Anton Tananaev2 years ago

I'm referring to the problem with the only message sample that you shared.

Alex Meléndez2 years ago

Thank you very much for the suggestion, the port problem has been solved, it turns out that the PMG5617-T20B modem doesn't allow to configure port ranges and I had to enable one by one. Thank you!