Asterisk dead but subsys locked - help

Hi

I need help with asterisk.
I am installing asterisk 11 on a CentOS 32 bits and I have a problem when I check status of the service
It returns says "asterisk dead but subsys locked"
I have no idea of what is going on. I already reinstalled from scratch. Even the 1.8 gives same problem.
The worst part is that I have no asterisk log file created so I could check what is wrong.
I have no files under /var/run/asterisk. I even deleted this folder so it could be recreated.

I compiled asterisk and installed with sample files.

And I disabled SELINUX

Again this is a standard asterisk installation on a standard centos 6.4 32 bits

This is not the first installation I make. It should work.
Any idea what might be causing that?

I can’t find that text anywhere in Asterisk. Are you sure that you have quoted it accurately, including capitalisation. Otherwise, I assume it comes from the package, and not from the official Asterisk.

At a guess, you have a deadlock, in which case you need to google “asterisk wiki backtrace” and follow the instructions there. As you are using a package, you may need to rebuild from source, to enable the debugging options. If the package was created outside of Digium, you should follow this up with the packager.

Check /var/lock/subsys. There’s probably an orphaned ‘asterisk’ file there. The message comes from the init script.

@david55 - as you can see captalization is okay, the - help is on me.
I compiled the package after I ran the command

[quote][root@CentOS-64-32-minimal asterisk-11.5.1]# service asterisk start
Starting asterisk:
[root@CentOS-64-32-minimal asterisk-11.5.1]# service asterisk status
asterisk dead but subsys locked
[root@CentOS-64-32-minimal asterisk-11.5.1]# ls -la /var/run/asterisk/
total 8.0K
drwxr-xr-x 2 asterisk asterisk 4.0K Sep 11 12:00 .
drwxr-xr-x 21 root root 4.0K Sep 11 17:39 …
[root@CentOS-64-32-minimal asterisk-11.5.1]# ls -la /var/lock/subsys
total 8.0K
drwxr-xr-x 2 root root 4.0K Sep 11 17:48 .
drwxrwxr-x 4 root lock 4.0K Sep 23 2011 …
-rw-r–r-- 1 root root 0 Sep 11 15:24 acpid
-rw-r–r-- 1 root root 0 Sep 11 17:49 asterisk
-rw-r–r-- 1 root root 0 Sep 11 15:24 auditd
-rw-r–r-- 1 root root 0 Sep 11 15:24 blk-availability
-rw-r–r-- 1 root root 0 Sep 11 15:24 crond
-rw-r–r-- 1 root root 0 Sep 11 15:24 httpd
-rw-r–r-- 1 root root 0 Sep 11 16:29 ip6tables
-rw-r–r-- 1 root root 0 Sep 11 16:51 iptables
-rw-r–r-- 1 root root 0 Sep 11 15:24 local
-rw-r–r-- 1 root root 0 Sep 11 15:24 lvm2-monitor
-rw-r–r-- 1 root root 0 Sep 11 15:24 mdmonitor
-rw-r–r-- 1 root root 0 Sep 11 15:24 mysqld
-rw-r–r-- 1 root root 0 Sep 11 15:24 netfs
-rw-r–r-- 1 root root 0 Sep 11 15:24 network
-rw-r–r-- 1 root root 0 Sep 11 15:24 openvpn
-rw-r–r-- 1 root root 0 Sep 11 15:24 postfix
-rw------- 1 root root 0 Sep 11 15:24 rsyslog
-rw-r–r-- 1 root root 0 Sep 11 15:24 sshd
-rw-r–r-- 1 root root 0 Sep 11 15:24 webmin
[root@CentOS-64-32-minimal asterisk-11.5.1]# rm -f /var/lock/subsys/asterisk
[root@CentOS-64-32-minimal asterisk-11.5.1]# service asterisk restart
Stopping safe_asterisk: [ OK ]
Shutting down asterisk: [FAILED]
Starting asterisk:
[root@CentOS-64-32-minimal asterisk-11.5.1]# service asterisk status
asterisk dead but subsys locked
[root@CentOS-64-32-minimal asterisk-11.5.1]# ls -la /var/log/asterisk/
total 20K
drwxr-xr-x 5 asterisk asterisk 4.0K Sep 11 12:00 .
drwxr-xr-x 9 root root 4.0K Sep 11 16:55 …
drwxr-xr-x 2 asterisk asterisk 4.0K Sep 11 12:00 cdr-csv
drwxr-xr-x 2 asterisk asterisk 4.0K Sep 11 12:00 cdr-custom
drwxr-xr-x 2 asterisk asterisk 4.0K Sep 11 12:00 cel-custom
[root@CentOS-64-32-minimal asterisk-11.5.1]#
[/quote]

@gtj0 -> even after I deleted the asterisk in the subsys folder it won’t start.
This is really strange, it is the first time I’ve seen it.

As I can’t find the message, I suspect it is something that has been added by the packager, not part of hte official Asterisk. However, my guess is that the immediate cause is the presence of the lock file combined with a failure to get Asterisk to respond in some way (maybe shut down).

Removing the lock file is only going to confuse things, in that case, as if Asterisk weren’t actually running, the normal logic for checking lock files would detect that and ignore the lock file.

On the evidence available, you need to debug this as a deadlock. This means you will need binaries built with thread debugging and no optimise options set.