Error when starting through the docker on Windows 10

Issue #30 resolved
Former user created an issue

I used the command docker run --name MyInstance -d atlassianlabs/localstack I am unable to use the services. I get the following error in the logs

ERROR:infra.py:Error checking state of local environment (after some retries): Traceback (most recent call last):
  File "localstack/mock/infra.py", line 328, in check_infra
    check_infra_kinesis(expect_shutdown=expect_shutdown, print_error=print_error)
  File "localstack/mock/infra.py", line 277, in check_infra_kinesis
    assert isinstance(out['StreamNames'], list)
KeyError: 'StreamNames'

2017-06-05 07:57:19,180 INFO reaped unknown pid 4628
2017-06-05 07:57:19,190 INFO reaped unknown pid 4640
2017-06-05 07:57:19,235 INFO reaped unknown pid 4616
2017-06-05 07:57:19,235 INFO reaped unknown pid 4661
2017-06-05 07:57:19,240 INFO reaped unknown pid 4670
2017-06-05 07:57:19,246 INFO reaped unknown pid 4677
ERROR: 'ps aux 2>&1 | grep '[^\s]*\s*4614\s' | grep -v grep |  grep ''':
Traceback (most recent call last):
  File "localstack/mock/infra.py", line 438, in <module>
    start_infra()
  File "localstack/mock/infra.py", line 415, in start_infra
    check_infra(apis=apis)
  File "localstack/mock/infra.py", line 345, in check_infra
    check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
  File "localstack/mock/infra.py", line 345, in check_infra
    check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
  File "localstack/mock/infra.py", line 345, in check_infra
    check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
  File "localstack/mock/infra.py", line 345, in check_infra
    check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
  File "localstack/mock/infra.py", line 345, in check_infra
    check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
  File "localstack/mock/infra.py", line 345, in check_infra
    check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
  File "localstack/mock/infra.py", line 345, in check_infra
    check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
  File "localstack/mock/infra.py", line 345, in check_infra
    check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
  File "localstack/mock/infra.py", line 343, in check_infra
    raise e
KeyError: 'StreamNames'
Exception in thread Thread-34 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
  File "/opt/code/localstack/localstack/utils/common.py", line 68, in run
  File "/opt/code/localstack/localstack/mock/apis/lambda_api.py", line 692, in serve
  File "/opt/code/localstack/.venv/lib/python2.7/site-packages/flask/app.py", line 772, in run
  File "/opt/code/localstack/.venv/lib/python2.7/site-packages/werkzeug/serving.py", line 739, in run_simple
  File "/opt/code/localstack/.venv/lib/python2.7/site-packages/werkzeug/serving.py", line 702, in inner
  File "/opt/code/localstack/.venv/lib/python2.7/site-packages/werkzeug/serving.py", line 539, in serve_forever
  File "/usr/lib/python2.7/SocketServer.py", line 236, in serve_forever
  File "/usr/lib/python2.7/threading.py", line 585, in set
  File "/usr/lib/python2.7/threading.py", line 407, in notifyAll
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
make: *** [Makefile:54: infra] Error 1
2017-06-05 07:57:20,328 INFO exited: infra (exit status 2; expected)
2017-06-05 07:57:21,332 INFO spawned: 'infra' with pid 4904
. .venv/bin/activate; PYTHONPATH=. exec localstack/mock/infra.py
Starting local dev environment. CTRL-C to quit.
Starting local Elasticsearch (port 4571)...
Starting mock ES service (port 4578)...
Starting mock S3 (port 4572)...
Starting mock SNS (port 4575)...
Starting mock SQS (port 4576)...
Starting mock API Gateway (port 4567)...
Starting mock DynamoDB (port 4569)...
Starting mock DynamoDB Streams service (port 4570)...
Starting mock Firehose service (port 4573)...
Starting mock Lambda service (port 4574)...
Starting mock Kinesis (port 4568)...
Starting mock Redshift (port 4577)...
Starting mock Route53 (port 4580)...
Starting mock SES (port 4579)...
Starting mock CloudFormation (port 4581)...
Starting mock CloudWatch (port 4582)...
2017-06-05 07:57:22,899 INFO success: infra entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
[2017-06-05T07:57:26,145][INFO ][o.e.n.Node               ] [] initializing ...
[2017-06-05T07:57:26,281][INFO ][o.e.e.NodeEnvironment    ] [uRxqP_d] using [1] data paths, mounts [[/ (overlay)]], net usable_space [52.2gb], net total_space [58.8gb], spins? [possibly], types [overlay]
[2017-06-05T07:57:26,283][INFO ][o.e.e.NodeEnvironment    ] [uRxqP_d] heap size [483.3mb], compressed ordinary object pointers [true]
[2017-06-05T07:57:26,285][INFO ][o.e.n.Node               ] node name [uRxqP_d] derived from node ID [uRxqP_dgQfWY4S4_iDk0Jw]; set [node.name] to override
[2017-06-05T07:57:26,285][INFO ][o.e.n.Node               ] version[5.3.0], pid[4944], build[3adb13b/2017-03-23T03:31:50.652Z], OS[Linux/4.9.27-moby/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_121/25.121-b13]
[2017-06-05T07:57:27,498][INFO ][o.e.p.PluginsService     ] [uRxqP_d] loaded module [aggs-matrix-stats]
[2017-06-05T07:57:27,498][INFO ][o.e.p.PluginsService     ] [uRxqP_d] loaded module [ingest-common]
[2017-06-05T07:57:27,499][INFO ][o.e.p.PluginsService     ] [uRxqP_d] loaded module [lang-expression]
[2017-06-05T07:57:27,499][INFO ][o.e.p.PluginsService     ] [uRxqP_d] loaded module [lang-groovy]
[2017-06-05T07:57:27,499][INFO ][o.e.p.PluginsService     ] [uRxqP_d] loaded module [lang-mustache]
[2017-06-05T07:57:27,499][INFO ][o.e.p.PluginsService     ] [uRxqP_d] loaded module [lang-painless]
[2017-06-05T07:57:27,499][INFO ][o.e.p.PluginsService     ] [uRxqP_d] loaded module [percolator]
[2017-06-05T07:57:27,499][INFO ][o.e.p.PluginsService     ] [uRxqP_d] loaded module [reindex]
[2017-06-05T07:57:27,499][INFO ][o.e.p.PluginsService     ] [uRxqP_d] loaded module [transport-netty3]
[2017-06-05T07:57:27,499][INFO ][o.e.p.PluginsService     ] [uRxqP_d] loaded module [transport-netty4]
[2017-06-05T07:57:27,500][INFO ][o.e.p.PluginsService     ] [uRxqP_d] no plugins loaded
[2017-06-05T07:57:31,059][INFO ][o.e.n.Node               ] initialized
[2017-06-05T07:57:31,060][INFO ][o.e.n.Node               ] [uRxqP_d] starting ...
[2017-06-05T07:57:31,264][WARN ][i.n.u.i.MacAddressUtil   ] Failed to find a usable hardware address from the network interfaces; using random bytes: 88:ca:1e:da:a5:8a:c3:72
[2017-06-05T07:57:31,413][INFO ][o.e.t.TransportService   ] [uRxqP_d] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2017-06-05T07:57:31,425][WARN ][o.e.b.BootstrapChecks    ] [uRxqP_d] initial heap size [209715200] not equal to maximum heap size [524288000]; this can cause resize pauses and prevents mlockall from locking the entire heap
[2017-06-05T07:57:34,527][INFO ][o.e.c.s.ClusterService   ] [uRxqP_d] new_master {uRxqP_d}{uRxqP_dgQfWY4S4_iDk0Jw}{Ff_VqAJSRlOu2htCyTKMOw}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
[2017-06-05T07:57:34,581][INFO ][o.e.h.n.Netty4HttpServerTransport] [uRxqP_d] publish_address {127.0.0.1:4588}, bound_addresses {[::1]:4588}, {127.0.0.1:4588}
[2017-06-05T07:57:34,606][INFO ][o.e.g.GatewayService     ] [uRxqP_d] recovered [0] indices into cluster_state
[2017-06-05T07:57:34,611][INFO ][o.e.n.Node               ] [uRxqP_d] started

Comments (8)

  1. Alwin Doss

    This issue was created by me, please reach out to me if you need more information. I guess I wasn't logged in when creating this issue.

  2. Waldemar Hummer Account Deactivated

    Thanks for reporting @alwindoss , looks like the Kinesis service does not start up properly. Can you please try running with debug output enabled (please post any relevant output), and in non-daemonized mode:

    docker run -e DEBUG=1 --name MyInstance atlassianlabs/localstack
    

    If that also does not work, what happens if you run Kinesis directly in Docker:

    docker run -p 4568:4568 --entrypoint "" atlassianlabs/localstack localstack/node_modules/kinesalite/cli.js --shardLimit 10 --port 4568
    

    Then, in a separate window you should be able to call the local Kinesis API:

    aws --endpoint-url=http://localhost:4568 kinesis list-streams
    {
        "StreamNames": []
    }
    

    Does that work, or what is the exact error output?

  3. Alwin Doss

    When I run it in the DEBUG mode I see the following error

    Listening at http://:::4584
    * Running on http://0.0.0.0:4586/ (Press CTRL+C to quit)
    * Running on http://0.0.0.0:4576/ (Press CTRL+C to quit)
    * Running on http://0.0.0.0:4579/ (Press CTRL+C to quit)
    * Running on http://0.0.0.0:4583/ (Press CTRL+C to quit)
    * Running on http://0.0.0.0:4580/ (Press CTRL+C to quit)
    * Running on http://0.0.0.0:4587/ (Press CTRL+C to quit)
    * Running on http://0.0.0.0:4582/ (Press CTRL+C to quit)
    * Running on http://0.0.0.0:4589/ (Press CTRL+C to quit)
    * Running on http://0.0.0.0:4577/ (Press CTRL+C to quit)
    [2017-06-06T12:44:24,671][INFO ][o.e.n.Node               ] [] initializing ...
    [2017-06-06T12:44:24,877][INFO ][o.e.e.NodeEnvironment    ] [wUsyBHB] using [1] data paths, mounts [[/ (overlay)]], net usable_space [52.1gb], net total_space [58.8gb], spins? [possibly], types [overlay]
    [2017-06-06T12:44:24,882][INFO ][o.e.e.NodeEnvironment    ] [wUsyBHB] heap size [483.3mb], compressed ordinary object pointers [true]
    [2017-06-06T12:44:24,896][INFO ][o.e.n.Node               ] node name [wUsyBHB] derived from node ID [wUsyBHBLRYGgMl5C3N24ug]; set [node.name] to override
    [2017-06-06T12:44:24,897][INFO ][o.e.n.Node               ] version[5.3.0], pid[61], build[3adb13b/2017-03-23T03:31:50.652Z], OS[Linux/4.9.27-moby/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_121/25.121-b13]
    [2017-06-06T12:44:26,803][INFO ][o.e.p.PluginsService     ] [wUsyBHB] loaded module [aggs-matrix-stats]
    [2017-06-06T12:44:26,803][INFO ][o.e.p.PluginsService     ] [wUsyBHB] loaded module [ingest-common]
    [2017-06-06T12:44:26,803][INFO ][o.e.p.PluginsService     ] [wUsyBHB] loaded module [lang-expression]
    [2017-06-06T12:44:26,804][INFO ][o.e.p.PluginsService     ] [wUsyBHB] loaded module [lang-groovy]
    [2017-06-06T12:44:26,804][INFO ][o.e.p.PluginsService     ] [wUsyBHB] loaded module [lang-mustache]
    [2017-06-06T12:44:26,804][INFO ][o.e.p.PluginsService     ] [wUsyBHB] loaded module [lang-painless]
    [2017-06-06T12:44:26,804][INFO ][o.e.p.PluginsService     ] [wUsyBHB] loaded module [percolator]
    [2017-06-06T12:44:26,805][INFO ][o.e.p.PluginsService     ] [wUsyBHB] loaded module [reindex]
    [2017-06-06T12:44:26,805][INFO ][o.e.p.PluginsService     ] [wUsyBHB] loaded module [transport-netty3]
    [2017-06-06T12:44:26,805][INFO ][o.e.p.PluginsService     ] [wUsyBHB] loaded module [transport-netty4]
    [2017-06-06T12:44:26,806][INFO ][o.e.p.PluginsService     ] [wUsyBHB] no plugins loaded
    [2017-06-06T12:44:32,588][INFO ][o.e.n.Node               ] initialized
    [2017-06-06T12:44:32,589][INFO ][o.e.n.Node               ] [wUsyBHB] starting ...
    [2017-06-06T12:44:32,794][WARN ][i.n.u.i.MacAddressUtil   ] Failed to find a usable hardware address from the network interfaces; using random bytes: 03:2b:86:3a:bd:77:01:5b
    [2017-06-06T12:44:33,070][INFO ][o.e.t.TransportService   ] [wUsyBHB] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
    [2017-06-06T12:44:33,093][WARN ][o.e.b.BootstrapChecks    ] [wUsyBHB] initial heap size [209715200] not equal to maximum heap size [524288000]; this can cause resize pauses and prevents mlockall from locking the entire heap
    [2017-06-06T12:44:36,277][INFO ][o.e.c.s.ClusterService   ] [wUsyBHB] new_master {wUsyBHB}{wUsyBHBLRYGgMl5C3N24ug}{3wR3X1vwTRGe7yNQPr3dAg}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
    [2017-06-06T12:44:36,395][INFO ][o.e.h.n.Netty4HttpServerTransport] [wUsyBHB] publish_address {127.0.0.1:4588}, bound_addresses {[::1]:4588}, {127.0.0.1:4588}
    [2017-06-06T12:44:36,402][INFO ][o.e.n.Node               ] [wUsyBHB] started
    [2017-06-06T12:44:36,468][INFO ][o.e.g.GatewayService     ] [wUsyBHB] recovered [0] indices into cluster_state
    ERROR:infra.py:Error checking state of local environment (after some retries): Traceback (most recent call last):
      File "localstack/mock/infra.py", line 328, in check_infra
        check_infra_kinesis(expect_shutdown=expect_shutdown, print_error=print_error)
      File "localstack/mock/infra.py", line 277, in check_infra_kinesis
        assert isinstance(out['StreamNames'], list)
    KeyError: 'StreamNames'
    
    2017-06-06 12:45:18,566 INFO reaped unknown pid 74
    2017-06-06 12:45:18,573 INFO reaped unknown pid 78
    2017-06-06 12:45:18,596 INFO reaped unknown pid 101
    2017-06-06 12:45:18,600 INFO reaped unknown pid 95
    2017-06-06 12:45:18,611 INFO reaped unknown pid 109
    2017-06-06 12:45:18,622 INFO reaped unknown pid 114
    2017-06-06 12:45:18,634 INFO reaped unknown pid 121
    2017-06-06 12:45:18,634 INFO reaped unknown pid 115
    2017-06-06 12:45:18,635 INFO reaped unknown pid 61
    Traceback (most recent call last):
    ERROR: 'ps aux 2>&1 | grep '[^\s]*\s*57\s' | grep -v grep |  grep ''':
    ERROR: 'ps aux 2>&1 | grep '[^\s]*\s*79\s' | grep -v grep |  grep ''':
      File "localstack/mock/infra.py", line 438, in <module>
        start_infra()
      File "localstack/mock/infra.py", line 415, in start_infra
        check_infra(apis=apis)
      File "localstack/mock/infra.py", line 345, in check_infra
        check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
      File "localstack/mock/infra.py", line 345, in check_infra
        check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
      File "localstack/mock/infra.py", line 345, in check_infra
        check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
      File "localstack/mock/infra.py", line 345, in check_infra
        check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
      File "localstack/mock/infra.py", line 345, in check_infra
        check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
      File "localstack/mock/infra.py", line 345, in check_infra
        check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
      File "localstack/mock/infra.py", line 345, in check_infra
        check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
      File "localstack/mock/infra.py", line 345, in check_infra
        check_infra(retries - 1, expect_shutdown=expect_shutdown, apis=apis, additional_checks=additional_checks)
      File "localstack/mock/infra.py", line 343, in check_infra
        raise e
    KeyError: 'StreamNames'
    2017-06-06 12:45:19,736 INFO reaped unknown pid 82
    make: *** [Makefile:54: infra] Error 1
    2017-06-06 12:45:19,736 INFO exited: infra (exit status 2; expected)
    2017-06-06 12:45:19,736 INFO reaped unknown pid 90
    2017-06-06 12:45:19,736 INFO reaped unknown pid 99
    2017-06-06 12:45:19,736 INFO reaped unknown pid 102
    2017-06-06 12:45:19,737 INFO reaped unknown pid 116
    2017-06-06 12:45:20,740 INFO spawned: 'infra' with pid 442
    . .venv/bin/activate; PYTHONPATH=. exec localstack/mock/infra.py
    Starting local dev environment. CTRL-C to quit.
    Starting local Elasticsearch (port 4571)...
    Starting mock ES service (port 4578)...
    Starting mock S3 (port 4572)...
    Starting mock SNS (port 4575)...
    Starting mock SQS (port 4576)...
    Starting mock API Gateway (port 4567)...
    Starting mock DynamoDB (port 4569)...
    Starting mock DynamoDB Streams service (port 4570)...
    Starting mock Firehose service (port 4573)...
    Starting mock Lambda service (port 4574)...
    Starting mock Kinesis (port 4568)...
    Starting mock Redshift (port 4577)...
    Starting mock Route53 (port 4580)...
    Starting mock SES (port 4579)...
    Starting mock CloudFormation (port 4581)...
    Starting mock CloudWatch (port 4582)...
    2017-06-06 12:45:22,397 INFO success: infra entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
    Initializing DynamoDB Local with the following configuration:
    Port:   4585
    InMemory:       true
    DbPath: null
    SharedDb:       true
    shouldDelayTransientStatuses:   false
    CorsParams:     *
    
  4. Alwin Doss

    If I run the command

    docker run -p 4568:4568 --entrypoint "" atlassianlabs/localstack localstack/node_modules/kinesalite/cli.js --shardLimit 10 --port 4568
    

    I get the no error on the console. But, if I run

    aws --endpoint-url=http://localhost:4568 kinesis list-streams
    

    Then I get no response on the terminal

  5. Waldemar Hummer Account Deactivated

    Can you please try running the following command:

    docker run --name test_123 -p 4568:4568 --entrypoint "" atlassianlabs/localstack localstack/node_modules/kinesalite/cli.js --shardLimit 10 --port 4568
    

    Then, in a separate terminal:

    docker exec test_123 .venv/bin/aws --endpoint-url=http://localhost:4568 kinesis list-streams
    

    If the command above does not work, please also post the output of the following:

    docker exec test_123 ifconfig
    
  6. Waldemar Hummer Account Deactivated

    @alwindoss Is there any update on this issue - did you try running the commands above? Thanks

  7. Log in to comment