You probably shouldn't be running AOLserver as 'nobody'; create a real
username and group to run it as.
You can start AOLserver while you're root and it'll open up priviledged
ports, but it will then switch to the username/group you specify. So the
entire installation tree should be owned by the username/group that it
runs as, including the log files.
The segfault sounds like a bug. You're starting it as root, so it should
have access to the priviledged port to open. Since I haven't heard
anyone else getting this segfault with 3.4, I suspect it's a problem
specific to AOLserver on FreeBSD 5.0.
You can report the bug to the AOLserver project at SourceForge.net, or
you can find the problem and fix it. The segfault is probably happening
in nsmain.c. You can use GDB to run nsd and do a 'backtrace' after the
segfault to find out where it's occuring. Here's an example gdb session
I ran a while back for a similar problem:
[root@i]# gdb /p/d/emis_test2/bin/nsd
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) run -u daemon -g daemon -t /p/d/emis_test2/nsd.tcl -s emis
Starting program: /p/d/emis_test2/bin/nsd -u daemon -g daemon -t
/p/d/emis_test2/nsd.tcl -s emis
[New Thread 1024 (runnable)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (runnable)]
0x401498e7 in _nss_files_getgrnam_r (name=0x0, result=0x40141164,
buffer=0x810a9b0 "root", buflen=1024, errnop=0x4013fd60) at
nss_files/files-grp.c:35
35 nss_files/files-grp.c: No such file or directory.
(gdb) bt
#0 0x401498e7 in _nss_files_getgrnam_r (name=0x0, result=0x40141164,
buffer=0x810a9b0 "root", buflen=1024, errnop=0x4013fd60) at
nss_files/files-grp.c:35
#1 0x400df3bb in __getgrnam_r (name=0x0, resbuf=0x40141164,
buffer=0x810a9b0 "root", buflen=1024, result=0xbfffe5a4) at
../nss/getXXbyYY_r.c:182
#2 0x400deb40 in getgrnam (name=0x0) at ../nss/getXXbyYY.c:123
#3 0x806abf2 in Ns_GetGid (group=0x0) at id.c:104
#4 0x806e836 in Ns_Main (argc=9, argv=0xbffff884, initProc=0x806cbe8
<ServerInit>) at nsmain.c:315
#5 0x806cbe2 in main (argc=9, argv=0xbffff884) at main.c:64
#6 0x400679cb in __libc_start_main (main=0x806cbc0 <main>, argc=9,
argv=0xbffff884, init=0x805afd0 <_init>, fini=0x80e38dc <_fini>,
rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffff87c) at
../sysdeps/generic/libc-start.c:92
(gdb)
You'll need to use gdb's 'directory' command to point to the aolserver
sources, so it can tell you the routine names etc. You can find the
manual at http://www.gnu.org/manual/gdb-4.17/gdb.html.
When you fix it, please submit the fix to AOLserver at SourceForge.net.
/s.
-----Original Message-----
From: AOLserver Discussion [mailto:[EMAIL PROTECTED]] On Behalf
Of Michael C. Urban
Sent: Monday, June 25, 2001 7:14 AM
To: [EMAIL PROTECTED]
Subject: [AOLSERVER] Segfaults when running on port 80
Hello,
I am trying to run AOL Server 3.4 on FreeBSD 5.0. After following the
suggestions given by another user in this forum, I was able to get it to
build. However, I know have the following problems:
The first is a persmissions problem having to do with not being able to
write to the logs unless they are owned by the user "nobody" who I am
trying to run the server as. This doesn't seem correct that the logs
should have to be owned by "nobody".
The second is that the server segfaults and dies when I try to run in on
port 80, but it will run on port 8000. This seems to be a problem
related to not running it as root, but I am starting it as root using
the procedure given. Here is the exact command line I am using to start
the server after having done an "su" to root:
./nsd8x -f -t ../sample-config.tcl -u nobody -g nobody
I am of course, issuing this command from the /usr/local/aolserver/bin
directory and I have made the required changes to the sample-config.tcl
file to have it run on port 80 and such.
Anyone have any ideas on why it seems to be segfaulting on port 80 but
not on port 8000? Also on why the logs and such have to be owned by
"nobody" for it to be able to do any logging? It would seem it is not
starting properly or something, since as soon as it switches to the user
"nobody" it is loosing it's root privilages?
Thank you for your help,
Michael C. Urban