Can't start Docker client containers

#1

Both creation of a javascript client container and a python client container fail, see below.
I’m on a Mac OSX, and only used the three docker run commands mentioned on https://github.com/crossbario/crossbar-docker

(so linux installation of Docker or running makefiles).

Log lines in the Crossbar container are as expected;

I can connect in the webbrowser to http://localhost:8080 (where JS console claims to run AutobahnJS 0.11.1)

Any ideas on what is wrong?

Thanks,

Roger

roger@Roger-Mac ~> docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

43ba73a88403 crossbario/crossbar “crossbar start --cbd” 46 minutes ago Up 46 minutes 8000/tcp, 0.0.0.0:8080->8080/tcp berserk_chandrasekhar

roger@Roger-Mac ~> docker run -it crossbario/autobahn-js node /root/client.js ws://0.0.0.0:8080/ws realm1

module.js:457

throw err;

^

Error: Cannot find module ‘/root/client.js’

at Function.Module._resolveFilename (module.js:455:15)

at Function.Module._load (module.js:403:25)

at Module.runMain (module.js:590:10)

at run (bootstrap_node.js:394:7)

at startup (bootstrap_node.js:149:9)

at bootstrap_node.js:509:3

roger@Roger-Mac ~> docker run -it crossbario/autobahn-python:cpy2 python /root/client.py --url ws://0.0.0.0:8080/ws --realm reaml1

python: can’t open file ‘/root/client.py’: [Errno 2] No such file or directory

0 Likes

#2

Hmm, I think either the instructions should be updated to use /app/client.py and /app/client.js instead of /root/client.py and /root/client.js (including the Makefile),
or the docker images updated to reflect the instructions.

Can you also post images of what kind of log-output to expect?

For python client, I currently have:

roger@Roger-Mac ~> docker run -it crossbario/autobahn-python:cpy2 python /app/client.py --url ws://localhost:8080/ws --realm reaml1

2016-11-19T01:59:52+0000 Scheduling retry 1 to connect <twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7f9bc74ad1d0> in 1.72290305939 seconds.

2016-11-19T01:59:53+0000 Scheduling retry 2 to connect <twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7f9bc74ad1d0> in 2.6898870873 seconds.

2016-11-19T01:59:56+0000 Scheduling retry 3 to connect <twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7f9bc74ad1d0> in 3.45389865833 seconds.

2016-11-19T01:59:59+0000 Scheduling retry 4 to connect <twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7f9bc74ad1d0> in 5.45530437805 seconds.

2016-11-19T02:00:05+0000 Scheduling retry 5 to connect <twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7f9bc74ad1d0> in 8.2843054819 seconds.

2016-11-19T02:00:13+0000 Scheduling retry 6 to connect <twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7f9bc74ad1d0> in 12.1476947662 seconds.

^C2016-11-19T02:00:20+0000 Received SIGINT, shutting down.

2016-11-19T02:00:20+0000 Main loop terminated.

Best regards,

Roger

···

Op zaterdag 19 november 2016 02:32:27 UTC+1 schreef Roger Erens:

Both creation of a javascript client container and a python client container fail, see below.
I’m on a Mac OSX, and only used the three docker run commands mentioned on https://github.com/crossbario/crossbar-docker

(so linux installation of Docker or running makefiles).

Log lines in the Crossbar container are as expected;

I can connect in the webbrowser to http://localhost:8080 (where JS console claims to run AutobahnJS 0.11.1)

Any ideas on what is wrong?

Thanks,

Roger

roger@Roger-Mac ~> docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

43ba73a88403 crossbario/crossbar “crossbar start --cbd” 46 minutes ago Up 46 minutes 8000/tcp, 0.0.0.0:8080->8080/tcp berserk_chandrasekhar

roger@Roger-Mac ~> docker run -it crossbario/autobahn-js node /root/client.js ws://0.0.0.0:8080/ws realm1

module.js:457

throw err;
^

Error: Cannot find module ‘/root/client.js’

at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.runMain (module.js:590:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

roger@Roger-Mac ~> docker run -it crossbario/autobahn-python:cpy2 python /root/client.py --url ws://0.0.0.0:8080/ws --realm reaml1

python: can’t open file ‘/root/client.py’: [Errno 2] No such file or directory

0 Likes

#3

Hi Roger,

just quickly .. yes, READMEs need updates.

For testing: in a first console

sudo docker run --rm -it -p 8080:8080 --name crossbar crossbario/crossbar:community

in a 2nd console

sudo docker run -it --rm --link crossbar crossbario/autobahn-python:cpy2

pls see:

https://github.com/crossbario/crossbar-docker/blob/master/autobahn-python/Makefile#L85

https://github.com/crossbario/crossbar-docker/blob/master/crossbar/x86_64/Makefile#L48

···

---

The images use Docker links to hook up the client images with CB.

Further, we now use Docker volumes (in addition to copying an included example):

https://github.com/crossbario/crossbar-docker/blob/master/autobahn-python/Dockerfile.cpy2#L19

https://github.com/crossbario/crossbar-docker/blob/master/crossbar/x86_64/Dockerfile.community#L50

Cheers,
/Tobias

Am 19.11.2016 um 03:02 schrieb Roger Erens:

Hmm, I think either the instructions should be updated to use
/app/client.py and /app/client.js instead of /root/client.py and
/root/client.js (including the Makefile),
or the docker images updated to reflect the instructions.

Can you also post images of what kind of log-output to expect?
For python client, I currently have:

roger@Roger-Mac ~> docker run -it crossbario/autobahn-python:cpy2 python
/app/client.py --url ws://localhost:8080/ws --realm reaml1
2016-11-19T01:59:52+0000 Scheduling retry 1 to connect
<twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7f9bc74ad1d0> in
1.72290305939 seconds.
2016-11-19T01:59:53+0000 Scheduling retry 2 to connect
<twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7f9bc74ad1d0> in
2.6898870873 seconds.
2016-11-19T01:59:56+0000 Scheduling retry 3 to connect
<twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7f9bc74ad1d0> in
3.45389865833 seconds.
2016-11-19T01:59:59+0000 Scheduling retry 4 to connect
<twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7f9bc74ad1d0> in
5.45530437805 seconds.
2016-11-19T02:00:05+0000 Scheduling retry 5 to connect
<twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7f9bc74ad1d0> in
8.2843054819 seconds.
2016-11-19T02:00:13+0000 Scheduling retry 6 to connect
<twisted.internet.endpoints.TCP4ClientEndpoint object at 0x7f9bc74ad1d0> in
12.1476947662 seconds.
^C2016-11-19T02:00:20+0000 Received SIGINT, shutting down.
2016-11-19T02:00:20+0000 Main loop terminated.

Best regards,
Roger

Op zaterdag 19 november 2016 02:32:27 UTC+1 schreef Roger Erens:

Both creation of a javascript client container and a python client
container fail, see below.
I'm on a Mac OSX, and only used the three `docker run` commands mentioned
on https://github.com/crossbario/crossbar-docker
(so linux installation of Docker or running makefiles).

Log lines in the Crossbar container are as expected;
I can connect in the webbrowser to http://localhost:8080 (where JS
console claims to run AutobahnJS 0.11.1)

Any ideas on what is wrong?

Thanks,
Roger

roger@Roger-Mac ~> docker ps
CONTAINER ID IMAGE COMMAND CREATED
            STATUS PORTS NAMES
43ba73a88403 crossbario/crossbar "crossbar start --cbd" 46
minutes ago Up 46 minutes 8000/tcp, 0.0.0.0:8080->8080/tcp
berserk_chandrasekhar

roger@Roger-Mac ~> docker run -it crossbario/autobahn-js node
/root/client.js ws://0.0.0.0:8080/ws realm1
module.js:457
    throw err;
    ^

Error: Cannot find module '/root/client.js'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.runMain (module.js:590:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

roger@Roger-Mac ~> docker run -it crossbario/autobahn-python:cpy2 python
/root/client.py --url ws://0.0.0.0:8080/ws --realm reaml1
python: can't open file '/root/client.py': [Errno 2] No such file or
directory

0 Likes