Skip to content
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

error Failed at the [email protected] start script #66

Open
rossyell opened this issue May 24, 2020 · 2 comments
Open

error Failed at the [email protected] start script #66

rossyell opened this issue May 24, 2020 · 2 comments

Comments

@rossyell
Copy link

Absolutely awesome work - when it is running. I really hope this is a project that continues.

I seem to be having similar problems to those described by #4. I am running on Pi4 with latest version of raspberrian lite - and am running later version of nodejs.

The rot starts here:

[WS] CLIENT_CONNECT: Socket clients (23)
[WS] STATUS: Socket clients (23)
/bin/sh: 1: ./bin/dhcpd-pools: Exec format error
GET /get_stats 500 45.400 ms - 1015
RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 2
at ServerResponse.writeHead (_http_server.js:248:11)
at ServerResponse.writeHead (/opt/glass-isc-dhcp/node_modules/on-headers/index.js:55:19)
at ServerResponse._implicitHeader (http_server.js:239:8)
at write
(_http_outgoing.js:650:9)
at ServerResponse.end (_http_outgoing.js:761:5)
at ServerResponse.send (/opt/glass-isc-dhcp/node_modules/express/lib/response.js:221:10)
at /opt/glass-isc-dhcp/app.js:84:6
at Layer.handle_error (/opt/glass-isc-dhcp/node_modules/express/lib/router/layer.js:71:5)
at trim_prefix (/opt/glass-isc-dhcp/node_modules/express/lib/router/index.js:315:13)
at /opt/glass-isc-dhcp/node_modules/express/lib/router/index.js:284:7
GET /dhcp_statistics 304 8.373 ms - -
GET /assets/plugins/node-waves/waves.css 304 7.579 ms - -
GET /assets/plugins/bootstrap/css/bootstrap.css 304 10.556 ms - -
GET /assets/plugins/morris/morris.css 304 5.773 ms - -

and runs well for a while until

/api/get_mac_oui_count_by_vendor 304 3.244 ms - -
GET /api/get_dhcp_requests 304 2.323 ms - -
[WS] CLIENT_CONNECT: Socket clients (24)
[WS] STATUS: Socket clients (1)
GET /assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.woff2 304 3.854 ms - -
GET /images/glass_logo.png 200 9.766 ms - 22041
[WS] STATUS: Socket clients (1)
[WS] STATUS: Socket clients (1)
[Glass Server] Alert loop started
/bin/sh: 1: ./bin/dhcpd-pools: Exec format error
child_process.js:669
throw err;
^
Error: Command failed: ./bin/dhcpd-pools -c /etc/dhcp/dhcpd.conf -l /var/lib/dhcp/dhcpd.leases -f j -A -s e
/bin/sh: 1: ./bin/dhcpd-pools: Exec format error

at checkExecSyncError (child_process.js:630:11)
at execSync (child_process.js:666:15)
at Timeout._onTimeout (/opt/glass-isc-dhcp/app.js:322:21)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {

status: 2,
signal: null,
output: [
null,
,
<Buffer 2f 62 69 6e 2f 73 68 3a 20 31 3a 20 2e 2f 62 69 6e 2f 64 68 63 70 64 2d 70 6f 6f 6c 73 3a 20 45 78 65 63 20 66 6f 72 6d 61 74 20 65 72 72 6f 72 0a>
],
pid: 3367,
stdout: ,
stderr: <Buffer 2f 62 69 6e 2f 73 68 3a 20 31 3a 20 2e 2f 62 69 6e 2f 64 68 63 70 64 2d 70 6f 6f 6c 73 3a 20 45 78 65 63 20 66 6f 72 6d 61 74 20 65 72 72 6f 72 0a>
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node ./bin/www
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-05-24T02_10_21_054Z-debug.log

The referred log looks like:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 info lifecycle [email protected]
start: [email protected]
7 verbose lifecycle [email protected]start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/glass-isc-dhcp/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle [email protected]start: CWD: /opt/glass-isc-dhcp
10 silly lifecycle [email protected]
start: Args: [ '-c', 'node ./bin/www' ]
11 silly lifecycle [email protected]start: Returned: code: 1 signal: null
12 info lifecycle [email protected]
start: Failed to exec start script
13 verbose stack Error: [email protected] start: node ./bin/www
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd /opt/glass-isc-dhcp
16 verbose Linux 4.19.97-v7l+
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v12.16.3
19 verbose npm v6.14.5
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: node ./bin/www
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

I guessed it might be something do with dhcpd-pools and went through the second part of the instructions to install - fails to install and looks like my pi4 has a different directory structure ?

Unfortunately now way beyond my abilities. Any suggestions ?

@rojarrolla
Copy link

Hi, I have something very similar, I installed it in UNRAID, but, besides that it crashes, I can´t make changes because the glassadmin is not recoginized at the GUI.

Do you know what is going on?
Attached is my log.

ISC DHCP GLASS Log.txt

Thanks for your help

@rvtv
Copy link

rvtv commented Jun 11, 2020

Absolutely awesome work - when it is running. I really hope this is a project that continues.

I seem to be having similar problems to those described by #4. I am running on Pi4 with latest version of raspberrian lite - and am running later version of nodejs.

The rot starts here:

[WS] CLIENT_CONNECT: Socket clients (23)
[WS] STATUS: Socket clients (23)
/bin/sh: 1: ./bin/dhcpd-pools: Exec format error
GET /get_stats 500 45.400 ms - 1015
RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 2
at ServerResponse.writeHead (_http_server.js:248:11)
at ServerResponse.writeHead (/opt/glass-isc-dhcp/node_modules/on-headers/index.js:55:19)
at ServerResponse._implicitHeader (http_server.js:239:8) at write (_http_outgoing.js:650:9)
at ServerResponse.end (_http_outgoing.js:761:5)
at ServerResponse.send (/opt/glass-isc-dhcp/node_modules/express/lib/response.js:221:10)
at /opt/glass-isc-dhcp/app.js:84:6
at Layer.handle_error (/opt/glass-isc-dhcp/node_modules/express/lib/router/layer.js:71:5)
at trim_prefix (/opt/glass-isc-dhcp/node_modules/express/lib/router/index.js:315:13)
at /opt/glass-isc-dhcp/node_modules/express/lib/router/index.js:284:7
GET /dhcp_statistics 304 8.373 ms - -
GET /assets/plugins/node-waves/waves.css 304 7.579 ms - -
GET /assets/plugins/bootstrap/css/bootstrap.css 304 10.556 ms - -
GET /assets/plugins/morris/morris.css 304 5.773 ms - -

and runs well for a while until

/api/get_mac_oui_count_by_vendor 304 3.244 ms - -
GET /api/get_dhcp_requests 304 2.323 ms - -
[WS] CLIENT_CONNECT: Socket clients (24)
[WS] STATUS: Socket clients (1)
GET /assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.woff2 304 3.854 ms - -
GET /images/glass_logo.png 200 9.766 ms - 22041
[WS] STATUS: Socket clients (1)
[WS] STATUS: Socket clients (1)
[Glass Server] Alert loop started
/bin/sh: 1: ./bin/dhcpd-pools: Exec format error
child_process.js:669
throw err;
^
Error: Command failed: ./bin/dhcpd-pools -c /etc/dhcp/dhcpd.conf -l /var/lib/dhcp/dhcpd.leases -f j -A -s e
/bin/sh: 1: ./bin/dhcpd-pools: Exec format error

at checkExecSyncError (child_process.js:630:11)
at execSync (child_process.js:666:15)
at Timeout._onTimeout (/opt/glass-isc-dhcp/app.js:322:21)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {

...

Unfortunately now way beyond my abilities. Any suggestions ?

I think the issue is that dhcpd-pools actually is a binary executable and compiled for a different architecture then the arm architecture of the rpi. I worked around that by installing dhcpd-pools with apt (running glass-isc-dhcp in a docker container on a pi4) and replacing the dhcpd-pools file in the bin directory with a symlink to the newly installed version. IT's a bit of a hack but I got glass-isc-dhcp running that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants