Unitech / Unitech/pm2

pm2 : Script /usr/bin/java had too many unstable restarts (16). Stopped. "errored"

Open
#5,874 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

What's going wrong?

pm2 start 'java_app' throwing below error.

pm2 : Script /usr/bin/java had too many unstable restarts (16). Stopped. "errored"

tried with reinstall of pm2. But, no use.

Please help me how to resolve this issue.

Thanks in advance.

Run the following commands

$ pm2 report

--- PM2 report ----------------------------------------------------------------
Date                 : Thu Jul 25 2024 00:13:41 GMT+0530 (India Standard Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 5.4.2
node version         : 16.20.2
node path            : not found
argv                 : /usr/bin/node,/usr/local/lib/node_modules/pm2/lib/Daemon.js
argv0                : node
user                 : root
uid                  : 0
gid                  : 0
uptime               : 12min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 5.4.2
node version         : 16.20.2
node path            : /usr/local/bin/pm2
argv                 : /usr/bin/node,/usr/local/bin/pm2,report
argv0                : node
user                 : root
uid                  : 0
gid                  : 0
===============================================================================
--- System info --------------------------------------------
arch                 : x64
platform             : linux
type                 : Linux
cpus                 : Intel(R) Xeon(R) Gold 6338N CPU @ 2.20GHz
cpus nb              : 4
freemem              : 19849289728
totalmem             : 22604328960
home                 : /root
===============================================================================
--- PM2 list -----------------------------------------------
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
│ 1  │ dbservice          │ fork     │ 0    │ online    │ 0.5%     │ 96.1mb   │
│ 0  │ mqtt-adapter       │ fork     │ 15   │ errored   │ 0%       │ 0b       │
│ 2  │ sarhm-adaptor      │ fork     │ 30   │ errored   │ 0%       │ 0b       │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/root/.pm2/pm2.log last 20 lines:
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] exited with code [1] via signal [SIGINT]
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] starting in -fork mode-
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] online
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] exited with code [1] via signal [SIGINT]
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] starting in -fork mode-
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] online
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] exited with code [1] via signal [SIGINT]
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] starting in -fork mode-
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] online
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] exited with code [1] via signal [SIGINT]
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] starting in -fork mode-
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] online
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] exited with code [1] via signal [SIGINT]
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] starting in -fork mode-
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] online
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] exited with code [1] via signal [SIGINT]
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] starting in -fork mode-
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] online
PM2        | 2024-07-25T00:02:28: PM2 log: App [sarhm-adaptor:2] exited with code [1] via signal [SIGINT]
PM2        | 2024-07-25T00:02:28: PM2 log: Script /usr/bin/java had too many unstable restarts (16). Stopped. "errored"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing pm2 start 'java_app' and inspect the application's process output alongside the supplied PM2 report. The report shows repeated exit code 1 failures for /usr/bin/java, but names no repository file or test. Done would require identifying a reproducible PM2 defect or documenting a project-specific resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, node.js
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.