Connection showing 'Offline' under Settings > Preferences > Info

AaronJCCU12 years ago

I just finished setting up an instance of Traccar on Windows, and followed the steps to create an IIS reverse proxy for SSL. Everything seemed to be working, however, I noticed that in the web UI under Settings > Preferences > Info, it shows Connection as 'Offline'. I wasn't too concerned about this until I noticed that the device positions aren't being updated as often as they should be (every 60 seconds, instead of every 10 seconds), and am assuming this is why. (I can log onto localhost:8082 on a browser on the server, and the status shows Online and the GPS position updates like it ought to.) What determines whether this field shows 'Online' or 'Offline'?

Traccar Info Offline

Anton Tananaev2 years ago

I suspect you haven't configured WebSocket proxy correctly.

AaronJCCU12 years ago

Thank you!

For anyone else with this issue, here's how I fixed it:

  1. Install WebSockets support for IIS via 'Add Roles and Features' > Web Server (IIS) > Web Server > Application Development > WebSocket Protocol.
  2. Open IIS Manager and navigate to Sites > [Name of Traccar site] > URL Rewrite. Click 'View Server Variables' under Actions on the right.
    IIS View Server Variables screenshot
  3. Click 'Add...' under Actions and add variable name HTTP_SEC_WEBSOCKET_EXTENSIONS.
    IIS Allowed Server Variables screenshot
  4. Go back to the URL Rewrite rules and open the edit screen for your Inbound rule. Expand the 'Server Variables' section if necessary.
    IIS Edit Inbound Rule screenshot
  5. Add the server variable name HTTP_SEC_WEBSOCKET_EXTENSIONS. You'll have to enter a value; '0' worked for me.
    IIS Set Server Variable screenshot
  6. In the Actions panel on the right, click 'Apply'. I restarted the site from within IIS Manager to be safe; I'm not sure if that's totally necessary though.
  7. Log into the web UI and see if Settings > Preferences > Info shows 'Online' for the connection status.
    Traccar Info Online screenshot