Solved Debian Management Console Service Won't Start

Discussion in '3CX Phone System - General' started by Robert Juric, Mar 6, 2017.

Thread Status:
Not open for further replies.
  1. Robert Juric

    Joined:
    Jan 14, 2017
    Messages:
    11
    Likes Received:
    0
    Hello, I'm running 3CX on Debian, installed from the ISO. I had everything up and running last week, went out of town for a week and when I returned I'm unable to login.

    When I got the web admin I get an nginx 502 - Bad Gateway error. When I log in to the server the Management Console service is not running. I've tried to restart the service, but it times out and enters the failed state. Any ideas or additional log info I could dig into?

    Mar 06 11:20:20 jennifer systemd[1]: Starting 3CX PhoneSystem 01 Management Console...
    -- Subject: Unit 3CXPhoneSystemMC01.service has begun with start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit 3CXPhoneSystemMC01.service has begun starting up.
    Mar 06 11:22:20 jennifer systemd[1]: 3CXPhoneSystemMC01.service start operation timed out. Terminating.
    Mar 06 11:22:20 jennifer systemd[1]: Failed to start 3CX PhoneSystem 01 Management Console.
    -- Subject: Unit 3CXPhoneSystemMC01.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit 3CXPhoneSystemMC01.service has failed.
    --
    -- The result is failed.
    Mar 06 11:22:20 jennifer systemd[1]: Unit 3CXPhoneSystemMC01.service entered failed state.
     
  2. M_P

    M_P

    Joined:
    Mar 6, 2017
    Messages:
    1
    Likes Received:
    0
    Hey,

    same problem on debian distro here. As for me this problem appears after an update from 15.0.60903.0 to 15.0.62928.5 on Saturday.
    The system seems working but Management Console is "out of order" with the same message - nginx 502 bad gateway and a server error after a login attempt


    root@xxxx:~# systemctl start 3CXPhoneSystemMC01.service
    Job for 3CXPhoneSystemMC01.service failed. See 'systemctl status 3CXPhoneSystemMC01.service' and 'journalctl -xn' for details.


    root@xxxx:~# systemctl status 3CXPhoneSystemMC01.service
    ● 3CXPhoneSystemMC01.service - 3CX PhoneSystem 01 Management Console
    Loaded: loaded (/lib/systemd/system/3CXPhoneSystemMC01.service; enabled)
    Active: failed (Result: timeout) since Mon 2017-03-06 18:25:58 CET; 19min ago
    Process: 12946 ExecStart=/usr/lib/3cxpbx/ManagementConsoleJS --pid /var/run/phonesystem/3CXPhoneSystemMC01.pid -p /var/lib/3cxpbx/Instance1/Data/Http/webroot (code=killed, signal=INT)
    Main PID: 12946 (code=killed, signal=INT)

    Mar 06 18:25:58 xxxx systemd[1]: 3CXPhoneSystemMC01.service start operation timed out. Terminating.
    Mar 06 18:25:58 xxxx systemd[1]: Failed to start 3CX PhoneSystem 01 Management Console.
    Mar 06 18:25:58 xxxx systemd[1]: Unit 3CXPhoneSystemMC01.service entered failed state.

    Restarting the server isn't solving the problem in my case


     
  3. MichaelB

    MichaelB Member
    3CX Support

    Joined:
    Aug 25, 2009
    Messages:
    401
    Likes Received:
    3
    Hi, could you please run this command, systemctl start 3CXPhoneSystemMC01
    Let us know.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Robert Juric

    Joined:
    Jan 14, 2017
    Messages:
    11
    Likes Received:
    0
    Yea, I've tried this a few times:


    Job for 3CXPhoneSystemMC01.service failed. See 'systemctl status 3CXPhoneSystemMC01.service' and 'journalctl -xn' for details.

    root@servername:~# systemctl status 3CXPhoneSystemMC01 -l
    ● 3CXPhoneSystemMC01.service - 3CX PhoneSystem 01 Management Console
    Loaded: loaded (/lib/systemd/system/3CXPhoneSystemMC01.service; enabled)
    Active: failed (Result: timeout) since Mon 2017-03-06 13:03:29 CST; 1min 11s ago
    Process: 2656 ExecStart=/usr/lib/3cxpbx/ManagementConsoleJS --pid /var/run/phonesystem/3CXPhoneSystemMC01.pid -p /var/lib/3cxpbx/Instance1/Data/Http/webroot (code=killed, signal=INT)
    Main PID: 2656 (code=killed, signal=INT)

    Mar 06 13:01:29 servername systemd[1]: Starting 3CX PhoneSystem 01 Management Console...
    Mar 06 13:01:34 servername sudo[2702]: phonesystem : TTY=unknown ; PWD=/var/lib/3cxpbx ; USER=root ; COMMAND=/usr/bin/apt-get update -o Dir::Etc::sourcelist=sources.list.d/3cxpbx.list -o Dir::Etc::sourceparts=- -o APT::Get::List-Cleanup=0
    Mar 06 13:01:34 servername sudo[2702]: pam_unix(sudo:session): session opened for user root by (uid=0)
    Mar 06 13:03:29 servername systemd[1]: 3CXPhoneSystemMC01.service start operation timed out. Terminating.
    Mar 06 13:03:29 servername systemd[1]: Failed to start 3CX PhoneSystem 01 Management Console.
    Mar 06 13:03:29 servername systemd[1]: Unit 3CXPhoneSystemMC01.service entered failed state.
     
  5. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,443
    Likes Received:
    282
    Hello there,

    Please try again today as the issue is caused because the PBX tries to connect to a mail server that cannot connect to. For example if you left our mail server that was there as an example then you may face this issue. Please try restarting again and see if ti works now. Let us know how it goes.
     
  6. Robert Juric

    Joined:
    Jan 14, 2017
    Messages:
    11
    Likes Received:
    0
    Yep, all is good now. This 3CX server was a new build so we hadn't input the SMTP server info yet.

    Thanks for the response 3CX!
     
  7. Stéphane DAGUET

    Joined:
    Apr 13, 2017
    Messages:
    3
    Likes Received:
    0
    Hello,

    Sounds the problem still active today.
    How can the management service crash because of a mail server not available ?

    How can I pass this SMTP connection problem and get back my management console ?

    Regards
     
  8. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,443
    Likes Received:
    282
    Hello @Stéphane DAGUET

    Have you tried the command systemctl start 3CXPhoneSystemMC01?
    Are the rest of the services running?
     
  9. Stéphane DAGUET

    Joined:
    Apr 13, 2017
    Messages:
    3
    Likes Received:
    0
    Hello,

    Yes, for sure. I finally started with strace (strace -f -o trace.log /usr/lib/3cxpbx/ManagementConsoleJS --pid /var/run/phonesystem/3CXPhoneSystemMC01.pid -p /var/lib/3cxpbx/Instance1/Data/Http/webroot); wait a moment, and understand the problem was also related to the mail server. After a long moment, the service finally started - I modified the systemctl TimeoutStartSec which was 120s to 600s, then started the service.

    However, I would recommend 3cx to no block service starting in case of mail server misconfiguration and/or timeout to connect to it.

    Best regards
     
  10. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    4,443
    Likes Received:
    282
    Glad to hear the issue is resolved and thank you for sharing your solution.
    Please note that this issue has been addressed for the next update and you should not encounter this issue again.
     
  11. Barnabis

    Joined:
    May 28, 2017
    Messages:
    2
    Likes Received:
    0
    Hello,

    I ve the same problem.

    i have increased the timeout in systemd and two services didn't start. I try to reboot the server but nothing ... Below the result of the command when I try to start 3CXPhoneSystemMC01

    May 28 14:19:51 sl0001 systemd[1]: Starting 3CX PhoneSystem Configuration Service...
    -- Subject: Unit 3CXCfgServ01.service has begun with start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit 3CXCfgServ01.service has begun starting up.
    May 28 14:20:16 sl0001 systemd[1]: Started 3CX PhoneSystem Configuration Service.
    -- Subject: Unit 3CXCfgServ01.service has finished start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit 3CXCfgServ01.service has finished starting up.
    --
    -- The start-up result is done.
    May 28 14:20:16 sl0001 systemd[1]: Starting 3CX PhoneSystem 01 Management Console...
    -- Subject: Unit 3CXPhoneSystemMC01.service has begun with start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit 3CXPhoneSystemMC01.service has begun starting up.
    May 28 14:22:16 sl0001 systemd[1]: 3CXPhoneSystemMC01.service start operation timed out. Terminating.
    May 28 14:22:16 sl0001 systemd[1]: Failed to start 3CX PhoneSystem 01 Management Console.
    -- Subject: Unit 3CXPhoneSystemMC01.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit 3CXPhoneSystemMC01.service has failed.
    --
    -- The result is failed.
    May 28 14:22:16 sl0001 systemd[1]: Unit 3CXPhoneSystemMC01.service entered failed state.


    When I launch the command with straw (see above) the response is continuously :

    Connecting to the PBX... Check config.json!

    Can you help me ?

    Best regards,

    Olivier
     
  12. ChrisHerrmann

    Joined:
    Jul 13, 2017
    Messages:
    8
    Likes Received:
    0
    If you want to modify the service timeout, head to:
    /lib/systemd/system/3CX<servicename>.service

    e.g.
    vi /lib/systemd/system/3CXPhoneSystemMC01.service

    and edit the line:
    TimeoutStartSec=120

    change to something that might actually work for you... (300 seconds seemed to be OK for me) then:

    systemctl start 3CXPhoneSystemMC01.service

    Note that if you query the properties of the service it'll return a different name:
    e.g.
    systemctl show 3CXQueueManager01.service -p TimeoutStartSec #returns nothing...

    but this will work:
    root@pbx01:/var/log# systemctl show 3CXQueueManager01.service -p TimeoutStartUSec
    TimeoutStartUSec=5min

    I'll let others discuss the value of inconsistent naming.

    systemctl show 3CXQueueManager01.service -a # this will show all properties defined for the service
     
Thread Status:
Not open for further replies.