This Question is Possibly Answered

1 "correct" answer available (5 pts) 2 "helpful" answers available (1 pts)
3 Replies Last post: Sep 22, 2008 11:07 PM by joegen  
  5 posts since
Sep 17, 2008

Sep 20, 2008 1:39 AM

Running Opensbc as non-root user


Hi. Does anybody have tried to run opensbc with -u and -g command line switches?

I tried but I'm getting the following error:

sftswmty01:/usr/src# /usr/src/opensbc/obj_linux_x86_r/opensbc -u opensbc -g opensbc -d -p /var/run/opensbc/opensbc.pid
Daemon started with pid 2157
sftswmty01:/usr/src#
Message from syslogd@sftswmty01 at Sat Sep 20 00:34:38 2008 ...
sftswmty01 OpenSBC[2156]: Starting service process "OpenSBC" v1.1.5-11
2008/09/20 00:34:38.053 PWL: [CID=0x0000] PWLib Assertion fail: Null pointer reference, file Logger.cxx, line 458, Error=9

Message from syslogd@sftswmty01 at Sat Sep 20 00:34:38 2008 ...
sftswmty01 OpenSBC[2157]: Could not open file /root/OpenSIPStack/OpenSBC_data/logs//b2bua-2008-09-20-2157.log for logging

Message from syslogd@sftswmty01 at Sat Sep 20 00:34:38 2008 ...
sftswmty01 OpenSBC[2157]: Assertion fail: Null pointer reference, file Logger.cxx, line 458, Error=9


Any tip?

Regards

Click to view joegen's profile   519 posts since
Apr 28, 2007
1. Sep 22, 2008 9:11 PM in response to: acruz
Re: Running Opensbc as non-root user
Hi,

Sorry for the late response. Just create a folder under your $HOME/OpenSIPStack and give your user read/write permission to it. In your case it is /root/OpenSIPStack

Joegen

{quote:title=acruz wrote:}{quote}

Hi. Does anybody have tried to run opensbc with -u and -g command line switches?

I tried but I'm getting the following error:

sftswmty01:/usr/src# /usr/src/opensbc/obj_linux_x86_r/opensbc -u opensbc -g opensbc -d -p /var/run/opensbc/opensbc.pid
Daemon started with pid 2157
sftswmty01:/usr/src#
Message from syslogd@sftswmty01 at Sat Sep 20 00:34:38 2008 ...
sftswmty01 OpenSBC[2156]: Starting service process "OpenSBC" v1.1.5-11
2008/09/20 00:34:38.053 PWL: [CID=0x0000] PWLib Assertion fail: Null pointer reference, file Logger.cxx, line 458, Error=9

Message from syslogd@sftswmty01 at Sat Sep 20 00:34:38 2008 ...
sftswmty01 OpenSBC[2157]: Could not open file /root/OpenSIPStack/OpenSBC_data/logs//b2bua-2008-09-20-2157.log for logging

Message from syslogd@sftswmty01 at Sat Sep 20 00:34:38 2008 ...
sftswmty01 OpenSBC[2157]: Assertion fail: Null pointer reference, file Logger.cxx, line 458, Error=9


Any tip?

Regards

Click to view joegen's profile   519 posts since
Apr 28, 2007
3. Sep 22, 2008 11:07 PM in response to: acruz
Re: Running Opensbc as non-root user
Try running opensbc with -f switch and point it to a preexisting directory which your user has read/write access to.

./opensbc -f /root/OpenSIPStack/OpenSBC_data

if that does not work for you please resend your log.

Joegen

{quote:title=acruz wrote:}{quote}

Hi. I had already made that part:

sftswmty01:/home/opensbc# ls -la
total 28
drwxr-xr-x 3 opensbc opensbc 4096 2008-09-19 22:49 .
drwxr-xr-x 7 root root 4096 2008-09-19 22:22 ..
-rw------- 1 opensbc opensbc 308 2008-09-20 00:27 .bash_history
-rw-r--r-- 1 opensbc opensbc 220 2008-09-19 22:22 .bash_logout
-rw-r--r-- 1 opensbc opensbc 414 2008-09-19 22:22 .bash_profile
-rw-r--r-- 1 opensbc opensbc 2227 2008-09-19 22:22 .bashrc
drwxr-xr-x 3 opensbc opensbc 4096 2008-09-19 22:49 OpenSIPStack

But it seems that the problem is with the "opensbc" binary, I guess the opensbc is looking for the env variable HOME and it is because is trying to look for the config and log files at the root directory.

Is this a bug?

Regards