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

First launch Error: scrypt.node, no suitable image found #121

Closed
inix opened this issue Apr 25, 2018 · 2 comments
Closed

First launch Error: scrypt.node, no suitable image found #121

inix opened this issue Apr 25, 2018 · 2 comments
Assignees

Comments

@inix
Copy link
Contributor

inix commented Apr 25, 2018

1.Errors description
1.1 npm run serve can not start up
1.2 backend-auth returned empty reply from server in step 3.
1.3 Where to find the certificates in step 4?

npm run serve

> jincor-backend-ico-dashboard@0.0.1 serve /Users/john/Documents/src/backend-ico-dashboard
> node ./dist/bin/www.js

module.js:681
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: dlopen(/Users/john/Documents/src/backend-ico-dashboard/node_modules/scrypt/build/Release/scrypt.node, 1): no suitable image found.  Did find:
	/Users/john/Documents/src/backend-ico-dashboard/node_modules/scrypt/build/Release/scrypt.node: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
	/Users/john/Documents/src/backend-ico-dashboard/node_modules/scrypt/build/Release/scrypt.node: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
    at Object.Module._extensions..node (module.js:681:18)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/john/Documents/src/backend-ico-dashboard/node_modules/scrypt/index.js:3:20)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/john/Documents/src/backend-ico-dashboard/node_modules/scrypt.js/node.js:1:76)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jincor-backend-ico-dashboard@0.0.1 serve: `node ./dist/bin/www.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the jincor-backend-ico-dashboard@0.0.1 serve 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!     /Users/john/.npm/_logs/2018-04-25T05_10_24_783Z-debug.log

debug.log output:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'serve' ]
2 info using npm@6.0.0
3 info using node@v8.10.0
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle jincor-backend-ico-dashboard@0.0.1~preserve: jincor-backend-ico-dashboard@0.0.1
6 info lifecycle jincor-backend-ico-dashboard@0.0.1~serve: jincor-backend-ico-dashboard@0.0.1
7 verbose lifecycle jincor-backend-ico-dashboard@0.0.1~serve: unsafe-perm in lifecycle true
8 verbose lifecycle jincor-backend-ico-dashboard@0.0.1~serve: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/john/Documents/src/backend-ico-dashboard/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle jincor-backend-ico-dashboard@0.0.1~serve: CWD: /Users/john/Documents/src/backend-ico-dashboard
10 silly lifecycle jincor-backend-ico-dashboard@0.0.1~serve: Args: [ '-c', 'node ./dist/bin/www.js' ]
11 silly lifecycle jincor-backend-ico-dashboard@0.0.1~serve: Returned: code: 1  signal: null
12 info lifecycle jincor-backend-ico-dashboard@0.0.1~serve: Failed to exec serve script
13 verbose stack Error: jincor-backend-ico-dashboard@0.0.1 serve: `node ./dist/bin/www.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:283:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid jincor-backend-ico-dashboard@0.0.1
15 verbose cwd /Users/john/Documents/src/backend-ico-dashboard
16 verbose Darwin 16.7.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "serve"
18 verbose node v8.10.0
19 verbose npm  v6.0.0
20 error code ELIFECYCLE
21 error errno 1
22 error jincor-backend-ico-dashboard@0.0.1 serve: `node ./dist/bin/www.js`
22 error Exit status 1
23 error Failed at the jincor-backend-ico-dashboard@0.0.1 serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

1.2 backend-auth error
There is an empty response error after a post to tenant.

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data-binary "{
    \"email\": \"test2@test.com\",
    \"password\": \"Password2\"
}" \
'http://auth:3000/tenant'

It returned "curl: (52) Empty reply from server".

2.dev environment

OS:Mac OS Sierra
Docker: Version 18.03.0-ce-mac60 (23751)

3.docker-compose ps
related container should be start normally.

            Name                          Command               State                                 Ports                               
------------------------------------------------------------------------------------------------------------------------------------------
backendicodashboard_auth_1     /bin/sh -c npm start             Up      0.0.0.0:32771->3000/tcp, 0.0.0.0:32770->4000/tcp                  
backendicodashboard_ico_1      /bin/sh                          Up      0.0.0.0:3000->3000/tcp,0.0.0.0:80->3000/tcp, 0.0.0.0:443->4000/tcp
backendicodashboard_mongo_1    /root/run.sh mongod              Up      0.0.0.0:27017->27017/tcp, 0.0.0.0:28017->28017/tcp                
backendicodashboard_redis_1    docker-entrypoint.sh redis ...   Up      0.0.0.0:32768->6379/tcp                                           
backendicodashboard_rpc_1      /bin/sh -c /parity/parity  ...   Up      8080/tcp, 8180/tcp, 8545/tcp, 0.0.0.0:32769->8546/tcp             
backendicodashboard_verify_1   /bin/sh -c npm run serve         Up                                                                        

4.auth and verify module
I have also setup auth and verify module: backend-verify and backend-auth.

There is an empty response error after a post to tenant.

curl --include \
     --request POST \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data-binary "{
    \"email\": \"test2@test.com\",
    \"password\": \"Password2\"
}" \
'http://auth:3000/tenant'

It returned "curl: (52) Empty reply from server".

4.1 backend-auth

docker-compose ps
       Name                      Command               State                        Ports                      
---------------------------------------------------------------------------------------------------------------
backendauth_auth_1    /bin/sh -c npm start             Up      0.0.0.0:32782->3000/tcp, 0.0.0.0:32781->4000/tcp
backendauth_redis_1   docker-entrypoint.sh redis ...   Up      0.0.0.0:32780->6379/tcp 

4.2 backend-verify

docker-compose ps
         Name                       Command               State                        Ports                      
------------------------------------------------------------------------------------------------------------------
backendverify_redis_1    docker-entrypoint.sh redis ...   Up      0.0.0.0:32775->6379/tcp                         
backendverify_verify_1   /bin/sh                          Up      0.0.0.0:32777->3000/tcp, 0.0.0.0:32776->4000/tcp

4.3 backend-auth test process
authtest.log

4.4 backend-verify test process
verifytest.log

5.my dns setup

/etc/hosts
127.0.0.1 auth
127.0.0.1 verify

How to fix these errors?

Thanks

@inix
Copy link
Contributor Author

inix commented Apr 29, 2018

Dear Developers,I can fix no suitable image found by install following command inside the ico docker container and generate JWT tanent token sussefully:
npm install -g node-gyp
npm install scrypt

Maybe we missed something in package file?

@inix
Copy link
Contributor Author

inix commented May 2, 2018

I have fixed by install dependencies before start docker.
Thanks
docker-compose exec ico npm i && docker-compose exec ico npm run build before docker-compose up -d

@inix inix closed this as completed May 2, 2018
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

2 participants