-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pm2 with IPTables firewall #674
Comments
Hey, When you set the iptable rules, you can't use PM2 via CLI ? |
Can you make the 6666 6667 able to communicate in localhost ? |
Hi, thanks for your reply! We went to prod with pm2 since today but we have some problems of stability. Regularly, the service shutdown : the 2 processes. My questions :
Thanks for your answer ! Sebastien |
Follow up about our problem : So far the server keeps running without crashing (9h only though, so we need to wait more to come to final conclusion). What is strange is why pm2 did not restart automatically website.js when this process crashed ? What would be awesome also is to get logs of the reason of the crash when a process is restarted by pm2 ? Thanks for your answer, Sebastien |
Hello,
I'm new with pm2.
It sounds great but I have an issue using it with a simple IPTables firewall.
Maybe it's very simple to handle this but Google was not my friend on this topic since none seemed to have reported the same issue than mine.
The service that I run is made of 2 apps:
If I flush all the rules of my IPTable, pm2 works great! I can run my service with it.
If I define a simple IPTable like the following:
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
2 ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
3 ACCEPT tcp -- anywhere anywhere tcp dpt:http
4 ACCEPT tcp -- anywhere anywhere tcp dpt:https
5 ACCEPT tcp -- anywhere anywhere tcp dpt:4443
6 ACCEPT tcp -- anywhere anywhere tcp dpt:mysql
7 DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
... then no way to run my service with pm2 (but I can run it without problem without pm2).
After a quick 'sudo netstat -pntl' I see that there are 2 more process running by pm2 Daemon on ports 6666 and 6667.
But even if I had 2 rules on this 2 ports (--dport 6666 -j ACCEPT and --dport 6667 -j ACCEPT), pm2 does not work properly.
So my question is simple : how should I set up my IPTable to run pm2 without problem?
I know, it's probably a new be question. Hope someone will find time to help :)
Sebastien
The text was updated successfully, but these errors were encountered: