WebFaction
Community site: login faq

I'm on a shared hosting account and have an nginx installation on there that went down today.

First, can anyone suggest where I should look to see why it closed? I checked nginx/logs/error.log but there wasn't any info in there.

Secondly, I had trouble restarting it. When I used the init script to start it, nothing happened (normally it would say OK or FAILED). I also tried stop (which gave a FAILED as it wasn't running), then a start, which still gave nothing. Then I tried restart, but this worked? I don't get why though?

This is an extract from my terminal session:

[djeyewater@web84 nginx]$ ./nginxctl stop
Stopping nginx:                                            [FAILED]
[djeyewater@web84 nginx]$ ./nginxctl start
[djeyewater@web84 nginx]$ ./nginxctl restart
the configuration file /home/djeyewater/apps/nginx/conf/nginx.conf syntax is ok
configuration file /home/djeyewater/apps/nginx/conf/nginx.conf test is successful
Stopping nginx:                                            [FAILED]
Starting nginx:                                            [  OK  ]

The init script I'm using is from http://wiki.nginx.org/RedHatNginxInitScript though I don't have the makedirs function or the

[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx

line

Any ideas why start didn't work but restart did?

Thanks

Dave

asked 18 Nov '11, 05:01

djeyewater
2636
accept rate: 100%


Hi,

Sorry, but I don't see a reason why start would fail but restart would work. The only possible explanation that I can come up with is that some lingering Nginx process was still running when you issued the start command, but it was already gone when you issued restart. I tried all these commands assuming your user and was able to stop, start, and restart your server normally, so I'm not sure what else I can do to troubleshoot this. It's difficult to find the cause of such a problem without being able to reproduce it.

permanent link

answered 18 Nov '11, 07:41

todork
1.2k5
accept rate: 34%

It's quite strange. There wasn't any process already running as I did a ps to check before trying to start it.

(18 Nov '11, 09:06) djeyewater
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×186
×2

question asked: 18 Nov '11, 05:01

question was seen: 2,765 times

last updated: 18 Nov '11, 09:06

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM