Revert back after failure to convert to Secure Connection

marc3 years ago

I tried to convert a working HTTP:// installation to Secure Connection following https://www.traccar.org/secure-connection/ It failed possibly because I already had Certbot SSL installed, it did not work and at this point it seems too much trouble than it's worth to continue.

Unfortunately now Traccar no longer opens on the HTTP ://

How do I un-do what was done in https://www.traccar.org/secure-connection/ to put it back the way it was before?

Anton Tananaev3 years ago

Remove apache, change Traccar port back to the original one, if you changed it.

marc3 years ago

I hadn't changed the port from 8082.

The "Secure Connection procedure" mentions a proxy. Does this also need removing or is this a part of Apache2 ?

Anton Tananaev3 years ago

If you haven't changed the port, you should still be able to access Traccar on port 8082. You don't have to do anything. If it's not working, you have some other issue unrelated to secure connection.

marc3 years ago

I'm a bit reluctant to blow away Apache because I'm using it for something else.

Something I can't understand, is how the incoming connection on :8082 actually reaches the Traccar's ./web/release.html launcher. The bit between these two points I can't figure out. How does it get there? This would be very useful for me to know.

In parallel to this, I had previously added Apache for a different reason. It did not affect access to Traccar on :8082. I did not notice any supporting .conf files, suggesting Traccar runs independently of Apache. Apache seems to have now got in the way after I failed the "Convert to Secure" process.

Anton Tananaev3 years ago

is how the incoming connection on :8082 actually reaches the Traccar

I don't think I understand the question. It reaches it via a network connection, obviously. I'm sure you are looking for other kind of answer.

marc3 years ago

I want to revert back things the way they were. So I'm asking how does the incoming connection from outside [without apache involved] FIND the "release.html" launcher inside the Traccar's install folder, this must be defined somewhere in the Traccar's installation.

That is precisely the part that got screwed up as far as I know. I strongly suspect I need do more than just remove Apache because something else changes during the "Convert to Secure" process I don't know about, because Traccar [can] work independently of Apache. I need to restore that functionality. That is put back something that was taken away.

Anton Tananaev3 years ago

The path is in Traccar configuration file.

marc3 years ago

I found these OK. These were unchanged by the "convert to secure" process.

    <entry key='web.enable'>true</entry>
    <entry key='web.port'>8082</entry>
    <entry key='web.path'>./web</entry>

What I don't get right now is how this data is used and where does it loaded over to. So I can put it back again.

Anton Tananaev3 years ago

It's all inside Traccar service. That's why I'm saying it should continue working without any changes.

marc3 years ago

The breakthrough I've just made is realising it's no more complicated than as you've summed it up. The port is inside the Tracaar service and the service takes the connection directly. I had been previously looking for a mediator because I'd got distracted by how Apache works.

So then I did a " netstat -c |grep 8082 " and tried a connect from outside. Nothing appeared. Then I did another netstat to see if there's a listener on 8082. Nothing. Then (which what I should had done from the start) I did a "systemctl --type=service to check the service is actually there.

Traccar wasn't running. Doh!!! After it started up it had quietly been dropping out without me realising. There is another different problem not related to this, and by unfortunate coincidence it arrived at the same moment I tried to add HTTPS.

Conclusion: As I understand, the HTTP server on port 8082 of Traccar runs independently of any other service such as Apache. Adding / removing Apache should not affect it other than port conflicts. There wasn't anything significant to revert back in the first place.