Apache Fatal Error

No dice all the way around

Good news bad news. Its not SMP. I just rebuilt world using 4.10R-p15 GENERIC, same problem. The good news is that the /dev/null hack *does work*.

The above post dosnt work on FreeBSD, but this should:
Code:
#!/bin/sh
/usr/local/etc/rc.d/httpd.real $1 > /dev/null 2>&1
The only problem is that direct admin expects a failed/ok msg on std out so it hangs waiting. A refresh and its golden.

Also, a quick tidbit if anyone else is interested:
working (console) start:
Code:
chex# pstree -w -s http
-+= 00000 root (swapper)
 \-+= 00001 root /sbin/init --
   \-+= 00691 root /usr/sbin/httpd -k start -DSSL
    |--- 00695 apache /usr/sbin/httpd -k start -DSSL
     \--- 00696 apache /usr/sbin/httpd -k start -DSSL
dead directadmin start:
Code:
chex# pstree -w -s http
-+= 00000 root (swapper)
 \-+= 00001 root /sbin/init --
   \-+= 00806 root /usr/sbin/httpd -k start -DSSL
     |--- 00855 apache (httpd)
     \--- 00856 apache (httpd)
 
Last edited:
When Apache crashes and I try to restart it from the command line, I get an error in line 17 "SSLEngine" does not exist or something to that effect...anyone have a fix? seems to happen every day or couple of days that I have to reboot the entire server to get httpd running again

UPDATE here is the actual error message:

Syntax error on line 17 of /etc/httpd/conf/ips.conf:
Invalid command 'SSLEngine', perhaps mis-spelled or defined by a module not included in the server configuration
/usr/sbin/apachectl startssl: httpd could not be started
 
Last edited:
i assume your running redhat or some linux variant (not BSD)

do a /etc/init.d/httpd start and that should fix your problem. No need to reboot your entire server.

--Josh
 
do a /etc/init.d/httpd start and that should fix your problem. No need to reboot your entire server.

Is this a permanent solution? Or will I have to do this everytime httpd goes down and has a problem?
 
use my /dev/null fix and it should never happen again. this is still a hack mind you but its a more graceful hack as it keeps DA running as it should and still starts/stops the service on bootup/shutdown

--Josh
 
Socket operation on non-socket: apr_accept: (client socket)

So this has been bugging me for a few days, now...

The issue appears to be in directadmin's daemon mode. If you run DA in the foreground (or in the background) without the "d" flag, apache restarts fine.

So, the other fix is to write a wrapper script for directadmin and change the progbin variable in /etc/init.d/directadmin:

Code:
PROGBIN="/usr/local/directadmin/directadmin.sh"

and then make a directadmin.sh file that looks like

Code:
#!/bin/sh

/usr/local/directadmin/directadmin &> /usr/local/directadmin/da.out &

(or redirect to /dev/null if you like).

I believe as was mentioned previously that stderr is being closed by directadmin in daemon mode, so when apache spawns and tries to connect to that descriptor, it fails.

Sound plausible? Is the bug somewhere else (like apache)?
 
Sounds plausible

Its been so long I dont clearly remember, but Apache was dieing from a bad socket call on child spawn. ISTR that it was an IP socket call, but it might well have been local system. Which would explain the stdout/stderr thing.

If anyones interested I can go back and find exactly where it was terminating. There are only one or two spots where apache uses that exact socket/spawn call.
 
Well, my fix doesn't work when DA restarts apache for tallies or whatever (at 12:11:01).

I can only guess that whatever is restarting apache (dataskq? Another directadmin child?) is still closing a file descriptor.

I hate to hack in my initscripts...
 
Hello,

I was forwarded to this thread. Can someone just fill me in..

If I were to set the service restart scripts to use:

/usr/local/etc/rd.d/httpd restart > /dev/null 2> &1

Would that (based on the theory) fix the problem?

Also, does this only affect FreeBSD, and only Apache 2?

John
 
Yes, I believe that redirecting stdout and stderr in the service call should fix the problem.

I'm seeing it on Centos 3.3 tested under apache 2.0.52 and 2.0.53.

I think there is a very similar thread here from a user that is running apache 1.3.33 under linux, but I'm not positive it's the same issue.
 
Hello,

the dataskq doesn't read in any output from service restarts anyway, so I'll add the change for the next release.

John
 
I posted the dev/null redirect hack back in December and have been running fine with it ever since. :)

--Josh
 
Dev null hack

I originally implemented the hack back when I had the problem the first time. I forgot all about it until I upgraded to apache 2 and it overwrote the httpd file that redirected to httpd.real

Once I remembered this, I have not had a problem since...none of the other fixes seemed to work - (the kill-9 for example) or the updated httpd file

So basically if you implement it in the DA release, I wont have to redo it every time upgrade/rebuild DA
 
DirectAdmin Support said:
Hello,

I was forwarded to this thread. Can someone just fill me in..

If I were to set the service restart scripts to use:

/usr/local/etc/rd.d/httpd restart > /dev/null 2> &1

Would that (based on the theory) fix the problem?

Also, does this only affect FreeBSD, and only Apache 2?

John

RHEL 3 is also affected by this bug (running Apache2).
 
I found that bug myself.

However - its not an apache issue - its a cron issue.

I followed their instructions to reproduce the bug and proved that the this bug doesn't exist on my system.
 
Hope directadmin can solve the issue asap. I'm using freeBSD 4.8 and not so technical know how.

My server is totally down! All domains is now unaccessible after I upgrade to version 1.235.

Please assit me on how to solve the issue. Do I need to reboot the server physically? I can't even SSH it right now as the server is down.

Please help. My clients are complaining to me right now. I'm bombarding with complaints.
 
searching said:
Hope directadmin can solve the issue asap. I'm using freeBSD 4.8 and not so technical know how.

My server is totally down! All domains is now unaccessible after I upgrade to version 1.235.

Please assit me on how to solve the issue. Do I need to reboot the server physically? I can't even SSH it right now as the server is down.

Please help. My clients are complaining to me right now. I'm bombarding with complaints.

Well, if you can't even SSH, there is not much you can do.
not sure whether rebooting will help, but it can't make things worse, right?

try to 'ping' your server first, though, to make sure it is really down, not just services.
Hope that helps.
 
Back
Top