
Apache 1.3 - won't start - semctl(IPC_SET) error
I'm having problems getting Apache 1.3 working on my system and I've
read everything I could find in the Apache distribution and on their
Web site and haven't been able to figure it out yet so I was hoping
someone here would have some idea as to what to try next.
==============================
BRIEF DESCRIPTION OF PROBLEM:
==============================
I downloaded the source distribution from Apache and followed all of
the instructions for compiling and installing it and everything seemed
to work fine. When I start Apache with
'/usr/local/apache/sbin/apachectl start' or
'/usr/local/apache/sbin/httpd' no error messages are printed but when
I check what's running with 'ps -e' httpd isn't running. The
following error message appears in /usr/local/apache/var/log/error_log
for each time I try to start apache:
semctl(IPC_SET): Bad address
If I check the status of the semaphores with 'ipcs' I see one
semaphore for each failed start attempt (so this output shows only one
failed attempt...):
IPC status from /dev/kmem as of Wed Jul 8 15:40:51 1998
T ID KEY MODE OWNER GROUP
Message Queues:
Shared Memory:
Semaphores:
s 30 0x00000000 --ra------- root sys
The only way to get rid of these rouge semaphores seems to be 'ipcrm
-s'
There are only two things I could find looking through the apache
README and INSTALL and other files that seemed related to the error
message. The first is a snippet from the httpd.conf.default file:
# User/Group: The name (or #number) of the user/group to run httpd as.
# On SCO (ODT 3) use User nouser and Group nogroup
# On HPUX you may not be able to use shared memory as nobody, and the
# suggested workaround is to create a user www and use that user.
# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
# when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems!
The other was in the file src/Configuration. It was the only other
thing I could find that I didn't know what it did so...:
#
# IRIXN32:
# If you are running a version of IRIX and Configure detects
# n32 libraries, it will use those instead of the o32 ones.
#
Rule IRIXN32=yes
See below for more details on what I've tried so far.
============
THE DETAILS:
============
Now, some more details about what I did and my system configuration.
My system is:
IRIX 6.2 IP22
Using gcc 2.8.1 and gnu make 3.76.1
64MB RAM, plenty of free disk space
To compile and install apache I downloaded the source distribution
from their Web site and un-tarred it into /usr/src. Then I followed
the APACI instructions:
% cd /usr/src/apache_1.3.0
% ./configure
Configuring for Apache, Version 1.3.0
+ Warning: Configuring Apache with default settings.
+ This is probably not what you really want.
+ Please read the README.configure and INSTALL files
+ first or at least run './configure --help' for
+ a compact summary of available options.
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for SGI IRIX platform
+ setting C compiler to gcc
+ adding selected modules
+ doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/main
Creating Makefile in src/ap
Creating Makefile in src/regex
Creating Makefile in src/os/unix
Creating Makefile in src/modules/standard
% make
<gcc does its thing. a bunch of files are compiled. there are no
errors but the warning:
ld: WARNING 84: ../ap/libap.a is not used for resolving any symbol.
appears three times near the end of the compiliation>
% make install
<says it's making directories and copying things - no warnings or
errors - gives the friendly "you're now ready to use apache" dialog at
the end>
that process put everything in /usr/local/apache which I looked
through thoroughly and everything seemed in place.
When I tried to start httpd I kept getting the semctl message in
var/log/error_log as described above. I recompiled a number of times,
I changed IRIXN32=yes to IRIXN32=no, I did a 'make clean', but I kept
ending up with the semctl(IPC_SET): Bad address error.
By intentionally compiling apache with incorrect directory locations
for my configuration I determined that the semctl error happens after
it has read the .conf files.
At this point, I thought that the error message had to do with the
User and Group directives in my httpd.conf file because the uid and
gid of the user and group nobody on my machine is 60001.
# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
# when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems!
I created a new user and group called "apached" to use. In
/etc/passwd I put:
apached:x:666:666:Apache daemon:/dev/null:/dev/null
and in /etc/group I put:
apached::666:
The I edited httpd.conf:
User apached
Group apached
Still I got the semctl(IPC_SET) error message. I'm pretty much at a
loss at this point. I have apache 1.2.4 in /usr/local/etc/httpd which
is still working and I downloaded and compiled it on this same system
a few months ago so I'm guessing something changed between 1.2.4 and
1.3 that caused this error to arise. Also in 1.2.4 I was using User
nobody Group nobody in my httpd.conf file and it worked fine. Anyway,
if anyone has any ideas I'd really appreciate it.
-=-=-=-=-=-=-=-=- mailto:ega...@gmu.edu -=-=-=-=--=-=-=-=-=-
Erik Gault, Assistant Systems Engineer
George Mason University, Instructional Resource Center (IRC)
Voice: 703-993-2778 Fax: 703-993-3162
=-=-=-=-=-=-=-=-= http://www.**-**.com/ =-=-=-=-=-=-=-=-=-=