Skip to content

Error caught while calling pidusage; Error: Error: spawn wmic ENOENT #4954

@xinthose

Description

@xinthose

What's going wrong?

from .pm2/pm2.log:

15:01:41 PM2      | Error caught while calling pidusage
15:01:41 PM2      | Error: Error: spawn wmic ENOENT
15:01:41 PM2      |     at ChildProcess.<anonymous> (C:\Users\ADunsmoor\AppData\Roaming\npm\node_modules\pm2\node_modules\pidusage\lib\bin.js:33:10)
15:01:41 PM2      |     at ChildProcess.emit (events.js:315:20)
15:01:41 PM2      |     at ChildProcess.EventEmitter.emit (domain.js:467:12)
15:01:41 PM2      |     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
15:01:41 PM2      |     at onErrorNT (internal/child_process.js:465:16)
15:01:41 PM2      |     at processTicksAndRejections (internal/process/task_queues.js:80:21)

How could we reproduce this issue?

pm2 start pm2.json
pm2.json

{
  "apps": [
    {
      "name": "portalogic-data-service",
      "script": "./app.js",
      "watch": false,
      "max_memory_restart": "256M",
      "output": "C:/inetpub/wwwroot/logs/portalogic-data-service-out.log",
      "error": "C:/inetpub/wwwroot/logs/portalogic-data-service-error.log"
    }
  ]
}

Supporting information

--- PM2 report ----------------------------------------------------------------
Date                 : Tue Jan 05 2021 15:03:11 GMT-0600 (Central Standard Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 4.5.1
node version         : 14.15.4
node path            : not found
argv                 : C:\Program Files\nodejs\node.exe,C:\Users\ADunsmoor\AppData\Roaming\npm\node_modules\pm2\lib\Daemon.js
argv0                : node
user                 : undefined
uid                  : N/A
gid                  : N/A
uptime               : 10min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 4.5.1
node version         : 14.15.4
node path            : not found
argv                 : C:\Program Files\nodejs\node.exe,C:\Users\ADunsmoor\AppData\Roaming\npm\node_modules\pm2\bin\pm2,report
argv0                : node
user                 : ADunsmoor
===============================================================================
--- System info --------------------------------------------
arch                 : x64
platform             : win32
type                 : Windows_NT
cpus                 : Intel(R) Core(TM) i5-9400H CPU @ 2.50GHz
cpus nb              : 8
freemem              : 6979551232
totalmem             : 16894464000
home                 : C:\Users\ADunsmoor
===============================================================================
--- PM2 list -----------------------------------------------
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
│ 0  │ portalogic-data-s… │ fork     │ 0    │ online    │ 0%       │ 0b       │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
T:\.pm2\pm2.log last 20 lines:
PM2        | 2021-01-05T14:59:38: PM2 error: Error caught while calling pidusage
PM2        | 2021-01-05T14:59:38: PM2 error: Error: Error: spawn wmic ENOENT
PM2        | 2021-01-05T14:59:38: PM2 error: Error caught while calling pidusage
PM2        | 2021-01-05T14:59:38: PM2 error: Error: Error: spawn wmic ENOENT
PM2        | 2021-01-05T14:59:41: PM2 error: Error caught while calling pidusage
PM2        | 2021-01-05T14:59:41: PM2 error: Error: Error: spawn wmic ENOENT
PM2        | 2021-01-05T15:00:11: PM2 error: Error caught while calling pidusage
PM2        | 2021-01-05T15:00:11: PM2 error: Error: Error: spawn wmic ENOENT
PM2        | 2021-01-05T15:00:41: PM2 error: Error caught while calling pidusage
PM2        | 2021-01-05T15:00:41: PM2 error: Error: Error: spawn wmic ENOENT
PM2        | 2021-01-05T15:01:11: PM2 error: Error caught while calling pidusage
PM2        | 2021-01-05T15:01:11: PM2 error: Error: Error: spawn wmic ENOENT
PM2        | 2021-01-05T15:01:41: PM2 error: Error caught while calling pidusage
PM2        | 2021-01-05T15:01:41: PM2 error: Error: Error: spawn wmic ENOENT
PM2        | 2021-01-05T15:02:11: PM2 error: Error caught while calling pidusage
PM2        | 2021-01-05T15:02:11: PM2 error: Error: Error: spawn wmic ENOENT
PM2        | 2021-01-05T15:02:41: PM2 error: Error caught while calling pidusage
PM2        | 2021-01-05T15:02:41: PM2 error: Error: Error: spawn wmic ENOENT
PM2        | 2021-01-05T15:03:11: PM2 error: Error caught while calling pidusage
PM2        | 2021-01-05T15:03:11: PM2 error: Error: Error: spawn wmic ENOENT

Windows 10 OS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions