PM2 Stops app at unexpected times with SIGINT "process killed" and the reason is not clear - pm2

The app stops and I can't figure out why.
I start the command like this CMD ["pm2-runtime", "main.bundle.js", "--cron", "0 */16 * * *"] (should mean to restar the app every 16 hours)
Then I see the app starting:
15:35:02
2020-01-09T15:35:02: PM2 log: Launching in no daemon mode
15:35:03
2020-01-09T15:35:03: PM2 log: App [main.bundle:0] starting in -fork mode-
15:35:03
2020-01-09T15:35:03: PM2 log: App [main.bundle:0] online
And after half an hour I see that it's stopping the app.
16:05:32
2020-01-09T16:05:32: PM2 log: Stopping app:main.bundle id:0
16:05:32
2020-01-09T16:05:32: PM2 log: App [main.bundle:0] exited with code [0] via signal [SIGINT]
16:05:32
2020-01-09T16:05:32: PM2 log: pid=30 msg=process killed
16:05:32
2020-01-09T16:05:32: PM2 log: PM2 successfully stopped
I see no errors in my app and I can't understnad why it stops.
Another end log:
06:11:52
2020-01-11T06:11:52: PM2 log: Stopping app:main.bundle id:0
06:11:52
2020-01-11T06:11:52: PM2 log: App [main.bundle:0] exited with code [0] via signal [SIGINT]
06:11:52
2020-01-11T06:11:52: PM2 log: pid=16 msg=process killed
06:11:52
2020-01-11T06:11:52: PM2 log: PM2 successfully stopped

Related

Running fastapi app using uvicorn on ubuntu server

I am dealing with the project deposition made on FastAPI to a remote ubuntu server. I'll try to run the project from terminal (using SSH connection) by the command
gunicorn -k uvicorn.workers.UvicornWorker main:app
The output is
gunicorn -k uvicorn.workers.UvicornWorker main:app
[2020-07-14 15:24:28 +0000] [23102] [INFO] Starting gunicorn 20.0.4
[2020-07-14 15:24:28 +0000] [23102] [INFO] Listening at: http://127.0.0.1:8000 (23102)
[2020-07-14 15:24:28 +0000] [23102] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2020-07-14 15:24:28 +0000] [23104] [INFO] Booting worker with pid: 23104
[2020-07-14 15:24:28 +0000] [23104] [INFO] Started server process [23104]
[2020-07-14 15:24:28 +0000] [23104] [INFO] Waiting for application startup.
[2020-07-14 15:24:28 +0000] [23104] [INFO] Application startup complete.
But I need the project to be available at the IP address of the server. If I try smth like
uvicorn main:app --host 66.226.247.55 --port 8000
I get
INFO: Started server process [23308]
INFO: Waiting for application startup.
INFO: Connected to database postgresql://recognition:********#localhost:5432/reco
INFO: Application startup complete.
ERROR: [Errno 99] error while attempting to bind on address ('66.226.247.55', 8000): cannot assign requested address
INFO: Waiting for application shutdown.
INFO: Disconnected from database postgresql://recognition:********#localhost:5432/reco
INFO: Application shutdown complete.
Where 66.226.247.55 - external IP adress from google cloud platform instances
How do I start a project so that it can be accessed via IP?
The --host should be the local address of your GCP server.
uvicorn main:app --host 0.0.0.0 --port 8000
and now access the application by http://66.226.247.55:8000
Note: You should open your 8000 port of GCP server.
If you're using nginx server
create a file in /etc/nginx/sites-enabled/
create file touch fastapi_nginx
copy code into file and adjust accordingly
server{
listen 80;
server_name "your public ip";
location / {
proxy_pass http://127.0.0.1:8000; #localhost
}
}
This should reroute to your public ip
You cannot launch your fast api app on your local to your remote server in GCP.
You must deploy your app to GCP. In other words you need to run that command on a remote server not your localhost.

PM2 automatically delete the process after 1month~

I am using pm2 to run my nodejs(express server) app. As i know pm2 will restart the app if the app crashed. But i don't know why the process is automatically deleted(dissapear) after i found out that the website is "503 error" and i try to type "pm2 monit" the process is dissapear.
Here are some info:
the app is hosted on sharedhosting with ssh access.
after installed pm2 globally, i start the app using the default command: "pm2 start [path_to_server_from_public_html].js"
inside pm2.log:
2019-08-02T11:05:35: PM2 log: ===============================================================================
2019-08-02T11:05:35: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
2019-08-02T11:05:35: PM2 log: Time : Fri Aug 02 2019 11:05:35 GMT+0700
2019-08-02T11:05:35: PM2 log: PM2 version : 3.5.1
2019-08-02T11:05:35: PM2 log: Node.js version : 12.6.0
2019-08-02T11:05:35: PM2 log: Current arch : x64
2019-08-02T11:05:35: PM2 log: PM2 home : /home/u1971755/.pm2
2019-08-02T11:05:35: PM2 log: PM2 PID file : /home/u1971755/.pm2/pm2.pid
2019-08-02T11:05:35: PM2 log: RPC socket file : /home/u1971755/.pm2/rpc.sock
2019-08-02T11:05:35: PM2 log: BUS socket file : /home/u1971755/.pm2/pub.sock
2019-08-02T11:05:35: PM2 log: Application log path : /home/u1971755/.pm2/logs
2019-08-02T11:05:35: PM2 log: Process dump file : /home/u1971755/.pm2/dump.pm2
2019-08-02T11:05:35: PM2 log: Concurrent actions : 2
2019-08-02T11:05:35: PM2 log: SIGTERM timeout : 1600
2019-08-02T11:05:35: PM2 log: ===============================================================================
2019-08-02T11:05:35: PM2 log: App [server:0] starting in -fork mode-
2019-08-02T11:05:35: PM2 log: App [server:0] online
2019-08-02T11:18:35: PM2 log: App [server:0] exited with code [0] via signal [SIGTERM]
2019-08-02T11:18:35: PM2 log: App [server:0] starting in -fork mode-
2019-08-02T11:18:35: PM2 log: App [server:0] online
2019-08-02T11:19:09: PM2 error: 1 : id unknown
2019-08-02T11:19:13: PM2 log: Stopping app:server id:0
2019-08-02T11:19:13: PM2 log: App [server:0] exited with code [0] via signal [SIGINT]
2019-08-02T11:19:13: PM2 log: pid=31251 msg=process killed
2019-08-02T11:19:28: PM2 log: App [server:0] starting in -fork mode-
2019-08-02T11:19:28: PM2 log: App [server:0] online
2019-08-02T11:19:51: PM2 error: 1 : id unknown
2019-08-02T11:22:18: PM2 log: App [server:0] exited with code [0] via signal [SIGTERM]
2019-08-02T11:22:18: PM2 log: App [server:0] starting in -fork mode-
2019-08-02T11:22:18: PM2 log: App [server:0] online
2019-08-02T11:22:21: PM2 log: App [server:0] exited with code [0] via signal [SIGTERM]
2019-08-02T11:22:21: PM2 log: App [server:0] starting in -fork mode-
2019-08-02T11:22:21: PM2 log: App [server:0] online
2019-08-02T11:23:11: PM2 error: 1 : id unknown
2019-08-20T10:18:42: PM2 log: Stopping app:server id:0
2019-08-20T10:18:43: PM2 log: App [server:0] exited with code [0] via signal [SIGINT]
2019-08-20T10:18:43: PM2 log: pid=5965 msg=process killed
2019-08-20T10:18:43: PM2 log: App [server:0] starting in -fork mode-
2019-08-20T10:18:43: PM2 log: App [server:0] online
2019-08-21T11:33:39: PM2 log: App [server:0] exited with code [0] via signal [SIGTERM]
2019-08-21T11:33:39: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:33:39: PM2 log: App [server:0] online
2019-08-21T11:34:42: PM2 log: Stopping app:server id:0
2019-08-21T11:34:42: PM2 log: App [server:0] exited with code [0] via signal [SIGINT]
2019-08-21T11:34:42: PM2 log: pid=9888 msg=process killed
2019-08-21T11:34:42: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:34:42: PM2 log: App [server:0] online
2019-08-21T11:41:25: PM2 log: Stopping app:server id:0
2019-08-21T11:41:25: PM2 log: App [server:0] exited with code [0] via signal [SIGINT]
2019-08-21T11:41:25: PM2 log: pid=15091 msg=process killed
2019-08-21T11:41:25: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:25: PM2 log: App [server:0] online
2019-08-21T11:41:26: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:26: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:26: PM2 log: App [server:0] online
2019-08-21T11:41:26: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:26: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:26: PM2 log: App [server:0] online
2019-08-21T11:41:26: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:26: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:26: PM2 log: App [server:0] online
2019-08-21T11:41:26: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:26: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:26: PM2 log: App [server:0] online
2019-08-21T11:41:26: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:26: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:26: PM2 log: App [server:0] online
2019-08-21T11:41:27: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:27: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:27: PM2 log: App [server:0] online
2019-08-21T11:41:27: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:27: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:27: PM2 log: App [server:0] online
2019-08-21T11:41:27: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:27: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:27: PM2 log: App [server:0] online
2019-08-21T11:41:27: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:27: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:27: PM2 log: App [server:0] online
2019-08-21T11:41:27: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:27: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:27: PM2 log: App [server:0] online
2019-08-21T11:41:28: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:28: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:28: PM2 log: App [server:0] online
2019-08-21T11:41:28: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:28: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:28: PM2 log: App [server:0] online
2019-08-21T11:41:28: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:28: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:28: PM2 log: App [server:0] online
2019-08-21T11:41:28: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:28: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:28: PM2 log: App [server:0] online
2019-08-21T11:41:28: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:28: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:28: PM2 log: App [server:0] online
2019-08-21T11:41:28: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:28: PM2 log: Script /home/u1971755/public_html/service/build/server/server.js had too many unstable restarts (16). Stopped. "errored"
2019-08-21T11:41:43: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:43: PM2 log: App [server:0] online
2019-08-21T11:41:43: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:43: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:43: PM2 log: App [server:0] online
2019-08-21T11:41:44: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:44: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:44: PM2 log: App [server:0] online
2019-08-21T11:41:44: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:44: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:44: PM2 log: App [server:0] online
2019-08-21T11:41:44: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:44: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:44: PM2 log: App [server:0] online
2019-08-21T11:41:44: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:44: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:44: PM2 log: App [server:0] online
2019-08-21T11:41:44: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:44: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:44: PM2 log: App [server:0] online
2019-08-21T11:41:44: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:44: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:44: PM2 log: App [server:0] online
2019-08-21T11:41:45: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:45: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:45: PM2 log: App [server:0] online
2019-08-21T11:41:45: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:45: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:45: PM2 log: App [server:0] online
2019-08-21T11:41:45: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:45: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:45: PM2 log: App [server:0] online
2019-08-21T11:41:45: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:45: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:45: PM2 log: App [server:0] online
2019-08-21T11:41:45: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:45: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:45: PM2 log: App [server:0] online
2019-08-21T11:41:45: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:45: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:45: PM2 log: App [server:0] online
2019-08-21T11:41:46: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:46: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:46: PM2 log: App [server:0] online
2019-08-21T11:41:46: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:46: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:41:46: PM2 log: App [server:0] online
2019-08-21T11:41:46: PM2 log: App [server:0] exited with code [1] via signal [SIGINT]
2019-08-21T11:41:46: PM2 log: Script /home/u1971755/public_html/service/build/server/server.js had too many unstable restarts (16). Stopped. "errored"
2019-08-21T11:42:36: PM2 log: Stopping app:server id:0
2019-08-21T11:42:36: PM2 error: app=server id=0 does not have a pid
2019-08-21T11:43:36: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:43:36: PM2 log: App [server:0] online
2019-08-21T11:43:55: PM2 log: Stopping app:server id:0
2019-08-21T11:43:55: PM2 log: App [server:0] exited with code [0] via signal [SIGINT]
2019-08-21T11:43:55: PM2 log: pid=20025 msg=process killed
2019-08-21T11:43:55: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:43:55: PM2 log: App [server:0] online
2019-08-21T11:45:02: PM2 log: Stopping app:server id:0
2019-08-21T11:45:02: PM2 log: App [server:0] exited with code [0] via signal [SIGINT]
2019-08-21T11:45:02: PM2 log: pid=21490 msg=process killed
2019-08-21T11:45:02: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T11:45:02: PM2 log: App [server:0] online
2019-08-21T11:47:54: PM2 log: Stopping app:server id:0
2019-08-21T11:47:54: PM2 log: App [server:0] exited with code [0] via signal [SIGINT]
2019-08-21T11:47:54: PM2 log: pid=27614 msg=process killed
2019-08-21T12:08:06: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T12:08:06: PM2 log: App [server:0] online
2019-08-21T12:12:23: PM2 log: Stopping app:server id:0
2019-08-21T12:12:23: PM2 log: App [server:0] exited with code [0] via signal [SIGINT]
2019-08-21T12:12:23: PM2 log: pid=24151 msg=process killed
2019-08-21T12:38:26: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T12:38:26: PM2 log: App [server:0] online
2019-08-21T12:39:41: PM2 log: Stopping app:server id:0
2019-08-21T12:39:41: PM2 log: App [server:0] exited with code [0] via signal [SIGINT]
2019-08-21T12:39:41: PM2 log: pid=10351 msg=process killed
2019-08-21T12:39:41: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T12:39:41: PM2 log: App [server:0] online
2019-08-21T12:44:09: PM2 log: App [server:0] exited with code [0] via signal [SIGTERM]
2019-08-21T12:44:09: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T12:44:09: PM2 log: App [server:0] online
2019-08-21T12:44:33: PM2 log: App [server:0] exited with code [0] via signal [SIGTERM]
2019-08-21T12:44:33: PM2 log: App [server:0] starting in -fork mode-
2019-08-21T12:44:33: PM2 log: App [server:0] online
2019-09-14T12:44:52: PM2 log: ===============================================================================
2019-09-14T12:44:52: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
2019-09-14T12:44:52: PM2 log: Time : Sat Sep 14 2019 12:44:52 GMT+0700
2019-09-14T12:44:52: PM2 log: PM2 version : 3.5.1
2019-09-14T12:44:52: PM2 log: Node.js version : 12.6.0
2019-09-14T12:44:52: PM2 log: Current arch : x64
2019-09-14T12:44:52: PM2 log: PM2 home : /home/u1971755/.pm2
2019-09-14T12:44:52: PM2 log: PM2 PID file : /home/u1971755/.pm2/pm2.pid
2019-09-14T12:44:52: PM2 log: RPC socket file : /home/u1971755/.pm2/rpc.sock
2019-09-14T12:44:52: PM2 log: BUS socket file : /home/u1971755/.pm2/pub.sock
2019-09-14T12:44:52: PM2 log: Application log path : /home/u1971755/.pm2/logs
2019-09-14T12:44:52: PM2 log: Process dump file : /home/u1971755/.pm2/dump.pm2
2019-09-14T12:44:52: PM2 log: Concurrent actions : 2
2019-09-14T12:44:52: PM2 log: SIGTERM timeout : 1600
2019-09-14T12:44:52: PM2 log: ===============================================================================
2019-09-14T12:46:02: PM2 log: App [server:0] starting in -fork mode-
2019-09-14T12:46:02: PM2 log: App [server:0] online
NOTE:
app first start date: (2019-08-02T11:05:35)
last log before today(PM2 log: App [server:0] online)): (2019-08-21T12:44:33)
app process suddenly dissapear date: (2019-09-14T12)
As you could see that the app or pm2 should work just fine right?. btw i just restarted the app manually today(2019-09-14T12:44:52) after i found out the app process no longer exist using: "pm2 start [path_to_server_from_public_html].js".
Please help me, it is so annoying if i need to restart the app manually after 1 month. Thank you very much guys...

My Google Compute Engine startup script has CommunicationsLinkFailures (SQL State 08S01 Error 0) even though it runs fine locally?

I'm deploying my Java8 SpringBoot App to a Google Compute Engine instance and trying to connect it to a Debian9 CloudSQL instance. I'm trying to get the instance to run with my startup-script.sh, but when it tries to boot up the SpringBoot Application, according to the daemon.log, when the .war is ran by "java -jar order-routing-0.0.1-SNAPSHOT.war" the startup fails with a "Unable to obtain connection from database: Communications link failure", with SQL State:08S01 and error code 0.
I mapped the GCE instance to a static external IP, as well as whitelisting that IP on the CloudSQL instance's connections configs. I also verify that the war file runs locally with "java -jar order-routing.war".
Here is my startup script.sh:
#!/usr/bin/env bash
# This script is passed to the GCE instance by the setup script. It is run on the instance when it is spun up.
# Derived from GCE Tutorial at https://cloud.google.com/java/docs/tutorials/bookshelf-on-compute-engine
# [START script]
set -e
set -v
# Talk to the metadata server to get the project id
PROJECTID=$(curl -s "http://metadata.google.internal/computeMetadata/v1/project/project-id" -H "Metadata-Flavor: Google")
BUCKET=$(curl -s "http://metadata.google.internal/computeMetadata/v1/instance/attributes/BUCKET" -H "Metadata-Flavor: Google")
echo "Project ID: ${PROJECTID}"
# get our file(s)
gsutil cp "gs://order-routing-install/gce/"** .
# Install dependencies from apt
apt-get update
apt-get install mysql-client -y
wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64
mv cloud_sql_proxy.linux.amd64 cloud_sql_proxy
chmod +x cloud_sql_proxy
./cloud_sql_proxy -instances=instance-qa1:us-central1:instance-qa1-cloudsql-0=tcp:3307 &
apt-get install -yq default-jre
apt-get install -yq default-jdk
java -jar order-routing-0.0.1-SNAPSHOT.war
# [END script]
Here is the failing error log from the daemon.log:
ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.exception.FlywaySqlException:
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script: Unable to obtain connection from database: Communications link failure
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script: 2019-07-29 03:39:30.435 INFO 9051 --- [ main] ConditionEvaluationReportLoggingListener :
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script:n from database: Communications link failure
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script: The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script: SQL State : 08S01
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script: Error Code : 0
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script: Message : Communications link failure
Expected Result:
The GCE instance starts up the war file successfully and I can access my app using the external IP.
Actual Result:
Getting CommunicationsLinkFailures upon starting up Spring Boot Java app.

Failed to start couchbase-server.service: Unit couchbase-server.service failed to load

When I run this command to install Couchbase Server
sudo rpm --install couchbase-server-community-4.0.0.centos7.x86_64.rpm
in my Fedora 22, I got an error below:
Starting couchbase-server (via systemctl): Failed to start couchbase-server.service: Unit couchbase-server.service failed to load: No such file or directory. [Failed]
You have successfully installed Couchbase Server.
How can I fixed this error?

Why not work " forever stop forever/development.json "?

I install forever npm package using follow command
sudo npm install forever -g
npm install forever-monitor
My server.js file run using follow command
forever start server.js
Result :
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: server.js
Now server.js running background
Next server.js file stop using follow command
forever start server.js
Result :
info: Forever stopped process:
uid command script forever pid id logfile uptime
[0] uiip /usr/bin/nodejs server.js 5763 5765 /home/amila/.forever/uiip.log 0:0:1:38.529
Finally reading documentation, I added development.json inside forever directory
{
"uid": "app",
"append": true,
"watch": true,
"script": "server.js",
"sourceDir": "./"
}
Now Type :
forever start forever/development.json
Result :
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: server.js
Now server.js file working.
Problem here : Type follow command
forever stop forever/development.json
Result :
error: Forever cannot find process with id: forever/development.json
However when type
forever stop server.js
Result :
info: Forever stopped process:
uid command script forever pid id logfile uptime
[0] app /usr/bin/nodejs server.js 6437 6443 /home/amila/.forever/app.log 0:0:1:44.323
I need now, Why when type forever stop forever/development.json comes error
If the forever process does not start properly, then it will automatically be stopped.
So stopping a process, which is already stopped due to an error, then forever will throw an error for that
error: Forever cannot find process with id: forever/development.json
Is development.json file contains below line?
{ "script" : "server.js" }
Update:
Valid Parameters
forever stop Id|Uid|Pid|Index|Script