hipache / hipache

Hipache: a distributed HTTP and websocket proxy
http://blog.dotcloud.com/announcing-hipache-dotclouds-open-source-webs
Other
2.26k stars 244 forks source link

Anybody able to run the functional tests? #223

Open arnaudsj opened 9 years ago

arnaudsj commented 9 years ago

Hi,

I am attempting to run the test suite prior to start work on some modifications that might result in a PR, but I am unable to run the functional tests in Node for some reason.

Any ideas?

hipache@a1ea6fe3d7c6:~/hipache$ gulp test:func
[16:03:10] Using gulpfile ~/hipache/gulpfile.js
[16:03:10] Starting 'test:func'...

sill Server#redis-server started with [ '-' ] and []
sill Server#redis-server                  _._
sill Server#redis-server            _.-``__ ''-._
sill Server#redis-server       _.-``    `.  `_.  ''-._           Redis 2.8.4 (00000000/0) 64 bit
sill Server#redis-server   .-`` .-```.  ```\/    _.,_ ''-._
sill Server#redis-server  (    '      ,       .-`  | `,    )     Running in stand alone mode
sill Server#redis-server  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 7777
sill Server#redis-server  |    `-._   `._    /     _.-'    |     PID: 21
sill Server#redis-server   `-._    `-._  `-./  _.-'    _.-'
sill Server#redis-server  |`-._`-._    `-.__.-'    _.-'_.-'|
sill Server#redis-server  |    `-._`-._        _.-'_.-'    |           http://redis.io
sill Server#redis-server   `-._    `-._`-.__.-'_.-'    _.-'
sill Server#redis-server  |`-._`-._    `-.__.-'    _.-'_.-'|
sill Server#redis-server  |    `-._`-._        _.-'_.-'    |
sill Server#redis-server   `-._    `-._`-.__.-'_.-'    _.-'
sill Server#redis-server       `-._    `-.__.-'    _.-'
sill Server#redis-server           `-._        _.-'
sill Server#redis-server               `-.__.-'
sill Server#redis-server
sill Server#redis-server
sill Server#redis-server  [21] 22 Apr 16:03:11.114 # Server started, Redis version 2.8.4
sill Server#redis-server [21] 22 Apr 16:03:11.114 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
sill Server#redis-server [21] 22 Apr 16:03:11.115 * DB loaded from disk: 0.000 seconds
sill Server#redis-server [21] 22 Apr 16:03:11.115 * The server is now ready to accept connections on port 7777
sill Server#redis-server
sill Server#./bin/hipache started with [ '-c' ] and [ 'test/fixtures/configs/hipache-config.json' ]
ERR! Server#./bin/hipache
ERR! Server#./bin/hipache
ERR! Server#./bin/hipache  util.js:556
ERR! Server#./bin/hipache   ctor.prototype = Object.create(superCtor.prototype, {
ERR! Server#./bin/hipache                                           ^
ERR! Server#./bin/hipache
ERR! Server#./bin/hipache  TypeError: Cannot read property 'prototype' of undefined
ERR! Server#./bin/hipache     at Object.exports.inherits (util.js:556:43)
ERR! Server#./bin/hipache     at Object.<anonymous> (/home/hipache/hipache/node_modules/http-proxy/lib/http-proxy/index.js:111:17)
ERR! Server#./bin/hipache     at Module._compile (module.js:456:26)
ERR! Server#./bin/hipache     at Object.Module._extensions..js (module.js:474:10)
ERR! Server#./bin/hipache     at Module.load (module.js:356:32)
ERR! Server#./bin/hipache     at Function.Module._load (module.js:312:12)
ERR! Server#./bin/hipache     at Module.require (module.js:364:17)
ERR! Server#./bin/hipache     at require (module.js:380:17)
ERR! Server#./bin/hipache     at Object.<anonymous> (/home/hipache/hipache/node_modules/http-proxy/lib/http-proxy.js:4:17)
ERR! Server#./bin/hipache     at Module._compile (module.js:456:26)
ERR! Server#./bin/hipache
sill Server#./bin/hipache  Done with exit code 8
docker run -it opinionlab/surrogate-hipache:test bash
hipache@a1ea6fe3d7c6:~/hipache$ gulp test:func
[16:03:10] Using gulpfile ~/hipache/gulpfile.js
[16:03:10] Starting 'test:func'...

sill Server#redis-server started with [ '-' ] and []
sill Server#redis-server                  _._
sill Server#redis-server            _.-``__ ''-._
sill Server#redis-server       _.-``    `.  `_.  ''-._           Redis 2.8.4 (00000000/0) 64 bit
sill Server#redis-server   .-`` .-```.  ```\/    _.,_ ''-._
sill Server#redis-server  (    '      ,       .-`  | `,    )     Running in stand alone mode
sill Server#redis-server  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 7777
sill Server#redis-server  |    `-._   `._    /     _.-'    |     PID: 21
sill Server#redis-server   `-._    `-._  `-./  _.-'    _.-'
sill Server#redis-server  |`-._`-._    `-.__.-'    _.-'_.-'|
sill Server#redis-server  |    `-._`-._        _.-'_.-'    |           http://redis.io
sill Server#redis-server   `-._    `-._`-.__.-'_.-'    _.-'
sill Server#redis-server  |`-._`-._    `-.__.-'    _.-'_.-'|
sill Server#redis-server  |    `-._`-._        _.-'_.-'    |
sill Server#redis-server   `-._    `-._`-.__.-'_.-'    _.-'
sill Server#redis-server       `-._    `-.__.-'    _.-'
sill Server#redis-server           `-._        _.-'
sill Server#redis-server               `-.__.-'
sill Server#redis-server
sill Server#redis-server
sill Server#redis-server  [21] 22 Apr 16:03:11.114 # Server started, Redis version 2.8.4
sill Server#redis-server [21] 22 Apr 16:03:11.114 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
sill Server#redis-server [21] 22 Apr 16:03:11.115 * DB loaded from disk: 0.000 seconds
sill Server#redis-server [21] 22 Apr 16:03:11.115 * The server is now ready to accept connections on port 7777
sill Server#redis-server
sill Server#./bin/hipache started with [ '-c' ] and [ 'test/fixtures/configs/hipache-config.json' ]
ERR! Server#./bin/hipache
ERR! Server#./bin/hipache
ERR! Server#./bin/hipache  util.js:556
ERR! Server#./bin/hipache   ctor.prototype = Object.create(superCtor.prototype, {
ERR! Server#./bin/hipache                                           ^
ERR! Server#./bin/hipache
ERR! Server#./bin/hipache  TypeError: Cannot read property 'prototype' of undefined
ERR! Server#./bin/hipache     at Object.exports.inherits (util.js:556:43)
ERR! Server#./bin/hipache     at Object.<anonymous> (/home/hipache/hipache/node_modules/http-proxy/lib/http-proxy/index.js:111:17)
ERR! Server#./bin/hipache     at Module._compile (module.js:456:26)
ERR! Server#./bin/hipache     at Object.Module._extensions..js (module.js:474:10)
ERR! Server#./bin/hipache     at Module.load (module.js:356:32)
ERR! Server#./bin/hipache     at Function.Module._load (module.js:312:12)
ERR! Server#./bin/hipache     at Module.require (module.js:364:17)
ERR! Server#./bin/hipache     at require (module.js:380:17)
ERR! Server#./bin/hipache     at Object.<anonymous> (/home/hipache/hipache/node_modules/http-proxy/lib/http-proxy.js:4:17)
ERR! Server#./bin/hipache     at Module._compile (module.js:456:26)
ERR! Server#./bin/hipache
sill Server#./bin/hipache  Done with exit code 8
nathwill commented 9 years ago

i'm seeing this issue as well, not just when testing, but just a basic installation blows up with these errors as well.

nathwill commented 9 years ago

so, apparently if you update the dep for http-proxy to lock eventemitter3 to 0.1.6, it works...

nathwill commented 9 years ago

aha: https://github.com/primus/eventemitter3/issues/29

arnaudsj commented 9 years ago

@nathwill thank you. I had pinpointed it to eventemmitter, but did not go any further. Great catch! Thank you for your help!

nathwill commented 9 years ago

@arnaudsj sure thing!

i'm just an operator trying to get hipache working in one of our systems, so i'm not sure about the right way to fix it in a more permanent fashion, but as it stands, both HEAD and the 0.3.x branch are completely broken on installation without manual intervention afterwards :cry:

it'd be great if we could get an 0.3.2 release that somehow locks down the http-proxy deps as well. anybody know if that's possible?

nathwill commented 9 years ago

ok, looks like "shrinkwrap" is a thing (cool!), and it seems less intrusive than the work that would be needed to update to the latest http-proxy that actually has some kind of pinning, so i set up a branch with the intention of submitting a PR for the stable release (0.3.1 -> 0.3.2), but there's no branch on this repo for the stable release, so nothing to PR against.... /cc @dmp42 how would you like to handle this?

willdurand commented 9 years ago

Create a PR on master. A new version should be released at some point.

nathwill commented 9 years ago

@willdurand okey doke. fwiw, a new 0.3.x release'd be nice as well, since a lot has changed on master since 0.3.1 that requires a bit more involved effort and testing for us before we're willing or able to drop it into production.

willdurand commented 9 years ago

sure. I guess the best plan would be to release a 0.3.2 with your pinning PR (and maybe one or two "bug" fixes), and to release 0.4 right after. (poke @dmp42)

sdwr98 commented 9 years ago

@nathwill @willdurand Is there any way to fix an NPM install right now-ish? I've got a prod system that was being rebuilt and is now broken because of this.

dmp42 commented 9 years ago

Thanks for the work on this guys. Sorry for I sucked so much at releasing lately. Will take a look ASAP.

sdwr98 commented 9 years ago

to answer my own question, after an NPM install of hipache, I went into /usr/lib/node_modules/hipache/node_modules/http-proxy/package.json, fixed the version of eventemitter3 to 0.1.6, and ran npm install in that directory. That's probably not the node-ish way of doing it, but it worked.

fpereiro commented 9 years ago

For anyone looking for a workaround to this issue if they are running Hipache within a Docker container, the following Dockerfile command worked for me:

RUN npm install eventemitter3@0.1.6 hipache@0.3.1 -g --production

nathwill commented 9 years ago

@dmp42 any update on this? we're working on determining if this project is still maintained; from what i can gather it sounds like dotcloud may have switched to an nginx-lua-based implementation internally? is there still interest in maintaining hipache, or should we start looking to switch to another solution?

whatever the situation is is fine, we're just trying to determine our best option going forward.

yoanisgil commented 9 years ago

Seem issue here. Made it work with hack from @fpereiro however I have the same concern as @nathwill. Is the project actively supported?