Eugeny / ajenti-v

Virtual Hosting addon for Ajenti
ajenti.org/#product-ajenti-v
MIT License
225 stars 80 forks source link

PHP-FPM service showing as not running #82

Closed Globegitter closed 10 years ago

Globegitter commented 10 years ago

I just decided to give Ajenti (V) a test-run for one of our internal servers and I do really like it. Set-up was quite simple, but now trying to set-up a PHP site, when I got to 'Websites' Ajenti is showing me

capture decran 2014-07-01 a 12 39 00

Even though when I check through the server it is showing me:

capture decran 2014-07-01 a 12 37 45

So things actually do work and it just seems to be an issue with Ajenti. Any idea what the cause could be?

Edit: I am also not even getting a simple index.php to show up. I looked at the wordpress tutorial and some other things online, but all the server seems to do when I go to the URL is downloading the .php file instead displaying what it should display. Anyone here know what the issue could be?

Any help/comment is really appreciated.

Eugeny commented 10 years ago

Did you actually choose "PHP FastCGI" content type? Looks like you chose "Static files" instead.

DjustinK commented 10 years ago

Ive got the same problem. I choose "PHP FastCGI" content type but it still doesn't work. Marked as X.

Eugeny commented 10 years ago

What is marked with X?

DjustinK commented 10 years ago

PHP FastCGI Like the image posted by Globegitter.

Eugeny commented 10 years ago

The the FPM log in /var/log/php5-fpm.log

DjustinK commented 10 years ago

No errors there: [07-Jul-2014 14:24:57] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful

And the service is running: php5-fpm start/running, process 1057

Eugeny commented 10 years ago

Are all your Ajenti V packages at latest versions? What if you restart FPM service manually?

DjustinK commented 10 years ago

Alreay tried with rebooting the whole machine. Also tried apt-get update && upgrade. No updates.

pfz commented 10 years ago

+1, I just upgraded from 12.04 to 14.04 . Was working perfectly, then I get the same issue. I'm not a py dev, so can't really try things out. Though i tried to change "fpm_service_name" in phpfpm.py to "nginx" (which works), and it went green. I didn't go all through the servicemultiplexor thing, but ServiceMultiplexor.get().get_one("php5-fpm").running seems to return the wrong status.

Eugeny commented 10 years ago

I've released an update which should fix that. Please try!

DjustinK commented 10 years ago

Just ran the update, still not working. Using ubuntu 14.04

DjustinK commented 10 years ago

I also don't see any update in your github about this problem.

pfz commented 10 years ago

Thanks ! tried : Ubuntu 14.04 / Ajenti-debian 1.2.21.14. Still not working.

Just found the problem. Running in debug, I see : compat.py:20 DEBUG Popen: ['/etc/init.d/php5-fpm', 'status']

You should use 'service' instead of '/etc/init.d'. The latter is buggy for php5-fpm and returns nothing. Didn't search why, though I know that since precise, it's deprecated, and works like this on debian since lenny.

There it is : plugins/services/sm_sysvinit.py:67
-self.script = '/etc/init.d/%s' % self.name +self.script = 'service %s' % self.name

pfz commented 10 years ago

One thing I should mention, I use this packaging of php > ppa.launchpad.net/ondrej/php5/ubuntu

Eugeny commented 10 years ago

Can you check whether service status appears correctly in Services section?

pfz commented 10 years ago

Ok a ran service --status-all, php5-fpm is marked as not running, although service php5-fpm returns 'start/running' with pid. In service service section, it's strange, it appears twice. The first is running and manageable, the other is not.

Eugeny commented 10 years ago

What does origin column say for both?

DjustinK commented 10 years ago

I can confirm the same as pfz.

pfz commented 10 years ago

sysvinit for all. I don't use supervisord for now. (And i tried my mod, doesn't work, service is replaced by supervisordctl)

DjustinK commented 10 years ago

Same here, both: sysvinit

Eugeny commented 10 years ago

Please try 1.2.21.16 build, it should remove service duplication and prefer initctl over initscripts.

pfz commented 10 years ago

Working ! Thanks ! And no more duplicates

DjustinK commented 10 years ago

Works, thanks!

pfz commented 10 years ago

Sorry to report ! but it breaks ajenti on debian wheezy... I've sent you an email with the report.

pfz commented 10 years ago

... and found this : https://wiki.debian.org/Debate/initsystem/upstart . Not until next release !

Eugeny commented 10 years ago

Fixed!

pfz commented 10 years ago

indeed ! thanks ! on both plateforms

Fiambre commented 10 years ago

Today, on a fresh ubuntu 14.04 installation, i installed ajenti-v and still having the same problem. Version 1.2.22.6

KingBain commented 10 years ago

Having the same issue as HaSuKrOnOs

yusufsyaifudin commented 10 years ago

i have the same issue.. also my website is show as "502 bad gateway" when I look at the logs file in /var/log/nginx/mywebsite.error.log it show error look like this

screenshot 83

what's wrong?

cronner commented 9 years ago

same here: Ubuntu 14.04.1 LTS Ajenti v1.2.22.17