Posts Tagged 502

Open SSL takes 60% of my sites offline with 502 errors

So I was installing postfix and a bunch of other things to setup a mail server last night and at one point, for whatever reason, I thought I needed open SSL installed on there so I did.  It was one of about 5 or 6 ports I installed and a small event in a 3-4 hour server extravaganza to get pop3/imap and smtp working on my server.  After the end of it I was greeted with a 502 error on some sites, only some mind you.  I could have two wordpress installs running the same version of everything and on one none of the wordpress CSS images would load, on the other everything would load.  Oorrr on one site the root domain would load but then going to domain.com/somesubdirectory/ would resulti n a 502 error.  No rhyme or reason to it, I thought it might have something to do with some apache/nginx editing I did but I rolled back the files to before the mailserver fun and still the same.

In the end I put apache logging into debug mode and was greeted with this everytime I caused a 502 page to come up: [notice] child pid 35276 exit signal Bus error (10)

 

I did some googling around and stumbled upon some ancient mailing list conversations from 1998(http://www.lists.aldigital.co.uk/apache-ssl/msg01536.html) and 2005(http://lists.freebsd.org/pipermail/freebsd-ports/2005-February/021142.html) both referring to mod-ssl.  This is related to apache1.3 and I’m on 2.2 but I the SSL bit was common so I went in, deinstalled openSSL and viola! Everything works again..

 

So if you’re seeing 502 errors from Nginx for no reason, you see that log message go in and take out Open SSL or even better go and configure it properly and hopefully you’ll get rid of these problems.

Good luck!

Tags: , , , , , , ,

Nginx 502 errors, php problems, wordpress, oh my!

Well today is a glorious day as I finally managed to fix a problem that had been haunting my server for a month or so.  In the end it was a solution that I’ve been taught countless times as something I should be doing by default when upgrading php but alas my mind is not on of the more expensive models and so it rarely does what it should..

So it all started with a fairly minor issue I noticed in WordPress.   When I would try to load up the media gallery I would be greeted with a nice 502  Nginx error.  I’m sure if I wasn’t running nginx then it would have a blank white page or an apache error.  So naturally I started with the nginx error logs which didn’t lead to much.. Then I setup php to log all errors and again that didn’t lead me to much, finally however I monitored my httpd-error.log and this lovely message turned up:

[warn] (2)No such file or directory: Cannot reinit SSLMutex
/libexec/ld-elf.so.1: /usr/local/lib/php/20060613/gd.so: Undefined symbol “zend_parse_parameters_none”

After some asking around on irc I was told that it was definitely a php problem.  Nothing more specific than that, just a php problem.  There were a bunch of forum posts saying it might have something to do with fastCGI but all the suggestions had no effect.  However there was one forum I foudn that through a suggestion out there that lit up a light bulb in my brain.  That being that if php5-extensions isn’t recompiled and reinstalled when php is updated sometimes the fit hits the shan.  Sure enough I had upgrade php5 a while back, and then again since then but hadn’t bothered to recompile the extensions.  Hell I hadn’t even recompiled Zend or Eaccelerator which is pretty standard.

So long story slightly shorter, I went in deinstalled and cleaned up my php5-extensions, reinstalled it and viola, problem solved!!

Tags: , , , , , ,

Page optimized by WP Minify WordPress Plugin