Comments (4)
If nginx -s stop
is still working, then I'm wondering if this issue is related to the script you're using to start and stop nginx as a service (although it's still odd that this init()
is making a difference). So what type of service script are you using? Do you have an init.d script, or are you using upstart, or something else? Could you share the contents of that script?
And are there any errors being logged to your nginx error log file on either startup or shutdown?
Since it seems like the service script is getting hung up on shutdown, one other potential thing to debug is to see if any child processes are being left around. If you're using something like upstart, I'm wondering if the sockproc
process might be left running, which might be confusing the shutdown script if it's paying attention to process groups. One way to potentially debug this is to use pstree to see what processes are running as a child to nginx. So after starting nginx, you could try running pstree -a -p
and find the nginx processes in this output. Then after attempting to stop nginx, try running that same command again and see if there's still any processes hanging around under nginx's parent process.
from lua-resty-auto-ssl.
We're using upstart. Yes, it definitely has to do with the startup script, but it definitely has to do with auto_ssl:init()
as well... those two are just not playing nicely together.
Here is /etc/init/nginx.conf
description "nginx - small, powerful, scalable web/proxy server"
start on filesystem and static-network-up
stop on runlevel [016]
expect fork
respawn
pre-start script
[ -x /usr/sbin/nginx ] || { stop; exit 0; }
/usr/sbin/nginx -q -t -g 'daemon on; master_process on;' || { stop; exit 0; }
end script
exec /usr/sbin/nginx -g 'daemon on; master_process on;'
pre-stop exec /usr/sbin/nginx -s quit
No errors in any logs. Yes, after some web searching I'm totally suspecting sockproc
as well, but I don't even see it running.
1578 ? Ss 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
1579 ? S 0:00 \_ nginx: worker process
1580 ? S 0:00 \_ nginx: worker process
1581 ? S 0:00 \_ nginx: worker process
1582 ? S 0:00 \_ nginx: worker process
1583 ? S 0:00 \_ nginx: cache manager process
Problem is: nothing seems to be stuck. After stopping they're all gone...
from lua-resty-auto-ssl.
Update: somehow removing expect fork
solves this issue.
from lua-resty-auto-ssl.
@discoursehosting: Sorry for the belated followup, but thank you very much for the sleuthing! Very interesting. I'm not super-familiar with upstart, but it definitely seems like us starting sockproc inside nginx is somehow interfering with how Upstart tracks forked processes. I'm glad you were able to find the workaround with removing expect fork
, but I'll have to play around with Upstart at some point to see if there's a cleaner way we could be handling this.
from lua-resty-auto-ssl.
Related Issues (20)
- Is it possible to change the LE CA to a custom CA? HOT 1
- Working with a Third-Party ACME Provider and Request is Incorrect HOT 2
- How to pass username in auth option for redis.
- Does it support zerossl
- Test against newer versions of OpenResty HOT 5
- Certificates with multiple accounts HOT 1
- How to explicitly delete a domain/certificate? HOT 1
- Proxy Protocol v2 not supported
- How change allow_domains to file separate
- Security issue
- New Release? HOT 6
- Migrate letsencrypt certifcates on disk to lua-resty-open-ssl HOT 2
- Failing to use the 'has_certificate' method HOT 1
- Renewal fails with error: auto-ssl: failed to obtain lock: closed, context: ngx.timer
- Move Out Renewal Jobs to Another Server HOT 1
- Let's Encrypt response on renewal: Order's status ("valid") is not acceptable for finalization
- Update Dehydrated to 0.7.1+ to fix issuance with Let's Encrypt
- Cannot change the renewal interval
- Remove cached certificate HOT 1
- How To Clear Queued Renewal Work? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-resty-auto-ssl.