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

Unhandled rejection Error: HTTP code is 404 #6

Open
fullyfaltu opened this issue Mar 20, 2017 · 2 comments
Open

Unhandled rejection Error: HTTP code is 404 #6

fullyfaltu opened this issue Mar 20, 2017 · 2 comments

Comments

@fullyfaltu
Copy link

I'm trying to notify my slack channel for every docker event. But couldn't succeed yet. Got following error:

Unhandled rejection Error: HTTP code is 404 which indicates error: no such container - [object Object]

How can I solve this issue? Thanks in advance.

@rene-regalado
Copy link

rene-regalado commented Apr 4, 2017

Hi @fullyfaltu I'm getting the same error please let me know if you know how to resolve this error or if you got any answer about this error from @int128.

Thanks in adavance

@kwiky
Copy link

kwiky commented May 3, 2017

Hi,

This is because dockerode stream other event types than container (like network or volume)

Examples :

{ Type: 'volume',
  Action: 'mount',
  Actor:
   { ID: 'mysql_data',
     Attributes:
      { container: 'd2169583beae6b4916626422a5907f05c7e74d718191b96c1f768181bf47f511',
        destination: '/var/lib/mysql',
        driver: 'local',
        propagation: '',
        'read/write': 'true' } },
  time: 1493816904,
  timeNano: '1493816904332490264' }

or

{ Type: 'network',
  Action: 'connect',
  Actor:
   { ID: 'fbf740ad0300aa6a60c8a381c848c80d6721f343c9d2a6738e2a1f24d73725d4',
     Attributes:
      { container: 'd2169583beae6b4916626422a5907f05c7e74d718191b96c1f768181bf47f511',
        name: 'mysql_network',
        type: 'bridge' } },
  time: 1493816904,
  timeNano: '1493816904304038536' }

You have to filter those events at line 15
https://github.com/int128/slack-docker/blob/master/app.js#L15

if ((!event.Type || event.Type == 'container') && this._imageRegExp.test(event.from)) {

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