Upgrade to FreePBX 14 from 13 failing

This card definitely worked out of the box with FreePBX 13 / CentOS 6.x and stock DAHDI. These are the instructions I got with the card, when I first got it, and they worked fine:

Here is the simple instruction as the card is Plug-&-Play installation once Dahdi has installed. In the Linux CLI; please run the below commands:
1) modprobe wctdm24xxp
2) service asterisk stop
3) service asterisk start
4) amportal restart
5) dahdi_genconf
6) dahdi_cfg -vvvv
7) lsdahdi (you should see all your ports)
8) reboot (reboot your system, & all the ports should be in service)

This is the card: http://www.nicherons.com/TDM410P.html

Not sure. I am not familiar with the card and only worked with Digium and Sangoma cards before. Maybe something changed in newer DAHDI to not support it.

Hi!

Can you do a

locate wctdm24xxp

and post the result here?

If it doesn’t work, issue a /etc/cron.daily/mlocate before…

Can you also issue a

uname -r

and once again post the results here?

I am no expert in the naming of modules relative to the kernel version but I am expecting a mismatch…

Somehow a weak-updates folder seems to fix things for me here (looks like it’s its purpose to do that), it is as if the mismatch got self corrected on my box?

Modprobing that module works on my system but I have an A200 so I cannot say if things actually work for a Digium card…

Good luck and have a nice day!

Nick

Thanks for the help, guys. Here’s the results of the tests:

[root@freepbx dev]# locate wctdm24xxp
[root@freepbx dev]# /etc/cron.daily/mlocate
[root@freepbx dev]# locate wctdm24xxp
/usr/lib/modules/3.10.0-514.2.2.el7.x86_64/extra/dahdi/wctdm24xxp
/usr/lib/modules/3.10.0-514.2.2.el7.x86_64/extra/dahdi/wctdm24xxp/wctdm24xxp.ko
[root@freepbx dev]# uname -r
3.10.0-514.26.2.el7.x86_64
[root@freepbx dev]#

Hi!

This is what I get

[root@jester admin]# locate wctdm24xxp
/usr/lib/modules/3.10.0-514.2.2.el7.x86_64/extra/dahdi/wctdm24xxp
/usr/lib/modules/3.10.0-514.2.2.el7.x86_64/extra/dahdi/wctdm24xxp/wctdm24xxp.ko
/usr/lib/modules/3.10.0-514.26.2.el7.x86_64/weak-updates/dahdi/wctdm24xxp
/usr/lib/modules/3.10.0-514.26.2.el7.x86_64/weak-updates/dahdi/wctdm24xxp/wctdm24xxp.ko

And those entries in weak-updates are symbolic links back to /usr/lib/modules/3.10.0-514.2.2.el7.x86_64/extra/…

I think, like I said no guru in this, that there is some sort of kernel version mismatch…

I will post about it in the ticket I opened since it did deal with DAHDI issues after the update (amongst other things…).

Good luck and have a nice day!

Nick

If you feel adventurous and have nothing to lose, apparently running

weak-modules --add-kernel

would take care of adding those symlinks…

Only do this as a last resort, I tested this and it seems to works fine but less than an hour ago I didn’t know about this and I might be wrong about it…

Good luck and have a nice day!

Nick

Well, that worked :thumbsup:

[root@freepbx dev]# weak-modules --add-kernel
[root@freepbx dev]# locate wctdm24xxp
/usr/lib/modules/3.10.0-514.2.2.el7.x86_64/extra/dahdi/wctdm24xxp
/usr/lib/modules/3.10.0-514.2.2.el7.x86_64/extra/dahdi/wctdm24xxp/wctdm24xxp.ko
[root@freepbx dev]# /etc/cron.daily/mlocate
[root@freepbx dev]# locate wctdm24xxp
/usr/lib/modules/3.10.0-514.2.2.el7.x86_64/extra/dahdi/wctdm24xxp
/usr/lib/modules/3.10.0-514.2.2.el7.x86_64/extra/dahdi/wctdm24xxp/wctdm24xxp.ko
/usr/lib/modules/3.10.0-514.26.2.el7.x86_64/weak-updates/dahdi/wctdm24xxp
/usr/lib/modules/3.10.0-514.26.2.el7.x86_64/weak-updates/dahdi/wctdm24xxp/wctdm24xxp.ko
[root@freepbx dev]# modprobe wctdm24xxp
[root@freepbx dev]#

[root@freepbx dev]# lsdahdi
### Span  1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER)
  1 FXO        FXSKS        RED
  2 FXS        FXOKS       (In use)
  3 FXS        FXOKS
  4 FXO        FXSKS        RED
[root@freepbx dev]#

So, do you think the weak-modules command is a workaround, or is this what was meant to happen if the upgrade had worked correctly???

Many thanks for your help. Would never have got there without it!!!

Hi!

:smile:

I am glad…

I think it might depend on your exact definition of workaround…

To me it sounds like a workaround until those modules are compiled for that specific kernel, down to the fix/revision level…

Currently they are compiled for a kernel with the same kernel version, major revision and minor revision, the only difference is in the fix/revision level.

(In theory, something which should not affect module compatibility I guess…)

It’s quite possible running weak-modules (but automatically) might be the way to deal with this situation…

My upgrade didn’t work correctly… I was one of the first to try it and report back…

The difference might be that I had the previous kernel at one point in time (I do not know if I did) and it got updated which might have run weak-modules automatically…

In your case, maybe you never had that kernel so weak-modules never got run…

Take this with a BIG grain of salt, these are all suppositions, it’s been less than a day that I learned about this…

Good luck and have a nice day!

Nick

weak-modules --add-kernel is run as part of the install of kmod-dahdi-linux so running that manually is fine.

1 Like

Thanks for the feedback guys. Really appreciate it. I thought everything had been solved, but after a bit of checking it looks like I’m still having issues. It seems that DAHDI is not automatically starting on reboot. If I manually start DAHDI, then restart Asterisk, it seems to come to life:

[root@freepbx ~]# lsdahdi
[root@freepbx ~]# service dahdi status
[root@freepbx ~]# service dahdi start
Starting dahdi (via systemctl):                            [  OK  ]
[root@freepbx ~]# lsdahdi
### Span  1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER)
  1 FXO        FXSKS       (EC: OSLEC - INACTIVE)  RED
  2 FXS        FXOKS       (EC: OSLEC - INACTIVE)
  3 FXS        FXOKS       (EC: OSLEC - INACTIVE)
  4 FXO        FXSKS       (EC: OSLEC - INACTIVE)  RED
[root@freepbx ~]# asterisk -r
Asterisk 13.17.0, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 13.17.0 currently running on freepbx (pid = 1897)
freepbx*CLI> dahdi show channels
   Chan Extension       Context         Language   MOH Interpret        Blocked    In Service Description                                                                         
 pseudo                 default                    default                         Yes                                                                                            
freepbx*CLI> exit
Asterisk cleanly ending (0).
Executing last minute cleanups
[root@freepbx ~]# fwconsole restart
Running FreePBX shutdown...

Stopping RestApps Server
Stopped RestApps Server
Stopping UCP Node Server
[>---------------------------] 1 sec
Stopped UCP Node Server
Stopping Chat Server
Stopped Chat Server
Zulu Server is not running
Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
Press C to Cancel
Press N to shut down NOW
[============================] 1 sec
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Stopping DAHDi for Digium Cards
DAHDi Stopped
Queue Callback Server is not running
Running FreePBX startup...
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Starting DAHDi for Digium Cards
DAHDi Started
Running Sysadmin Hooks
Restarting fail2ban
fail2ban Restarted
Updating License Information for 58918804
Starting Asterisk...
[============================] 2 secs
Asterisk Started
Starting RestApps Server...
[>---------------------------] 1 sec
Started RestApps Server. PID is 3769
Starting UCP Node Server...
[>---------------------------] < 1 sec
Started UCP Node Server. PID is 3848
RestApps is not licensed.
Starting Chat Server...
[>---------------------------] 1 sec
Started Chat Server. PID is 3936
This product is not licensed
[root@freepbx ~]# lsdahdi
### Span  1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER)
  1 FXO        FXSKS       (In use) (EC: OSLEC - INACTIVE)  RED
  2 FXS        FXOKS       (In use) (EC: OSLEC - INACTIVE)
  3 FXS        FXOKS       (In use) (EC: OSLEC - INACTIVE)
  4 FXO        FXSKS       (In use) (EC: OSLEC - INACTIVE)  RED
[root@freepbx ~]# asterisk -r
Asterisk 13.17.0, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 13.17.0 currently running on freepbx (pid = 3594)
freepbx*CLI> dahdi show channels
   Chan Extension       Context         Language   MOH Interpret        Blocked    In Service Description                                                                         
 pseudo                 default                    default                         Yes                                                                                            
      1                 from-analog     en         default                         Yes                                                                                            
      2                 from-internal   en         default                         Yes                                                                                            
      3                 from-analog     en         default                         Yes                                                                                            
      4                 from-analog     en         default                         Yes                                                                                            
freepbx*CLI> exit
Asterisk cleanly ending (0).
Executing last minute cleanups
[root@freepbx ~]# 

However, if I just restart Asterisk after a reboot without manually starting DAHDI, it implies that DAHDI is running, but I don’t think it is:

[root@freepbx ~]# fwconsole restart
Running FreePBX shutdown...

Stopping RestApps Server
Stopped RestApps Server
Stopping UCP Node Server
[>---------------------------] < 1 sec
Stopped UCP Node Server
Stopping Chat Server
Stopped Chat Server
Zulu Server is not running
Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
Press C to Cancel
Press N to shut down NOW
[============================] 2 secs
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Stopping DAHDi for Digium Cards
DAHDi Stopped
Queue Callback Server is not running
Running FreePBX startup...
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
DAHDi: Already started
Running Sysadmin Hooks
Restarting fail2ban
fail2ban Restarted
Updating License Information for 58918804
Starting Asterisk...
[============================] 2 secs
Asterisk Started
Starting RestApps Server...
[>---------------------------] 1 sec
Started RestApps Server. PID is 3274
Starting UCP Node Server...
[>---------------------------] 1 sec
Started UCP Node Server. PID is 3377
RestApps is not licensed.
Starting Chat Server...
[>---------------------------] 1 sec
Started Chat Server. PID is 3465
This product is not licensed
[root@freepbx ~]# lsdahdi
[root@freepbx ~]# asterisk -r
Asterisk 13.17.0, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 13.17.0 currently running on freepbx (pid = 3162)
freepbx*CLI> dahdi show channels
   Chan Extension       Context         Language   MOH Interpret        Blocked    In Service Description
 pseudo                 default                    default                         Yes
freepbx*CLI> exit
Asterisk cleanly ending (0).
Executing last minute cleanups
[root@freepbx ~]#

What is the right way to get DAHDI automatically started on reboot? Do I just add DAHDI to chkconfig:

[root@freepbx init.d]# ls
asterisk  dahdi  fail2ban  functions  iSymphonyServer  netconsole  network  README  wanrouter
[root@freepbx init.d]# chkconfig --list

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

      If you want to list systemd services use 'systemctl list-unit-files'.
      To see services enabled on particular target use
      'systemctl list-dependencies [target]'.

asterisk        0:off   1:off   2:off   3:off   4:off   5:off   6:off
iSymphonyServer 0:off   1:off   2:on    3:on    4:on    5:on    6:off
netconsole      0:off   1:off   2:off   3:off   4:off   5:off   6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
wanrouter       0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@freepbx init.d]#

Is this what starts Asterisk? It looks like it’s started elsewhere, given that all runlevels are off.

Hi!

I am pretty sure it is started from fwconsole (start/restart)…

Maybe there is something in the logs in /var/log/asterisk that could tell you what is happening…

I have not been very lucky at tracking those kind of problems by looking there but it is worth a shot…

Good luck and have a nice day!

Nick

I think you’re right about fwconsole. The trouble is I can’t find anything that kicks it off. I’m a bit confused, since I presume fwconsole also starts Asterisk, which does automatically start on boot. Struggling to find anything of relevance in the log files.

FreePBX is started (which runs fwconsole start) at boot by systemd which you can see by running systemctl is-enabled freepbx.

So what happens if you run fwconsole stop and then fwconsole start?

Yes. It comes back with enabled.

It’s a bit strange. If I reboot I see the following to commands:

  • run lsdahdi nothing gets reported.

  • run fwconsole stop, I get a report that DAHDI has been stopped.

  • run lsdahdi, still nothing reported.

  • run fwconsole start, I get a report that DAHDI is already running

  • run lsdahdi, still nothing reported.

    [root@freepbx ~]# lsdahdi
    [root@freepbx ~]# fwconsole stop
    Running FreePBX shutdown…

    Stopping RestApps Server
    Stopped RestApps Server
    Stopping UCP Node Server
    [>---------------------------] < 1 sec
    Stopped UCP Node Server
    Stopping Chat Server
    Stopped Chat Server
    Zulu Server is not running
    Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
    Press C to Cancel
    Press N to shut down NOW
    [============================] 2 secs
    Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
    Stopping DAHDi for Digium Cards
    DAHDi Stopped
    Queue Callback Server is not running
    [root@freepbx ~]# lsdahdi
    [root@freepbx ~]# fwconsole start
    Running FreePBX startup…
    Taking too long? Customize the chown command, See Sangoma Documentation
    Setting Permissions…
    Setting base permissions…Done
    Setting specific permissions…
    41850 [============================]
    Finished setting permissions
    Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
    DAHDi: Already started
    Running Sysadmin Hooks
    Restarting fail2ban
    fail2ban Restarted
    Updating License Information for 58918804
    Starting Asterisk…
    [============================] 2 secs
    Asterisk Started
    Starting RestApps Server…
    [>---------------------------] 1 sec
    Started RestApps Server. PID is 4285
    Starting UCP Node Server…
    [>---------------------------] 1 sec
    Started UCP Node Server. PID is 4406
    RestApps is not licensed.
    Starting Chat Server…
    [>---------------------------] 1 sec
    Started Chat Server. PID is 4537
    This product is not licensed
    [root@freepbx ~]# lsdahdi
    [root@freepbx ~]#

If I now run service dahdi start and repeat the above, then everything starts working:

  • run service dahdi start and service is reported as running
  • run lsdahdi, shows dahdi running.
  • run fwconsole stop, I get a report that DAHDI has been stopped.
  • run lsdahdi, nothing reported.
  • run fwconsole start, I get a report that DAHDI is now started
  • run lsdahdi, shows dahdi running.

FreePBX (fwconsole) thinks that DAHDi is already started based on what we get back from dahdi status. What do you get if you do the following:

fwconsole stop 
service dahdi status
echo $?
fwconsole start
service dahdi status
echo $?

If it’s still not started, run service dahdi start && echo $? and post back the results please.

Following on from the previous set of commands I ran, I see the following when I run the commands you’ve asked for:

[root@freepbx init.d]# fwconsole stop
Running FreePBX shutdown...

Stopping RestApps Server
Stopped RestApps Server
Stopping UCP Node Server
[>---------------------------] 1 sec
Stopped UCP Node Server
Stopping Chat Server
Stopped Chat Server
Zulu Server is not running
Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
Press C to Cancel
Press N to shut down NOW
[============================] 2 secs
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Stopping DAHDi for Digium Cards
DAHDi Stopped
Queue Callback Server is not running
[root@freepbx init.d]# service dahdi status
[root@freepbx init.d]# echo $?
3
[root@freepbx init.d]# fwconsole start
Running FreePBX startup...
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done
Setting specific permissions...
 41850 [============================]
Finished setting permissions
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Starting DAHDi for Digium Cards
DAHDi Failed: The command "/etc/init.d/dahdi start" failed.

Exit Code: 1(General error)

Working directory: /etc/rc.d/init.d

Output:
================
Starting dahdi (via systemctl):  [FAILED]


Error Output:
================
Job for dahdi.service failed because the control process exited with error code. See "systemctl status dahdi.service" and "journalctl -xe" for detail

Running Sysadmin Hooks
Restarting fail2ban
fail2ban Restarted
Updating License Information for 58918804
Starting Asterisk...
[============================] 2 secs
Asterisk Started
Starting RestApps Server...
[>---------------------------] 1 sec
Started RestApps Server. PID is 29815
Starting UCP Node Server...
[>---------------------------] 1 sec
Started UCP Node Server. PID is 29942
RestApps is not licensed.
Starting Chat Server...
[>---------------------------] 1 sec
Started Chat Server. PID is 30070
This product is not licensed
[root@freepbx init.d]# service dahdi status
[root@freepbx init.d]# echo $?
0
[root@freepbx init.d]# service dahdi start && echo $?
Starting dahdi (via systemctl):  Job for dahdi.service failed because the control process exited with error code. See "systemctl status dahdi.service
                                                           [FAILED]
[root@freepbx init.d]#

I’m going to reboot and try those commands again immediately after reboot.

Here’s what happens if I run the commands directly after reboot. It’s different to what I reported above:

[root@freepbx ~]# fwconsole stop
Running FreePBX shutdown...

Stopping RestApps Server
Stopped RestApps Server
Stopping UCP Node Server
[>---------------------------] 1 sec
Stopped UCP Node Server
Stopping Chat Server
Stopped Chat Server
Zulu Server is not running
Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
Press C to Cancel
Press N to shut down NOW
[============================] 2 secs
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Stopping DAHDi for Digium Cards
DAHDi Stopped
Queue Callback Server is not running
[root@freepbx ~]# service dahdi status
[root@freepbx ~]# echo $?
0
[root@freepbx ~]# fwconsole start
Running FreePBX startup...
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done
Setting specific permissions...
 41850 [============================]
Finished setting permissions
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
DAHDi: Already started
Running Sysadmin Hooks
Restarting fail2ban
fail2ban Restarted
Updating License Information for 58918804
Starting Asterisk...
[============================] 2 secs
Asterisk Started
Starting RestApps Server...
[>---------------------------] 1 sec
Started RestApps Server. PID is 3724
Starting UCP Node Server...
[>---------------------------] 1 sec
Started UCP Node Server. PID is 3803
RestApps is not licensed.
Starting Chat Server...
[>---------------------------] 1 sec
Started Chat Server. PID is 3891
This product is not licensed
[root@freepbx ~]# service dahdi status
[root@freepbx ~]# echo $?
0
[root@freepbx ~]# service dahdi start && echo $?
Starting dahdi (via systemctl):                            [  OK  ]
0
[root@freepbx ~]#

The 0 is the exit code from Dahdi status which is saying “Dahdi is already running”

When it returns a 3 that means it’s not running.

Is systemd starting dahdi some how on here and not letting fwconsole do it?

How can I check this?