Forum OpenACS Q&A: Daemontools problem with AOLserver

Collapse
Posted by Michael Olan on
I know there's been quite a lot of discussion on daemontools, but none seem quite like my problem. I installed it on slackware according to the OACS 4.6 instructions. When I create the link, it doesn't start aolserver. When I try starting with svc it can't seem to find some file:

# svc -o /service/oacs
svc: warning: unable to control /service/oacs: file does not exist

But... 

# ls /service
oacs
# ls -l /service
total 0
lrwxrwxrwx    1 root     root           21 Feb 22 21:59 oacs -> /home/myhome/web/oacs/
# ls /service/oacs
apm-workspace                     license.txt  oacs        run
bin                               log          packages    tcl
content-repository-content-files  nsd.tcl      readme.txt  www
Any idea what file it can't find?
Collapse
Posted by Tom Jackson on

What does your /service/oacs/run file look like?

If you are using the -it option to start the server in that file, change to -ft and then do a ./run to test it out first.

Also, what does 'svstat /service/oacs' give you?

Collapse
Posted by Jade Rubick on
Michael, I also ran into a bunch of permissions problems when installing. Eventually, I got it right by having another user who was in the web group. I su - otheruser, and then tried to get to the webserver's directories, run the scripts, etc.. There were a few directories I had to change in order to get it working correctly.
Collapse
Posted by Brian Fenton on
Michael, it can't find the /service/oacs/run file. Here's what mine looks like

#!/bin/sh
export NS_HOME="/apps/aol33"
export NS_DAEMON="nsd"

export ORACLE_BASE=/apps/oracle
export ORACLE_HOME=$ORACLE_BASE/product/8.1.6
export ORACLE_SID=ora816

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_PATH=$ORACLE_HOME/bin
export ORAENV_ASK=NO

export TNS_ADMIN=$ORACLE_HOME/network/admin
exec /apps/aol33/bin/nsd -izkt /apps/aol33/init.tcl -u oracle

Collapse
Posted by Michael Olan on
Tested ./run by itself, and it works fine. Here's the svstat result:
svstat /service/oacs
/service/oacs: unable to open supervise/ok: file does not exist
Collapse
Posted by Tom Jackson on

Sounds like a permission problem on /service/oacs

  1. What are the perms (ls -l on /service)
  2. What are the perms on the target of the sym link /service/oacs?
  3. What user are you trying to run this as?
Collapse
Posted by Michael Olan on
1. See earlier posting above
2. Same as 1
3. root, (since that failed I didn't go on the step of allowing other users)
Collapse
Posted by Brian Fenton on
It looks like something funny with your sym link. What's that oacs inside the first oacs? You don't have a recursive link by any chance, do you?
Collapse
Posted by Michael Olan on
Well, seems that was a recursive link. Its deleted now, but still no difference, same error.
Collapse
Posted by Mat Kovach on
what does

ps auxwww | grep proc

ps auxwww | grep svscan

and

pas auxwww | grep super

show?

Collapse
Posted by Brian Fenton on
What happens if you run run like this? /service/oacs/run
Collapse
Posted by Tom Jackson on

Well, for one thing, svc never created the supervise directory. Maybe for instance the run file doesn't have the right permissions or something. But one thing is for sure, Michael is getting a lot of advice, but not giving much information to help us out in diagnosing the problem. What is in the run file? Never said. Permissions? Who knows. Also, there is a log directory in the same directory as the run file. This usually creates a problem with svc, because it wants to create a second supervise process there. Maybe it is looking for the log/run file, and can't find that.

What I do is to create a directory structure like this:

/web
/web/oacs
/web/control
/web/control/oacs
/web/control/oacs/serverlog
/web/control/oacs/accesslog

;; then 

ln -s /web/control/oacs /service

One thing I am not clear on is how Michael linked the oacs directory in and yet, daemontools didn't auto-start the web service? Maybe svscan isn't even running? No info on that either, although asked for yesterday.

Collapse
Posted by Michael Olan on
I hope this is just about over. Tom was correct about svscan not running. Now it at least attempts to bring up the server. The bootstrap does not work however. The errors in the log are
Error: dbdrv: failed to load driver 'ora8'
[26/Feb/2003:18:21:32][16971.1024][-main-] Error: dbinit: no such default pool 'pool1'
[26/Feb/2003:18:21:32][16971.1024][-main-] Error: Server startup failed: Error during bootstrapping
[26/Feb/2003:18:21:32][16971.1024][-main-] Error: Error parsing queryfile /home/olanm/web/oacs/www/index-oracle.xql:
[26/Feb/2003:18:21:32][16971.1024][-main-] Error: Error parsing queryfile /home/olanm/web/oacs/www/index-postgresql.xql:
I vaguely remember having this once back in the ACS days, but don't recall the reason just now. Just in case its something obvious here's what is the current senario: Manual startup is ok:
/usr/local/aolserver/bin/nsd-oracle -t ~/web/oacs/nsd.tcl
svc -o /service/oacs startup results in the errors above. The run script contains:
#!/bin/sh

exec /usr/local/aolserver/bin/nsd-oracle -it /home/myhome/web/oacs/nsd.tcl -u mylogin -g web
Collapse
Posted by Jon Griffin on
You have a problem with the driver, probably permissions. I notice you are using the -u -g and they are different.

Did you apply my patches? If not you are running everything as web user.

Collapse
Posted by Tom Jackson on

Jon,

What are your patches? What do they do? I made some changes to nsmain.c to make sure that:

  • user is valid
  • group is valid
  • root group wasn't used (root user is already checked)
  • user in group, even if not the main group

I offered the patch to the core team (hmm, I'm on that) but it hasn't been applied.

Collapse
Posted by Jon Griffin on
The patches are on: http://sourceforge.net/tracker/index.php?func=detail&aid=509413&group_id=3152&atid=303152