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

Invalid ELF header error thrown #58

Open
keerthivasan-r opened this issue Apr 27, 2016 · 6 comments
Open

Invalid ELF header error thrown #58

keerthivasan-r opened this issue Apr 27, 2016 · 6 comments

Comments

@keerthivasan-r
Copy link

I have built docker images for i05 iteration using Docker quick terminal in windows 8.1. It built successfully. when i try to run using Kitematic, i get the following error.

Code: plugin_load_failed

Details: { 'orig$':
   { [Error: use-plugin: Could not load plugin mesh defined in seneca-mesh due t
o error: /node_modules/msgpack/build/Release/msgpackBinding.node: invalid ELF he
ader.]
     eraro: true,
     orig: null,
     code: 'load_failed',
     'use-plugin': true,
     package: 'use-plugin',
     msg: 'use-plugin: Could not load plugin mesh defined in seneca-mesh due to
error: /node_modules/msgpack/build/Release/msgpackBinding.node: invalid ELF head
er.',
     details:
      { options: { auto: true },
        callback: undefined,
        history:
         [ { module: '/node_modules/chairo/node_modules/seneca/seneca.js',
             path: 'mesh' },
           { module: '/node_modules/chairo/node_modules/seneca/seneca.js',
             path: 'seneca-mesh' } ],
        name: 'mesh',
        search:
         [ { type: 'normal', name: 'mesh' },
           { type: 'normal', name: 'seneca-mesh' },
           { type: 'normal', name: './mesh' },
           { type: 'normal', name: './seneca-mesh' } ],
        err: [Error: /node_modules/msgpack/build/Release/msgpackBinding.node: in
valid ELF header],
        found: { type: 'normal', name: 'seneca-mesh' },
        found_name: 'seneca-mesh',
        err_msg: '/node_modules/msgpack/build/Release/msgpackBinding.node: inval
id ELF header' },
     callpoint: 'at Seneca.api_use [as use] (/node_modules/chairo/node_modules/s
eneca/seneca.js:964:29)' },
  'message$': 'use-plugin: Could not load plugin mesh defined in seneca-mesh due
 to error: /node_modules/msgpack/build/Release/msgpackBinding.node: invalid ELF
header.' }

Stack:
    at errormaker (/node_modules/eraro/eraro.js:94:15)
    at handle_load_error (/node_modules/use-plugin/use.js:262:12)
    at loadplugin (/node_modules/use-plugin/use.js:205:13)
    at Object.use (/node_modules/use-plugin/use.js:87:7)
    at Seneca.api_use [as use] (/node_modules/chairo/node_modules/seneca/seneca.
js:964:29)
    at /srv/app-dev.js:20:8
    at module.exports (/app.js:77:3)
    at Object.<anonymous> (/srv/app-dev.js:5:14)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

Can anyone help on this?

@matt-oc
Copy link
Member

matt-oc commented Apr 27, 2016

Did i04 and i03 etc work for you?

@stuartblair
Copy link
Contributor

stuartblair commented Apr 28, 2016

I had a similar issue. The problem is caused when you build the docker images having first run an npm build on your host machine (your windows box in your case). That creates a node_modules directory which contains binary some binary dependencies which aren't portable between your host machine and the Linux Docker image. That's what's causing the ELF header warnings. It's saying that it doesn't understand the library header for for what it expected to be a linux shared object library.

Easy way to fix it is just to remove the node_modules directories before you build the docker containers.
A better fix would be if we did an addition of node_modules into the .dockerignore file and did a wee pull request. Though since I'm far from an expert in Node, I'd love to get someone else's opinion on this as a fix.

@keerthivasan-r
Copy link
Author

Ok , i will try that and let you know.

@keerthivasan-r
Copy link
Author

I removed npm_modules and did npm install in the Docker terminal (Linux VM). I built the image again. when i run it, again the same error is thrown.

Seneca Fatal Error
==================

Message: seneca: use-plugin: Could not load plugin mesh defined in seneca-mesh d
ue to error: /node_modules/msgpack/build/Release/msgpackBinding.node: invalid EL
F header.

Code: plugin_load_failed

Details: { 'orig$':
   { [Error: use-plugin: Could not load plugin mesh defined in seneca-mesh due t
o error: /node_modules/msgpack/build/Release/msgpackBinding.node: invalid ELF he
ader.]
     eraro: true,
     orig: null,
     code: 'load_failed',
     'use-plugin': true,
     package: 'use-plugin',
     msg: 'use-plugin: Could not load plugin mesh defined in seneca-mesh due to
error: /node_modules/msgpack/build/Release/msgpackBinding.node: invalid ELF head
er.',
     details:
      { options: { auto: true },
        callback: undefined,
        history:
         [ { module: '/node_modules/chairo/node_modules/seneca/seneca.js',
             path: 'mesh' },
           { module: '/node_modules/chairo/node_modules/seneca/seneca.js',
             path: 'seneca-mesh' } ],
        name: 'mesh',
        search:
         [ { type: 'normal', name: 'mesh' },
           { type: 'normal', name: 'seneca-mesh' },
           { type: 'normal', name: './mesh' },
           { type: 'normal', name: './seneca-mesh' } ],
        err: [Error: /node_modules/msgpack/build/Release/msgpackBinding.node: in
valid ELF header],
        found: { type: 'normal', name: 'seneca-mesh' },
        found_name: 'seneca-mesh',
        err_msg: '/node_modules/msgpack/build/Release/msgpackBinding.node: inval
id ELF header' },
     callpoint: 'at Seneca.api_use [as use] (/node_modules/chairo/node_modules/s
eneca/seneca.js:964:29)' },
  'message$': 'use-plugin: Could not load plugin mesh defined in seneca-mesh due
 to error: /node_modules/msgpack/build/Release/msgpackBinding.node: invalid ELF
header.' }

Stack:
    at errormaker (/node_modules/eraro/eraro.js:94:15)
    at handle_load_error (/node_modules/use-plugin/use.js:262:12)
    at loadplugin (/node_modules/use-plugin/use.js:205:13)
    at Object.use (/node_modules/use-plugin/use.js:87:7)
    at Seneca.api_use [as use] (/node_modules/chairo/node_modules/seneca/seneca.
js:964:29)
    at /srv/app-dev.js:20:8
    at module.exports (/app.js:77:3)
    at Object.<anonymous> (/srv/app-dev.js:5:14)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

@keerthivasan-r
Copy link
Author

@matt-oc I did try to do the same thing with i04. it just works fine. Thanks guys! Let me know if you get any findings.

@sndwch
Copy link

sndwch commented Jul 27, 2016

npm rebuild fixes these errors for me.

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

4 participants