Customapache kills sshd

the cause was already found, its to do with sshd dynamically using zlib and when people are doing ./build php y instead of ./build php n they are recompiliing zlib and killing their sshd connections.
 
interesting maybe there is another cause then, I know that when I stopped using the sshd in the base of freebsd and used openssh-portable instead no more sshd been killed. Until you can solve it properly just make sure you use screen and a fallback of logging in without sshd.
 
Strange, I have been using freebsd 5.4 and directadmin and never had a problem with disconnect while doing build php y or any build combination for that matter.

i use standard ssh which comes with freebsd.
 
Can you try to change something in the configure.php file?

Please be sure that you can restart sshd after it fall out. Maybe with Webmin
 
Hi

i have changed things in configure.php as i use msyql from ports which requires change in configure.php for the build to work but again i have not had ssh fail.
 
I have a machine running FreeBSD 5.4 where this is happening. Can't restart it in DA. The only thing I found to help was moving accounts off the server b/c there really were too many on it (probably 100 too many).
 
bjseiler said:
I have a machine running FreeBSD 5.4 where this is happening. Can't restart it in DA. The only thing I found to help was moving accounts off the server b/c there really were too many on it (probably 100 too many).

Code:
cd /usr/ports/security/openssh-portable
make install clean
mv /usr/sbin/sshd /usr/sbin/sshd.orig
ln -s /usr/local/sbin/sshd /usr/sbin/sshd
killall -HUP sshd
 
I run an FC3 server and my sshd never stopped working while compiling custom apache or doing any other update ...


just as info .. so there must be some config you guys have, note: i do only have needed services and software installed.
Nothing more or less
 
I was in the data center yesterday and figured out my problem (no logs anywhere) by trying to start sshd manually.

"Too many AllowedUsers"

The "users" for the application we host don't need SSH so once I deleted a bunch of them, problem solved.

Not sure if this has happened to anyone else, but I figured I would throw it out there just in case.
 
The server where I had the problem is also a FC3 server. I have never had the problem before untill I changed something in the configure.php file.

@gcypher: Can you try to change something in the configure.php file and build php again? (Make sure you can restart SSH en DirectAdmin if you need to, or use screen!)
 
Hello,

I don't know who started recommending it, but the "y" option should essentially *never* be used. Any one who has a guide posted with the y option, change it to use d or n only.

At install time, services will be linked to the system zlib libraries. Upon DA install, our zlib binaries are installed to a differen path, no harm done. When the system services are restarted, they will re-link to our zlib, again, no harm. If you recompile zlib, then you must restart the service that uses it right away. This is why it's not recommend to use "y". The "d" option will notice zlib is already installed, thus won't install it. The "n" option just go straight to php (and any missing libs, which should be none at that point).

I'm going to add a huge warning in the customapache script to avoid the y option unless you know what you're doing (there are some cases where you would want the y option).

John
 
I had the same problem. It happened when I upgraded to php4.4.5, using the build command, when it reached to the point where it compiled php, theres a point where a loop occured and causes sshd to crash. Im not a guru so I cant tell what it is. I kept on trying, I guess 4-5 times and still failed. The only solution I thought of was recompiling using the current version and waited for version 4.4.6. The reason why I thought that it was a problem with 4.4.5 because when I tried to recompile PHP using 4.4.4 it worked fine and 4.4.6 compiled without a problem.
 
Last edited:
The problem is bash is using some recompile lib

On FreeBSD if you change default shell for root from csh to bash the same problem will occur.

I ever do that an have to go to idc to boot single user and switch back to csh because root can't not login due to missing lib for bash :(
So I never use bash for root again on FreeBSD :p

Try to do "./build php y" under screen then you will safe from ssh connection lost during compiling. (If thereis error it will not terminate, you will see compile message looping, press Ctrl-C ./build clean and recompile)

Hope this help.
 
Hello,

Never use "y". Ever ;)

If you want to recompile something specific, go ahead and use it's name.
If you want to make sure you have everything use "d".
I always use "n", is much qucker if no libs need updating.

The problem with "y" is that if the build fails, it will ask you if you want to try "make" again (for sytems with bad ram that segfault). It will automatically answer "y", thus sending you into a loop for any compile failure.

John
 
Back
Top