Customapache kills sshd

So basically you're saying that SSH will keep working if it's build statically against that certain lib?

I thought that was the default setting...

Don't have the equipment ready to test this at the moment, is there someone that can confirm this is the problem?

(seems logical though)
 
Re: SSH killed when upgrading PHP

jisse said:
I haven't seen the right answer on this thread yet, while the answer is pretty straightforward. If you watch the PHP compile process closely, your SSH connection is breaking down at the point where zlib is being recompiled.

Both PHP and SSH use the same shared library "zlib" but if the library "/usr/local/lib/libz.so" is being replaced SSH detects that and kills itself.

The solution is either to rebuild PHP without rebuilding zlib, or to add a cronjob to restart SSH within half an hour or so.
Thanks!

However, it sounds logical, but how can it be it doesn't always occur even with the exact same configuration line?

Are packaged like Exim, Apache and DirectAdmin also using zlib? Because i experienced that those sometimes crashes/get killed too....
 
Re: Re: SSH killed when upgrading PHP

Alain said:
Thanks!

However, it sounds logical, but how can it be it doesn't always occur even with the exact same configuration line?

Are packaged like Exim, Apache and DirectAdmin also using zlib? Because i experienced that those sometimes crashes/get killed too....

Let's see, Apache uses zlib. Not sure about Exim and DA though, DA shouldn't have to use it, as far as I know.

With the default configuration for SSH, it should be compiled statically, so just restarting the rest should be enough. However, if this zlib is only for PHP, why upgrade it system wide when this only causes problems?
 
Re: SSH killed when upgrading PHP

jisse said:
or to add a cronjob to restart SSH within half an hour or so.
This sounds reasonable, except that DirectAdmin should monitor sshd and restart it within a minute if it dies. It should keep trying to restart it every minute until it's successful.

Jeff
 
Hello,

yes you are right, but it also kill DA for me, so it means that the system is completly closed.

I guess that it's a good idea to create a script that check the same as DA but in a sh file and to cronjob it.
 
"directadmin" isn't what checks, it's the "dataskq" which isn't a daemon. As long as cron is working, then it will run the dataskq each minute checking for services.. but.. only if cron is running.
 
I've also had this problem.

I've done lots of "build php y" lately and sometimes it happens sometimes not.

Ive found that most daemons refude connections. exim, dovecot, sshd, directadmin, apache and the only way to get back in is the use webmin to restart sshd and directadmin and the rest of the services before service is resumed.

This has happened for me on Fedora Core 4, one box with PHP4 and OpenSSH 4.3p1 another with OpenSSH 4.3p2 and PHP5.

This never use to occur for me and so far has only ever happened on rebuilds and not fresh installs.

EDIT: In reply to the above post. For me the services don't quit/close they just stop connections. So the dataskq is useless when that happens.

Thanks,
Grant
 
Last edited:
I have the same problem on freeBSD 5.4

To solved this I just use the background process script running through crontab

#cat crontab | grep "build"
nextminute thishour * * * root /root/build.sh > /root/build.log

#cat /root/build.sh
#!/bin/sh
cd /usr/local/directadmin/customapache
./build apache_mod_ssl
./build php y
exit 0

Note. Do build clean / build update and other prior step before running sh script

Monitoring. #tail /root/build.log

PS. I have problem on su to root when using bash shell for root on upgrading openssl process
 
I guess it's simply so because of the libraire.

It has to be a problem and an issue should be found. Someone should paste here the last lines before loosing the SSH connection.

We can open a bugtracking directly on the vendor website :-)

I compile now with the option n of php and all works fine.

I also saw something strange, if I do a ./build all y it never happens.

Let's see next time.
 
yes static linking is the solution, which is why openssh_portable works on FreeBSD.
 
crspyjohn said:
did this ever get fixed? i want to upgrade to apache 2

I dont think so. Just run the build script using the screen command. But then you need to restart ssh with directadmin if it does crash.

Run like:

screen ./build all d

If you dont have screen do:

yum install screen

or

apt-get install screen
 
after using customapache, my stats aren't updated anymore, directadmin doesn't even create a stats folder in /home/user/domains/bla.com/stats.

can anyone help me?

webalizer is still avaible in /usr/bin/webalizer
 
This problem is still not fixed. Just rebuiding Apache (on an NEW server with FC5 and the latest DA) and *ploink* sshd AND directadmin stopped responding. Apache however is still running. So the server has te be rebooted in order to get sshd and directadmin running again...

John or any other DA dev'r, please hunt down this problem. I'm experiencing it on almost all our DA-servers with mixed configs.
 
Last edited:
Alain said:
This problem is still not fixed. Just rebuiding Apache (on an NEW server with FC5 and the latest DA) and *ploink* sshd AND directadmin stopped responding. Apache however is still running. So the server has te be rebooted in order to get sshd and directadmin running again...

John or any other DA dev'r, please hunt down this problem. I'm experiencing it on almost all our DA-servers.

LOL the server does not at all have to be rebooted you can restart sshd via directadmin. You can run your compiles with ./build <option> n also so it doesnt drop. Worse case learn to build with the screen program so the program will continue to do its thing even if it does drop.
 
chatwizrd said:
LOL the server does not at all have to be rebooted you can restart sshd via directadmin. You can run your compiles with ./build <option> n also so it doesnt drop. Worse case learn to build with the screen program so the program will continue to do its thing even if it does drop.
Please read; also DirectAdmin stopped responding... as i experienced before. So i can't restart sshd with DirectAdmin. Screen or option n doesn't help with that.
 
Nothing, just rebuilding Apache with the build tool. This time with freetype, but i have this problem all the time with any module. And not only DirectAdmin stops (however not always), sometimes other services too like named, proftpd etc etc. Build kills all kind of services for some reason, most of the time SSHD, but others too.
 
--enable cli

This only started happening when i added --enable cli to my configure file.

This may help

And yes i use screen and finish my compiles that way.
 
I have had it also.
I didn't have it before, only now when I changed something to the configure.php file. Maybe the problem is with this file?
 
Back
Top