BUG Migrating from CentOS

mbellot

Active Member
Joined
Dec 15, 2008
Messages
406
Reaction score
187
well I jumped into the pool and everything seems OK except one minor (I hope) thing...

Dahdi has gone from "ONLINE" to "UNKNOWN" in the system info...

Original:
Code:
  ┌───────────────────SYSTEM INFORMATION *VERIFIED*─────────────────────┐
  │  Asterisk  = ONLINE   | Dahdi    = ONLINE   | MySQL    = ONLINE     │
  │  SSH        = ONLINE  | Apache    = ONLINE  | Iptables  = ONLINE    │
  │  Fail2ban  = ONLINE   | Internet  = ONLINE  | Ip6Tables = ONLINE    │
  │  Disk Free  = ADEQUATE| Mem Free  = ADEQUATE| NTPD      = ONLINE    │
  │  SendMail  = ONLINE   | Samba    = OFFLINE  | Webmin    = ONLINE    │
  │  Ethernet0  = ONLINE  | Ethernet1 = N/A     | Wlan0    = N/A        │
  │                                                                     │
  │  PIAF Installed Version   = 2.0.6.4 under *HARDWARE*                │
  │  FreePBX Version          = 2.11.0.23                               │
  │ 2.11                                                                │
  │  Running Asterisk Version = 11.5.1                                  │
  │  Asterisk Source Version  = 11.5.1                                  │
  │  Dahdi Source Version     = 2.7.0.1                                 │
  │  Libpri Source Version    = 1.4.14                                  │
  │  IP Address               = 192.168.XX.YY on eth0                   │
  │  Operating System         = CentOS release 6.4 (Final)              │
  │  Kernel Version           = 2.6.32-358.6.2.el6.i686 - 32 Bit        │
  └─────────────────────────────────────────────────────────────────────┘

New:
Code:
  ┌───────────────────SYSTEM INFORMATION *VERIFIED*─────────────────────┐
  │  Asterisk  = ONLINE   | Zap/Dahdi = UNKNOWN  | MySQL    = ONLINE    │
  │  SSH        = ONLINE  | Apache    = ONLINE   | Iptables  = ONLINE   │
  │  Fail2ban  = ONLINE   | Internet  = ONLINE   | Ip6Tables = ONLINE   │
  │  Disk Free  = ADEQUATE| Mem Free  = ADEQUATE | NTPD      = ONLINE   │
  │  SendMail  = ONLINE   | Samba    = OFFLINE   | Webmin    = ONLINE   │
  │  Ethernet0  = ONLINE  | Ethernet1 = N/A      | Wlan0    = N/A       │
  │                                                                     │
  │  PIAF Installed Version   = 3.6.5 under *HARDWARE*                  │
  │  FreePBX Version          = 2.11.0.23                               │
  │ 2.11                                                                │
  │  Running Asterisk Version = 11.5.1                                  │
  │  Asterisk Source Version  = 11.5.1                                  │
  │  Zap/Dahdi Source Version = N/A                                     │
  │  Libpri Source Version    = 1.4.14                                  │
  │  IP Address               = 192.168.XX.YY on eth0                   │
  │  Operating System         = PBX in a Flash release 3.6.5 (PIAF3)    │
  │  Kernel Version           = 2.6.32-431.5.1.el6.i686 - 32 Bit        │
  └─────────────────────────────────────────────────────────────────────┘

I made four scripts and #2 seems to be re-compiling Dahdi, so I'm not sure what is going on.

I'm not certain it matters since I'm not (AFAIK) using Dahdi, everything is SIP on my setup (except the IAX modems for IncrediFAX).

Should I try re-running the Dahdi compile script?
 

brunopbx

New Member
Joined
May 25, 2013
Messages
7
Reaction score
0
as I use a few commercial plugins of schmooze and there is the warning in the beginning of the thread , is there already news from schmooze that it is ok to migrate from PIAF 2.0.6.4 to 3.6.5 and if not could schmooze please react ?

thank you,
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,199
Reaction score
5,218
Dahdi has gone from "ONLINE" to "UNKNOWN" in the system info...

Should I try re-running the Dahdi compile script?

If you've read the Nerd Vittles tutorial and completed the migration steps from CentOS 6.x to PIAF 3.6.5 but still are having problems:

1. Check in /usr/src and verify the name of your dahdi directory.

2. Reported below that you may first want to:

Code:
cd /usr/src/asterisk
./configure

3. Also see this post first if you're migrating from CentOS 6.4!

4. Then manually change to the /usr/src/dahdi directory (or wherever your dahdi directory happens to be) and run the remaining commands:

Code:
cd /usr/src/dahdi
make all
make install
service dahdi start

5. Then check status again to see where you are.
 

mbellot

Active Member
Joined
Dec 15, 2008
Messages
406
Reaction score
187
Ward - Thanks for the reply, but I get an error in the make all command and everything else fails from there...

It looks like there is some variable or constant re-definition happening.

Code:
root@pbx:/usr/src $ ls
asterisk            currtime                  iaxmodem-1.2.0         odbc-init
asterisk-flite      dahdi                     iaxmodem-1.2.0.tar.gz  piafpatch
asterisk-perl-0.10  debug                     kernels                spandsp
avantfax-3.3.3      freepbx                   libpri
avantfax-3.3.3.tgz  hylafax_mod-1.8.2.wbm.gz  mod_wsgi
root@pbx:/usr/src $ cd dahdi
root@pbx:/usr/src/dahdi $ make all
make -C linux all
make[1]: Entering directory `/usr/src/dahdi/linux'
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory `/usr/src/dahdi/linux/drivers/dahdi/firmware'
make[2]: Leaving directory `/usr/src/dahdi/linux/drivers/dahdi/firmware'
make -C /lib/modules/2.6.32-431.5.1.el6.i686/build M='/usr/src/dahdi/linux/drivers/dahdi/oct612x'
make[2]: Entering directory `/usr/src/kernels/2.6.32-431.5.1.el6.i686'
  Building modules, stage 2.
  MODPOST 0 modules
make[2]: Leaving directory `/usr/src/kernels/2.6.32-431.5.1.el6.i686'
make -C /lib/modules/2.6.32-431.5.1.el6.i686/build SUBDIRS=/usr/src/dahdi/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[2]: Entering directory `/usr/src/kernels/2.6.32-431.5.1.el6.i686'
  CC [M]  /usr/src/dahdi/linux/drivers/dahdi/dahdi-base.o
In file included from /usr/src/dahdi/linux/drivers/dahdi/dahdi-base.c:66:
/usr/src/dahdi/linux/include/dahdi/kernel.h:1407: error: redefinition of âPDE_DATAâ
include/linux/proc_fs.h:328: note: previous definition of âPDE_DATAâ was here
make[3]: *** [/usr/src/dahdi/linux/drivers/dahdi/dahdi-base.o] Error 1
make[2]: *** [_module_/usr/src/dahdi/linux/drivers/dahdi] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.32-431.5.1.el6.i686'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/dahdi/linux'
make: *** [all] Error 2
root@pbx:/usr/src/dahdi $ make install
make -C linux all
make[1]: Entering directory `/usr/src/dahdi/linux'
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory `/usr/src/dahdi/linux/drivers/dahdi/firmware'
make[2]: Leaving directory `/usr/src/dahdi/linux/drivers/dahdi/firmware'
make -C /lib/modules/2.6.32-431.5.1.el6.i686/build M='/usr/src/dahdi/linux/drivers/dahdi/oct612x'
make[2]: Entering directory `/usr/src/kernels/2.6.32-431.5.1.el6.i686'
  Building modules, stage 2.
  MODPOST 0 modules
make[2]: Leaving directory `/usr/src/kernels/2.6.32-431.5.1.el6.i686'
make -C /lib/modules/2.6.32-431.5.1.el6.i686/build SUBDIRS=/usr/src/dahdi/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[2]: Entering directory `/usr/src/kernels/2.6.32-431.5.1.el6.i686'
  CC [M]  /usr/src/dahdi/linux/drivers/dahdi/dahdi-base.o
In file included from /usr/src/dahdi/linux/drivers/dahdi/dahdi-base.c:66:
/usr/src/dahdi/linux/include/dahdi/kernel.h:1407: error: redefinition of âPDE_DATAâ
include/linux/proc_fs.h:328: note: previous definition of âPDE_DATAâ was here
make[3]: *** [/usr/src/dahdi/linux/drivers/dahdi/dahdi-base.o] Error 1
make[2]: *** [_module_/usr/src/dahdi/linux/drivers/dahdi] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.32-431.5.1.el6.i686'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/dahdi/linux'
make: *** [all] Error 2
root@pbx:/usr/src/dahdi $
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,199
Reaction score
5,218
Didn't see this in our test builds. Not that it helps you, but others (kenn10 above) have successfully performed the update. Just curious. Was your DAHDI setup customized for a particular card or device??
 

mbellot

Active Member
Joined
Dec 15, 2008
Messages
406
Reaction score
187
Didn't see this in our test builds. Not that it helps you, but others (kenn10 above) have successfully performed the update. Just curious. Was your DAHDI setup customized for a particular card or device??

Nope, I'm not using Dahdi at all.

Everything in my setup is SIP (Cisco 1760 with 2FXS, Polycom 501, Voip.ms trunks, etc), which is probably why I haven't had any ill effects.
 

mbellot

Active Member
Joined
Dec 15, 2008
Messages
406
Reaction score
187
As reported previously, I have successfully converted a fresh 32bit hardware PIAF 2.0.6.4 install to PIAF 3.6.5 using these scripts. Zero issues.

So it's possible, which is what I pretty much expected.

But does anyone have any idea how to fix the Dahdi compile issue?


EDIT:

Google to the rescue!

It appears the problem may be switching from CentOS 6.4 to SciLi 6.5 as the underlying OS.

I found this and this.

Editing the kernel.h file as shown in the first link got rid of the error, allowed compilation to complete and after a make install and service dahdi start now my Dahdi status is "ONLINE".
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
Ward, where's the guide to converting to RHEL? :hat:

Oh, this one is a better RedHat: :alucard:
 

darmock

PIAF Developer
Joined
Oct 18, 2007
Messages
2,892
Reaction score
98
I think we will leave that to the commercial guys..... Course if red hat wants to give us some free licenses.............

:rolleyes:
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,199
Reaction score
5,218
Just so we'll have it. Moving from CentOS 6.4 to SL 6.5 and on to PIAF 3.6.5, make the following change before recompiling DAHDI:
Code:
I don't know if is the right way to solve it but in the:
 
nano -w /usr/src/dahdi/linux/include/dahdi/kernel.h
 
I commented out these lines:
 
/*static inline void *PDE_DATA(const struct inode *inode)
{
        return PDE(inode)->data;
}
*/
 
then make and make install work.
 
I think the problem is there is similar declaration on the linux-kernel
source, file:
 
/usr/src/kernels/2.6.32-431.el6.x86_64/include/linux/proc_fs.h
 
Regards
Bakko
 

jeff.h

Guru
Joined
Dec 1, 2010
Messages
502
Reaction score
71
I am happy to report after 3 days and several hundred calls that I have had zero issues across 4 Foxconn boxes I have in production. Not one user made any comments or remarks about any change in quality and I have a few that could complain about free money :rolleyes: :D
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,777
Reaction score
2,190
I handled the error with DAHDI by going to /usr/src/asterisk and doing a ./configure first. Then the second script ran without further issue. Prior to that, I also had the same problem with the second script bombing out.
 

mbellot

Active Member
Joined
Dec 15, 2008
Messages
406
Reaction score
187
I handled the error with DAHDI by going to /usr/src/asterisk and doing a ./configure first. Then the second script ran without further issue. Prior to that, I also had the same problem with the second script bombing out.

Thanks for this! I may give it a shot by reverting my edit to the Dahdi kernel.h file.
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,777
Reaction score
2,190
A second happy conversion on my little Revo1600 system. I went from 20645. I had to do the ./configure in the /usr/src/asterisk directory prior to running the second script. After that, all went flawlessly.

PIAF 20645 Before.JPGRevo1600 After.JPG
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,199
Reaction score
5,218
A second happy conversion on my little Revo1600 system. I went from 20645. I had to do the ./configure in the /usr/src/asterisk directory prior to running the second script. After that, all went flawlessly.

Based upon your testing, we're changing the instructions to add the ./configure step. Thanks.
 

mbellot

Active Member
Joined
Dec 15, 2008
Messages
406
Reaction score
187
A second happy conversion on my little Revo1600 system. I went from 20645. I had to do the ./configure in the /usr/src/asterisk directory prior to running the second script. After that, all went flawlessly.

Hmmm....

I tried that (running ./configure in /usr/src/asterisk) after reverting the edit I previously made and I still get the same error.

I even went so far as to do a make clean in dahdi, then ./configure in asterisk and another make all in dahdi, but still the same result.

I noticed that your Dahdi version changed between before (2.7.0.1) and after (2.9.0), but mine stayed consistent at 2.7.0.1 through the migration process.

Did you manually upgrade Dahdi, or should it have upgraded as part of step 1?
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,777
Reaction score
2,190
Yes. I downloaded and extracted the new DAHDI and renamed the new directory to "dahdi" prior to doing the rest. I did not make or install it. I would not expect that to have affected the kernel version that the procedure was pointing at, but who knows.

On my other system that was a Foxconn running PIAF 20631, I got the same error with the scripts. Without changing anything, the ./configure worked on that system. The code above:

Code:
/*static inline void *PDE_DATA(const struct inode *inode)
{
        return PDE(inode)->data;
}
*/

Was not found in my kernel.h on that system.

I do the ./configure anytime I have new versions of Dahdi so I am just used to doing that when we muck about with it.

Hmmm. In retrospect, both of these systems have had Dahdi hardware on them and you said yours did not. I wonder if that makes any difference?
 

darmock

PIAF Developer
Joined
Oct 18, 2007
Messages
2,892
Reaction score
98
Hmm I dont think I have updated dahdi to the latest and greatest and need to test it prior to making it part of our recommended install..... Just not enough hours in the day.... I wonder if the problems are related to 2.9.x dahdi or not?


Tom
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,777
Reaction score
2,190
I wonder if the problems are related to 2.9.x dahdi or not?
Tom

I don't think Dahdi 2.9.x is related as my system with 2.7 Dahdi had the same issues when I did the conversion.
 

Members online

No members online now.

Forum statistics

Threads
25,809
Messages
167,745
Members
19,239
Latest member
dbradford
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top