User Store Fails to Start On Azure Due to Port 8084 Conflict

When deploying PrivX in Microsoft Azure, the User Store microservice may fail to start due to a port conflict on the system. This issue is typically caused by another service already occupying the default port 8084. A common cause in Azure environments is the Microsoft OMS Agent, which may bind to port 8084 as part of its monitoring configuration.

If the User Store cannot bind to its designated port, PrivX logs will show the following error message:

USER-STORE [ERROR] Server error: listen tcp :8084: bind: address already in use

For more details about OMS Agent port usage, see the official OMS Agent startup script.

Potential Solution

To resolve this issue, you can either reconfigure or remove the service occupying port 8084, or change the port used by the PrivX User Store microservice.

To change the User Store microservice port, do the following:

  1. Edit the User Store configuration file by opening /opt/privx/etc/user-store.toml and setting the listen_port value to an available port (e.g., 8888):

    listen_port = 8888
  2. Update the NGINX reverse proxy configuration by modifying /etc/nginx/privx/privx-https-location.conf to use the new port. Replace 8888 with the port number you configured in the previous step:

    /local-user-store/api/v1/ {
        if ($request_uri !~* ^/local-user-store/api/v1/) {
            return 404;
        }
        proxy_pass https://127.0.0.1:8888;
        include privx/privx-proxy-headers.conf;
    }
  3. Restart both PrivX and NGINX to apply the new settings:

    sudo systemctl restart privx nginx

Was this page helpful?