Jump to content

Service doesn't start up on Ubuntu


cmrabet
 Share

Recommended Posts

I'm trying to install PBXnSIP siervice into Ubuntu Server 8.10 64 bits.

 

I followed the wiki but I can't make the service to start.

 

I created the SH script, and I stored the executable under /usr/local/pbxnsip, with the US voices files, and when doing:

 

/etc/init.d/pbxnsip -restart

 

It just shows: Starting process...

 

And then it returns me to the command line without any error message. However when I do:

 

ps -A

 

No PBXnSIP process is loaded, either way when trying to test using http://localhost

 

Can anyone help me please?

 

Thanks and regards.

Link to comment
Share on other sites

I'm trying to install PBXnSIP siervice into Ubuntu Server 8.10 64 bits.

 

I followed the wiki but I can't make the service to start.

 

I created the SH script, and I stored the executable under /usr/local/pbxnsip, with the US voices files, and when doing:

 

/etc/init.d/pbxnsip -restart

 

It just shows: Starting process...

 

And then it returns me to the command line without any error message. However when I do:

 

ps -A

 

No PBXnSIP process is loaded, either way when trying to test using http://localhost

 

Try to start it manually, then set the log to write to a file, and check for error messages. Maybe there is a port that cannot be allocated. Or just "chmod a+x" missing on a file.

Link to comment
Share on other sites

Try to start it manually, then set the log to write to a file, and check for error messages. Maybe there is a port that cannot be allocated. Or just "chmod a+x" missing on a file.

 

In /usr/local/pbxnsip and as root I tryied:

 

./pbxctrl --dir /usr/local/pbxnsip/ --config /usr/local/pbxnsip/config.xml --log log.file

 

Again I was returned to the prompt line without any message, but when I went to look for "log.file" I couldn't find it, it wasn't created.

 

My structure is the following:

 

root@ITE-Server:/usr/local/pbxnsip# ls -l

total 7980

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 acds

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 attendants

drwxr-xr-x 2 root root 20480 2008-11-25 17:48 audio_en

drwxr-xr-x 2 root root 20480 2008-11-25 17:48 audio_sp

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 callingcards

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 conferences

-rw-r--r-- 1 root root 5767 2008-11-26 10:37 config.xml

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 dial_plan

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 dial_plan_entry

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 domain_alias

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 domains

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 extensions

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 hoots

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 hunts

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 ivrnodes

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 mohs

-rwxr-xr-x 1 root root 8016988 2008-11-25 17:48 pbxctrl

-rw-r--r-- 1 root root 7413 2008-11-26 10:37 pbx.xml

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 pnp_parms

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 recordings

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 srvflags

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 trunks

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 user_alias

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 users

drwxr-xr-t 2 root root 4096 2008-11-26 10:37 wipers

root@ITE-Server:/usr/local/pbxnsip#

 

And my script is:

 

#!/bin/bash

 

PBXEXE=/usr/local/pbxnsip/pbxctrl

PBXDIR=/usr/local/pbxnsip

 

#Service script for the pbxnsip PBX:

case "$1" in

start)

echo -n "Starting pbxnsip daemon"

$PBXEXE --dir $PBXDIR || return=$rc_failed

echo -e "$return"

;;

stop)

echo -n "Shutting down pbxnsip daemon:"

killall $PBXEXE || return=$rc_failed

echo -e "$return"

;;

restart)

$0 stop && $0 start || return=$rc_failed

;;

status)

echo -n "Checking for service pbxnsip: "

checkproc /usr/sbin/pbxnsip && echo OK || echo No process

;;

*)

echo "Usage: $0 {start|stop|status|restart}"

exit 1

esac

 

# Inform the caller not only verbosely and set an exit status.

test "$return" = "$rc_done" || exit 1

exit 0

Link to comment
Share on other sites

Try this:

 

./pbxctrl --dir /usr/local/pbxnsip/ --config config.xml --log log.file --no-daemon

 

Ok, now I got some interesting messages on screen (still no log.file created):

 

[0] 20081126115405: License: Need either a MAC address or a IP address

[0] 20081126115405: Last message repeated 2 times

[0] 20081126115405: Could not bind socket to port 80 on IP 0.0.0.0

[0] 20081126115405: FATAL: Could not open TCP port 80 for HTTP/HTTPS

 

a- We have bought the 10 Office vesion, I already have the License but I supossed that I will need to set in on the Administration windows under the web interface after the process is started not before. However this is not a FATAL error.

 

b- In this server we already have a Apache server on port 80 listening, so I guess this is why PBXnSIP can't bind there and open the port.

 

I tried this:

 

./pbxctrl --dir /usr/local/pbxnsip/ --config config.xml --log log.file --no-daemon --http-port 20000

 

And BINGO, it worked.

 

So I changed my script:

 

#!/bin/bash

 

PBXEXE=/usr/local/pbxnsip/pbxctrl

PBXDIR=/usr/local/pbxnsip

 

#Service script for the pbxnsip PBX:

case "$1" in

start)

echo -n "Starting pbxnsip daemon"

$PBXEXE --dir $PBXDIR --config config.xml --http-port 20000 || return=$rc_failed

echo -e "$return"

;;

stop)

echo -n "Shutting down pbxnsip daemon:"

killall $PBXEXE || return=$rc_failed

echo -e "$return"

;;

restart)

$0 stop && $0 start || return=$rc_failed

;;

status)

echo -n "Checking for service pbxnsip: "

checkproc /usr/sbin/pbxnsip && echo OK || echo No process

;;

*)

echo "Usage: $0 {start|stop|status|restart}"

exit 1

esac

 

# Inform the caller not only verbosely and set an exit status.

test "$return" = "$rc_done" || exit 1

exit 0

 

And now I have the PBXnSIP server ON and working without any problem, I access trought http://servername:20000

 

However I remember that under Windows even you had Apache listening on port 80, for PBXnSIP daemon this wasn't a problem in order to bind to port 80...

 

Regards.

Link to comment
Share on other sites

Doing a netstat -a I can see several "SIP" services listening..so I assume these are from PBXnSIP daemon. However I can't register a SIP phon which was working in a previous PBXnSIP installation (Ubuntu 8.04). I created a domain, and after that an extenision.

 

The extension was used to set up the phone for registering but it fails. Also under status->logfile I can't find any line talking about a SIP registration attemp.

 

Is there somethign I am missing?

 

Thanks and regards,

Link to comment
Share on other sites

So I changed my script:

 

You don't need to change the script. Just hit the save button, and the new port will be stored in the config file. Next time when it starts it will stick to the port that you specify in the web interface.

 

Windows seems to be more "tolerant" to these kind of problems. But the behavior is very erratic. Only one application should listen on one port IMHO.

Link to comment
Share on other sites

Doing a netstat -a I can see several "SIP" services listening..so I assume these are from PBXnSIP daemon. However I can't register a SIP phon which was working in a previous PBXnSIP installation (Ubuntu 8.04). I created a domain, and after that an extenision.

 

The extension was used to set up the phone for registering but it fails. Also under status->logfile I can't find any line talking about a SIP registration attemp.

 

I would kill everything listing on the SIP port to make sure there is no old stuff running. SIP runs actually on port 5060 UDP, 5060 TCP and 5061 TCP/TLS. The same ports are allocated for IPv4 and IPv6, so you might see six ports being allocated. That's fine. This is the way the IETF wants it!

Link to comment
Share on other sites

The extension was used to set up the phone for registering but it fails. Also under status->logfile I can't find any line talking about a SIP registration attemp.

 

Is there somethign I am missing?

 

Thanks and regards,

 

Please turn on the SIP logging.

How: Using Admin->Settings->Logging page, set "Log Level (0-9):" to '9', set "Log SIP events:" to 'yes' and "Log REGISTER:" to 'yes'.

Then try to REGISTER the phone. You will see the registration information on the Admin->Status->logfile page.

If you do not see anything on the log file page, then REGISTER message is not reaching the PBX.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...