Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Asterisk shuts down and restarts 2 processes

    pfSense Packages
    3
    4
    3159
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      copystring last edited by

      Hi, I've got a big Problem with my asterisk on pfsense. It's the asterisk 1.8 package installed through the package system of the web gui. So nothing fancy.
      Yet after a while the asterisk process stops with:

      
      ...
      [Nov 15 20:14:26]     -- Remote UNIX connection
      [Nov 15 20:14:26] Beginning asterisk shutdown....
      [Nov 15 20:14:26] Asterisk cleanly ending (0).
      [Nov 15 20:14:26] Executing last minute cleanups
      ...
      
      

      After that asterisk get's automatically restarted but it starts 2 processes interfering with each other.

       ps aux | grep asterisk
      asterisk 12817   0.0  0.9 503796 27208  -  Is    8:49PM     0:02.60 /usr/local/sbin/asterisk -n -F -U asterisk
      asterisk 12903   0.0  0.9 504436 27496  -  Is    8:49PM     0:02.93 /usr/local/sbin/asterisk -n -F -U asterisk
      
      

      This ends up in a log like this:

      
      ...
      [Nov 17 21:16:22] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:16:22] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #81)
      [Nov 17 21:16:42] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:16:42] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #82)
      [Nov 17 21:16:42] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:16:42] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #82)
      [Nov 17 21:17:03] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:17:03] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #83)
      [Nov 17 21:17:03] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:17:03] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #83)
      [Nov 17 21:17:23] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:17:23] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #84)
      [Nov 17 21:17:23] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:17:23] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #84)
      [Nov 17 21:17:43] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:17:43] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #85)
      [Nov 17 21:17:43] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:17:43] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #85)
      [Nov 17 21:18:03] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:18:03] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #86)
      [Nov 17 21:18:03] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:18:03] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #86)
      [Nov 17 21:18:23] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:18:23] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #87)
      [Nov 17 21:18:23] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:18:23] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #87)
      [Nov 17 21:18:43] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:18:43] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #88)
      [Nov 17 21:18:43] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:18:43] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #88)
      [Nov 17 21:19:03] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:19:03] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #89)
      [Nov 17 21:19:03] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:19:03] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #89)
      [Nov 17 21:19:23] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:19:23] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #90)
      [Nov 17 21:19:23] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:19:23] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #90)
      [Nov 17 21:19:43] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:19:43] NOTICE[-1] chan_sip.c: -- Registration for '4912345678901@sip.1und1.de' timed out, trying again (Attempt #91)
      [Nov 17 21:19:43] ERROR[-1] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data
      [Nov 17 21:19:43] NOTICE[-1] chan_sip.c: -- Registration for '123456789@sipgate.de' timed out, trying again (Attempt #91)
      [Nov 17 21:19:57] NOTICE[-1] cdr.c: CDR simple logging enabled.
      [Nov 17 21:19:57] NOTICE[-1] loader.c: 162 modules will be loaded.
      [Nov 17 21:19:57] WARNING[-1] loader.c: Error loading module 'res_snmp.so': Shared object "libperl.so" not found, required by "libnetsnmpmibs.so.30"
      [Nov 17 21:19:57] NOTICE[-1] pbx_lua.c: Lua PBX Switch loaded.
      [Nov 17 21:19:58] WARNING[-1] loader.c: Error loading module 'res_snmp.so': Shared object "libperl.so" not found, required by "libnetsnmpmibs.so.30"
      [Nov 17 21:19:58] WARNING[-1] loader.c: Module 'res_snmp.so' could not be loaded.
      [Nov 17 21:19:58] NOTICE[-1] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
      [Nov 17 21:20:04] NOTICE[-1] cel_custom.c: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
      ...
      
      

      This repeats forever more until I either kill the 2 processes or restart asterisk completely though the web gui. Worth noting is, that this happens even with the default config that comes with the package.
      I'm kind at an end with this since the logs don't tell me much apart from that's asterisk stopped. Just not why it stopped.
      Any ideas? Is it a bug? Any other relevant logs I can paste?

      1 Reply Last reply Reply Quote 0
      • F
        Fesoj last edited by

        Normally there can only be a single instance of Asterisk, but it takes a moment before the pid file is written and another starting instance can check this. In /etc/rc.start_packages the Asterisk packages gets started 2 times: at first by calling start_service() and then by explicitly executing /usr/local/etc/rc.d/asterisk.sh. This happens so fast that two instances are typically running, which may cause a couple of problems subsequently.

        A simple fix is to add the statementsleep(1);just before the statement```
        $shell = @popen("/bin/sh", "w");

        The second instance will then not start. A better fix is probably fixing the Asterisk package by renaming the rc-file to asterisk instead naming it asterisk.sh.
        1 Reply Last reply Reply Quote 0
        • D
          doktornotor Banned last edited by

          @Fesoj:

          A better fix is probably fixing the Asterisk package by renaming the rc-file to asterisk instead naming it asterisk.sh.

          As already noted elsewhere, that file should not exist at all.

          1 Reply Last reply Reply Quote 0
          • F
            Fesoj last edited by

            Yep.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post