Web Administration Page returns "Bad Gateway" 502 error.

Discussion in '3CX Phone System - General' started by JimbobNZ, Dec 4, 2016.

Thread Status:
Not open for further replies.
  1. JimbobNZ

    Joined:
    Dec 2, 2016
    Messages:
    13
    Likes Received:
    0
    3CX: 15.0.59381.0
    OS: Linux 3cx 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux

    The 3CX web Administration Page returns "Bad Gateway" 502 error when a second virtual network adapter is added.

    The web admin page becomes useless until I remove the added virtual adapter.
    This is running on a desktop PC on the local LAN.
     
  2. datamerge

    datamerge New Member

    Joined:
    Nov 19, 2014
    Messages:
    176
    Likes Received:
    22
    Yes this is happening to my Linux systems also. I am working with helpdesk on it.
     
  3. JimbobNZ

    Joined:
    Dec 2, 2016
    Messages:
    13
    Likes Received:
    0
    The first time I experienced this problem was in a VM environment where the server had two virtual NICs (LAN,DMZ) and I was unable to login via any of the available IP addresses.
     
  4. datamerge

    datamerge New Member

    Joined:
    Nov 19, 2014
    Messages:
    176
    Likes Received:
    22
    You can bring on the issue just by creating a subinterface to alias a second IP address. E.G. eth0:0.

    If you go into an extension to edit, or into settings | network the configuration service will crash. You can restart the service easily by running

    3CXServiceControl start 3CXCfgServ01.service

    If you down the second interface/subinterface the problem instantly goes away.
     
  5. mobius

    Joined:
    Apr 11, 2011
    Messages:
    10
    Likes Received:
    0
    Update appears to have failed, bad gateway now
     
  6. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    6,016
    Likes Received:
    420
    This configuration with a second virtual NIC is not supported. You should have gotten an error during the installation is this was configured prior to the installation. Remove the second virtual NIC and the problem goes away
     
  7. Sopock

    Sopock Member

    Joined:
    Jul 11, 2012
    Messages:
    447
    Likes Received:
    20
    Problem will not go away if only 1 NIC is present with Predictable Network Interface Names :cool:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Alejandro

    Joined:
    May 24, 2017
    Messages:
    18
    Likes Received:
    0
    I have this same problem running 3CX on a virtual machine. It did wonderfully until yesterday. Suddenly all phone can't register and entering the web-administration page is impossible getting error 502. How do I solve this? I've rebooted, I've restarted both nginx and 3CX all to no avail. Can anyone give me a tip? Thanks.
     
  9. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    6,016
    Likes Received:
    420
    @Alejandro

    Are you aware on which service pack you are on? Also is this a windows or linux installation?
    Did something change before the error started?
     
  10. Alejandro

    Joined:
    May 24, 2017
    Messages:
    18
    Likes Received:
    0
    It is a new installation freshly downloaded from 3CX download site. It is a linux installation on a qemu VM. Host is a ubuntu server 16.04.
    Well, I did an update through the web managing tool. It did not finish before I left the office and therefore I left it running. As I returned to the office three days later it was giving this error. After having restarted nginx, because I thought it was that, and seing that nothing changed, I tried 3CXPhoneSystem status to see if it would tell me something useful to find out the problem. Just after doing that every telephone registered and the whole system worked.
    Must say, that since on friday I found again on the webtool, that there were updates to be done, I updated thinking this time there would be no problems. This past weekend, also a long weekend due to a national holiday, I came back and it was again in the same situation. So, I just run 3CXPhoneStatus and afterwards everything seemed to work... but only seemed...the FirewallChecker is now failing and says:

    testing 3CX SIP Server... failed (How to resolve?)
    • stopping service... done
    • testing port 5060... failed
      • testing port 5060... full cone test failed
    This was before this last update not there.
    Alejandro
     
  11. Francisco Augusto

    Joined:
    Jul 12, 2017
    Messages:
    4
    Likes Received:
    0
    Hi. Good afternoon. I have a problem. I instaled 3cx in the google cloud, seven days ago and everything goes well. Since today , i cant access to web management page and i get 502 bad gateway. I didnt change anything. The system is still running because i can do and receive calls. I am running 3cx with a Perpetual licence.
    Please i need help. Thanks
     
    #11 Francisco Augusto, Jul 12, 2017
    Last edited: Jul 13, 2017
  12. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    6,016
    Likes Received:
    420
    Hello @Francisco Augusto

    Try connecting to your machine via SSH and and type service 3CX* status. Are all services running? Also make sure that you have enough resources for the PBX to run. Often services stop when the machine does not have enough memory or disk space to run on
     
  13. Francisco Augusto

    Joined:
    Jul 12, 2017
    Messages:
    4
    Likes Received:
    0
    Hi. Thank you for your answer. When i get the status service, everything is ok, less management console.
    the information is : 3CXPhoneSystemMC01.service - 3CX PhoneSystem 01 Management Console Loaded: loaded (/lib/systemd/system/3CXPhoneSystemMC01.service; enabled) Active: failed (Result: signal) since Wed 2017-07-12 01:49:19 UTC; 1 day 10h ago Main PID: 571 (code=killed, signal=KILL)Jul 07 01:10:01 pbxexpress-l7rw-lthw-rijd-idep-8945 sudo[31432]: pam_unix(sudo:session): session opened for user root by (uid=0)Jul 07 01:10:13 pbxexpress-l7rw-lthw-rijd-idep-8945 sudo[31432]: pam_unix(sudo:session): session closed for user rootJul 08 01:10:01 pbxexpress-l7rw-lthw-rijd-idep-8945 sudo[22296]: phonesystem : TTY=unknown ; PWD=/var/lib/3cxpbx ; USER=root ; COMMAND=/usr/sbin/3CXServicePackUpdate -sJul 08 01:10:01 pbxexpress-l7rw-lthw-rijd-idep-8945 sudo[22296]: pam_unix(sudo:session): session opened for user root by (uid=0)Jul 08 01:10:15 pbxexpress-l7rw-lthw-rijd-idep-8945 sudo[22296]: pam_unix(sudo:session): session closed for user rootJul 09 01:10:01 pbxexpress-l7rw-lthw-rijd-idep-8945 sudo[13843]: phonesystem : TTY=unknown ; PWD=/var/lib/3cxpbx ; USER=root ; COMMAND=/usr/sbin/3CXServicePackUpdate -sJul 09 01:10:01 pbxexpress-l7rw-lthw-rijd-idep-8945 sudo[13843]: pam_unix(sudo:session): session opened for user root by (uid=0)Jul 09 01:10:32 pbxexpress-l7rw-lthw-rijd-idep-8945 sudo[13843]: pam_unix(sudo:session): session closed for user rootJul 12 01:49:19 pbxexpress-l7rw-lthw-rijd-idep-8945 systemd[1]: 3CXPhoneSystemMC01.service: main process exited, code=killed, status=9/KILLJul 12 01:49:19 pbxexpress-l7rw-lthw-rijd-idep-8945 systemd[1]: Unit 3CXPhoneSystemMC01.service entered failed status

    After I do the command systemctl start 3CXPhoneSystemMC01 , everything is ok and i can acess to management page.


    Thanks.
     
    #13 Francisco Augusto, Jul 13, 2017
    Last edited: Jul 13, 2017
  14. ChrisHerrmann

    Joined:
    Jul 13, 2017
    Messages:
    8
    Likes Received:
    0
Thread Status:
Not open for further replies.