ElectricBrainUK / UnraidAPI

A WIP open source Node JS API for controlling UNraid
GNU General Public License v3.0
125 stars 13 forks source link

VMs don't show up. #24

Open jfrancais opened 4 years ago

jfrancais commented 4 years ago

I have installed the docker container and all my containers show up in Home Assistant as expected. I can toggle them on and off. VMs, while they appear in entities they also have no status and I can't toggle them on and off.

To Reproduce Steps to reproduce the behavior:

Expected behavior should show on or off

Unraid server (please complete the following information):

Unraidapi docker container (please complete the following information):

Seeing a bunch of lines containing (I removed my domain name for privacy) in the docker log getaddrinfo EAI_AGAIN domainnameremoved Get VM Details for ip: domainnameremoved Failed with status code: undefined

WaaromZoMoeilijk commented 4 years ago

Could you post the entire log with private data redacted? Also a screen of your settings of the unraid docker template would help.

Before that try restarting the container and wait a short while then check if its back online in HA.

jfrancais commented 4 years ago

Never fails, I've beern having this issue for weeks. Container restarted, HA restarted, unRaid restarted, nothing fixed. I post on github and it self resolves within a few hours. All working fine now.

cismarine commented 3 years ago

same here

SxC97 commented 1 year ago

Hello, I have the same issue with VMs not showing up.

I tried going to the webUI and adding the server via both the IP address and \<hash>.unraid.net and the latter seems to work much better as the docker info now shows up but the VMs still don't.

Running curl -q http://192.168.0.10:3005/api/getServers | jq returns a response but running curl -X POST http://192.168.0.10:3005/api/vmStatus | jq returns curl: (52) Empty reply from server.

I'm not trying to use MQTT or HA, at the moment I just want to use REST.

I've pasted the entire container log below and also a screenshot of my docker mappings.


    at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm notice 
npm notice New minor version of npm available! 8.5.5 -> 8.16.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.16.0>
npm notice Run `npm install -g npm@8.16.0` to update!
npm notice 

 WARN  mode option is deprecated. You can safely remove it from nuxt.config

(node:26) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /app/node_modules/@nuxt/components/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
undefined:1

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at IncomingMessage.<anonymous> (/app/api/changeVMStatus.js:10:17)
    at IncomingMessage.emit (node:events:539:35)
    at IncomingMessage.emit (node:domain:475:12)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

 WARN  mode option is deprecated. You can safely remove it from nuxt.config

(node:26) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /app/node_modules/@nuxt/components/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
undefined:1

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at IncomingMessage.<anonymous> (/app/api/changeVMStatus.js:10:17)
    at IncomingMessage.emit (node:events:539:35)
    at IncomingMessage.emit (node:domain:475:12)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

 WARN  mode option is deprecated. You can safely remove it from nuxt.config

(node:27) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /app/node_modules/@nuxt/components/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
undefined:1

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at IncomingMessage.<anonymous> (/app/api/changeVMStatus.js:10:17)
    at IncomingMessage.emit (node:events:539:35)
    at IncomingMessage.emit (node:domain:475:12)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

 WARN  mode option is deprecated. You can safely remove it from nuxt.config

(node:27) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /app/node_modules/@nuxt/components/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)

> unraidapi@0.5.0 start
> cross-env NUXT_HOST=0.0.0.0 NODE_ENV=production node server/index.js

 READY  Server listening on http://0.0.0.0:80

> unraidapi@0.5.0 start
> cross-env NUXT_HOST=0.0.0.0 NODE_ENV=production node server/index.js

 READY  Server listening on http://0.0.0.0:80

> unraidapi@0.5.0 start
> cross-env NUXT_HOST=0.0.0.0 NODE_ENV=production node server/index.js

 READY  Server listening on http://0.0.0.0:80

Get Dashboard Details for ip: 192.168.0.10 Failed with status code: undefined
socket hang up

> unraidapi@0.5.0 start
> cross-env NUXT_HOST=0.0.0.0 NODE_ENV=production node server/index.js

 READY  Server listening on http://0.0.0.0:80

Get Docker Details for ip: 192.168.0.10 Failed
Request failed with status code 503
Get VM Details for ip: 192.168.0.10 Failed
Request failed with status code 503
Get Main Details for ip: 192.168.0.10 Failed
Request failed with status code 503
Get Main Details for ip: 192.168.0.10 Failed
Request failed with status code 503
Get Main Details for ip: 192.168.0.10 Failed
Request failed with status code 503
Get Docker Details for ip: 192.168.0.10 Failed
Request failed with status code 503
Get Main Details for ip: 192.168.0.10 Failed
Request failed with status code 503
Get Main Details for ip: 192.168.0.10 Failed
Request failed with status code 503
Get Docker Details for ip: 192.168.0.1
Screen Shot 2022-08-05 at T04 27 21
mikeinblue commented 1 year ago

I have the same problem.

log:

pm ERR! command failed npm ERR! signal SIGTERM npm ERR! command sh -c cross-env NUXT_HOST=0.0.0.0 NODE_ENV=production node server/index.js

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-05-04T13_06_36_278Z-debug-0.log

WARN mode option is deprecated. You can safely remove it from nuxt.config

(node:26) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /app/node_modules/@nuxt/components/package.json. Update this package.json to use a subpath pattern like "./*". (Use node --trace-deprecation ... to show where the warning was created)

unraidapi@0.5.0 start cross-env NUXT_HOST=0.0.0.0 NODE_ENV=production node server/index.js

READY Server listening on http://0.0.0.0:80

Connected to mqtt broker Get VM Details for ip: 192.168.22.195 Failed Cannot read properties of undefined (reading 'children') Get VM Details for ip: 192.168.22.195 Failed Cannot read properties of undefined (