Skip to main content
Skip table of contents

How to Resolve 502 Bad Gateway

Issue: Attempting to login to a sensor via its web UI at https://x.x.x.x:1443 results with displaying the 502 BAD GATEWAY error message.

Cause: This is often indicative the last update performed to the sensor failed.

Perform the following steps to resolve the issue:

  1. Use SSH and login to the sensor with the pwnie user account.
  2. Type sudo su and press Enter, then re-type the password to become superuser.
  3. Next, type px-connection-dr and press Enter to verify the sensor has connectivity to the update servers.


    When using the px-connection-dr command/script the tests performed include checking DNS resolution, checking TCP connectivity to ports 80, 443 and 873 and ensuring SSL Filtering is *not* being performed upon any of the connections. It is therefore required for *all* tests to either reflect SUCCESS and/or VALID. If any of the tests should reflect FAILURE and/or INVALID, then the issue involving connectivity needs to be resolved before continuing.

  4. Assuming all tests passed, type rm /opt/pwnix/chef/latest-version-id and press Enter to remove a file indicative of the last update performed.
  5. Next, type rm /opt/pwnix/chef/installed-version-id and press Enter to allow the sensor to attempt updates again within 24 hours of the last update. Note this file may not exist.
  6. Now, type px-system-update and allow the sensor to update itself.


    Do not interfere with the sensor until it is finished and you are returned to the # prompt. Please know it may take the sensor as long as 45 minutes to update.

  7. After returned to the # prompt and to be sure the sensor is fully up-to-date, please repeat steps five and six. This second update will likely take much less time, often less than five minutes.
  8. When finished and returned to the # prompt, you should be all set to continue with the use of the sensor.


    To validate a sensor is up-to-date, type cat /etc/motd and press Enter, then review the banner displayed specifically looking at the Pwnix Release. Next, review the History of Pwnix Releases article.


© 2024 Outpost24® All rights reserved. This document may only be redistributed unedited and unaltered. This document may be cited and referenced only if clearly crediting Outpost24® and this document as the source. Any other reproduction and redistribution in print or electronically is strictly prohibited without explicit permission.


Outpost24® and OUTSCAN™ are trademarks of Outpost24® and its affiliated companies. All other brand names, product names or trademarks belong to their respective owners.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.