eclipse / kapua

Eclipse Public License 2.0
225 stars 160 forks source link

Quickstart via Docker fails ... is incomplete - elastic search container and API container do not run #831

Closed kamir closed 7 years ago

kamir commented 7 years ago

Following recommendations which say, Docker should be used for testing I was running into problems with the elastic search image.

I used docker commands as shown documented in "README.md":

_docker run -td --name kapua-sql -p 8181:8181 -p 3306:3306 kapua/kapua-sql

docker run -td --name kapua-elasticsearch -p 9200:9200 -p 9300:9300 elasticsearch:5.4.0 -Ecluster.name=kapua-datastore -Ediscovery.type=single-node -Etransport.host=site -Etransport.ping_schedule=-1 -Etransport.tcp.connect_timeout=30s

docker run -td --name kapua-broker --link kapua-sql:db --link kapua-elasticsearch:es --env commons.db.schema.update=true -p 1883:1883 -p 61614:61614 kapua/kapua-broker

docker run -td --name kapua-console --link kapua-sql:db --link kapua-broker:broker --link kapua-elasticsearch:es --env commons.db.schema.update=true -p 8080:8080 kapua/kapua-console

docker run -td --name kapua-api --link kapua-sql:db --link kapua-broker:broker --link kapua-elasticsearch:es --env commons.db.schema.update=true -p 8081:8080 kapua/kapua-api_

This is the error message I get from docker: docker: Error response from daemon: Cannot link to a non running container: /kapua-elasticsearch AS /kapua-api/es.

Two out of the five docker containers are not starting:

All the others are fine. The console comes up as expected.

lorthirk commented 7 years ago

Can you please provide the output of docker inspect kapua-elasticsearch?

kamir commented 7 years ago

Here is the output:

Mirkos-iMac-7:~ kamir$ docker inspect kapua-elasticsearch [ { "Id": "c0f06731b0254815692a44e77516250be224c06f7bda0f19767472b45ffe815e", "Created": "2017-09-23T03:38:15.032641102Z", "Path": "/docker-entrypoint.sh", "Args": [ "-Ecluster.name=kapua-datastore", "-Ediscovery.type=single-node", "-Etransport.host=site", "-Etransport.ping_schedule=-1", "-Etransport.tcp.connect_timeout=30s" ], "State": { "Status": "exited", "Running": false, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 0, "ExitCode": 137, "Error": "", "StartedAt": "2017-09-23T03:38:34.752822992Z", "FinishedAt": "2017-09-23T03:38:35.66447524Z" }, "Image": "sha256:c90c19ac5480f6a430e985cf11009bf6bb510acdb865825b1e9eb7a097e88bb1", "ResolvConfPath": "/var/lib/docker/containers/c0f06731b0254815692a44e77516250be224c06f7bda0f19767472b45ffe815e/resolv.conf", "HostnamePath": "/var/lib/docker/containers/c0f06731b0254815692a44e77516250be224c06f7bda0f19767472b45ffe815e/hostname", "HostsPath": "/var/lib/docker/containers/c0f06731b0254815692a44e77516250be224c06f7bda0f19767472b45ffe815e/hosts", "LogPath": "/var/lib/docker/containers/c0f06731b0254815692a44e77516250be224c06f7bda0f19767472b45ffe815e/c0f06731b0254815692a44e77516250be224c06f7bda0f19767472b45ffe815e-json.log", "Name": "/kapua-elasticsearch", "RestartCount": 0, "Driver": "overlay2", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": null, "HostConfig": { "Binds": null, "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "default", "PortBindings": { "9200/tcp": [ { "HostIp": "", "HostPort": "9200" } ], "9300/tcp": [ { "HostIp": "", "HostPort": "9300" } ] }, "RestartPolicy": { "Name": "no", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "CapAdd": null, "CapDrop": null, "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": null, "GroupAdd": null, "IpcMode": "", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "ConsoleSize": [ 0, 0 ], "Isolation": "", "CpuShares": 0, "Memory": 0, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": null, "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DeviceCgroupRules": null, "DiskQuota": 0, "KernelMemory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": -1, "OomKillDisable": false, "PidsLimit": 0, "Ulimits": null, "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0 }, "GraphDriver": { "Data": { "LowerDir": "/var/lib/docker/overlay2/47c52f0262b05e0ff2a5ba4d5194fffa78a227bf30d5e38f045be2718ae620b3-init/diff:/var/lib/docker/overlay2/6bfc8d8824f508865c27e1c25bf331e40a6217a3cd3ddf36e32ec1a1c914daaa/diff:/var/lib/docker/overlay2/99358e91d6bc9a5c9a39f1bedaa9db81b323a26ab593248552561a95e63a6d69/diff:/var/lib/docker/overlay2/a396af1f5fedfbf914d868f17dfb5c8e4a2f3794d3410fb8a04c65d99d804211/diff:/var/lib/docker/overlay2/87b03d66dc6fa0db77e8321602c39304a2fade96538dc13603fce2983760a28b/diff:/var/lib/docker/overlay2/6c9e42b5058374895a64a66d0b73110f7e1ad94f92c7eb4f584162259e3498a2/diff:/var/lib/docker/overlay2/58fa9219066ab34cabccf5e0462b03d109f7dc13848788e2c3010fa0b80157f5/diff:/var/lib/docker/overlay2/31a2bbea0345601b03e5bb2051796a7a08ce2a84c27862af13f52e5ae50049c7/diff:/var/lib/docker/overlay2/f26e489cce45d8a8c5e5a078af653ca009cb751ee3f028a94fd4db1004aaadad/diff:/var/lib/docker/overlay2/5600388e14c1e87993a9a8fbcafa7f097356ea58dd7da9f342d85dd4dcb972ea/diff:/var/lib/docker/overlay2/9dc3291f4a347fce176e324f04a14935694dba8a445fa5fc9b95512fc9db6003/diff:/var/lib/docker/overlay2/6c35bdf5ccbb80eaf7cdf3095013601348ab813c1ff4a7509c73222caf6e2ab7/diff:/var/lib/docker/overlay2/ab484d9f8ddd7f7f5a13e33fd57156e39885862169a018f67cd023b5f3c09413/diff:/var/lib/docker/overlay2/3a6de5b4cd9ad21a1e180dc4282f5cfaeb40427a26349068384c77aed3f2ee8e/diff:/var/lib/docker/overlay2/45e9ea46a6f075139d7e01b7dca044068a1eebe64de1e19cb0634cc8aeddbb37/diff", "MergedDir": "/var/lib/docker/overlay2/47c52f0262b05e0ff2a5ba4d5194fffa78a227bf30d5e38f045be2718ae620b3/merged", "UpperDir": "/var/lib/docker/overlay2/47c52f0262b05e0ff2a5ba4d5194fffa78a227bf30d5e38f045be2718ae620b3/diff", "WorkDir": "/var/lib/docker/overlay2/47c52f0262b05e0ff2a5ba4d5194fffa78a227bf30d5e38f045be2718ae620b3/work" }, "Name": "overlay2" }, "Mounts": [ { "Type": "volume", "Name": "209714793e5a221865d5a5c4eb44ec0395094ca46cc7830220a058ef71338c16", "Source": "/var/lib/docker/volumes/209714793e5a221865d5a5c4eb44ec0395094ca46cc7830220a058ef71338c16/_data", "Destination": "/usr/share/elasticsearch/data", "Driver": "local", "Mode": "", "RW": true, "Propagation": "" } ], "Config": { "Hostname": "c0f06731b025", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "9200/tcp": {}, "9300/tcp": {} }, "Tty": true, "OpenStdin": false, "StdinOnce": false, "Env": [ "no_proxy=*.local, 169.254/16",

"PATH=/usr/share/elasticsearch/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "LANG=C.UTF-8", "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre", "JAVA_VERSION=8u121", "JAVA_DEBIAN_VERSION=8u121-b13-1~bpo8+1", "CA_CERTIFICATES_JAVA_VERSION=20161107~bpo8+1", "GOSU_VERSION=1.7", "ELASTICSEARCH_VERSION=5.3.0", "ELASTICSEARCH_DEB_VERSION=5.3.0" ], "Cmd": [ "-Ecluster.name=kapua-datastore", "-Ediscovery.type=single-node", "-Etransport.host=site", "-Etransport.ping_schedule=-1", "-Etransport.tcp.connect_timeout=30s" ], "Image": "elasticsearch:5.3.0", "Volumes": { "/usr/share/elasticsearch/data": {} }, "WorkingDir": "/usr/share/elasticsearch", "Entrypoint": [ "/docker-entrypoint.sh" ], "OnBuild": null, "Labels": {} }, "NetworkSettings": { "Bridge": "", "SandboxID": "48d6901181144f1eda5eb589165466c44d85bbd9708da846a800f276efa85f39", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": {}, "SandboxKey": "/var/run/docker/netns/48d690118114", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "bridge": { "IPAMConfig": null, "Links": null, "Aliases": null, "NetworkID": "8b14e2f036c46f8fac43dd56b04077266ad4e5a2e11e21030b93c213ad6da90c", "EndpointID": "", "Gateway": "", "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "", "DriverOpts": null } } } } ]

[image: cloudera] http://cloudera.com/ Dr. des. Mirko Kämpf Solution Architect phone: +49 176 206 35 199 <+49%20160%209668%203050>skype: kamir1604 mail: mirko@cloudera.com

Cloudera, Inc. http://cloudera.com/ 1001 Page Mill Road Building 2 Palo Alto, CA 94304

On Mon, Sep 25, 2017 at 11:28 AM, Claudio Mezzasalma < notifications@github.com> wrote:

Can you please provide the output of docker inspect kapua-elasticsearch?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eclipse/kapua/issues/831#issuecomment-331827035, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLwIqPAW-j1C_iBLjrr2jGgbuWS3AlIks5sl3IrgaJpZM4PhBsh .

lorthirk commented 7 years ago

It gets killed because of an OOM. Could you please try to rise the RAM amount allocated to Docker?

kamir commented 7 years ago

Claudio, this is great!!! Thanks for your very fast help. I added more RAM and now all the 5 VMs are up and running. Will go to the next level now - preparation of the kura-device. Cheers, Mirko

[image: cloudera] http://cloudera.com/ Dr. des. Mirko Kämpf Solution Architect phone: +49 176 206 35 199 <+49%20160%209668%203050>skype: kamir1604 mail: mirko@cloudera.com

Cloudera, Inc. http://cloudera.com/ 1001 Page Mill Road Building 2 Palo Alto, CA 94304

On Mon, Sep 25, 2017 at 11:41 AM, Claudio Mezzasalma < notifications@github.com> wrote:

It gets killed because of an OOM. Could you please try to rise the RAM amount allocated to Docker?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eclipse/kapua/issues/831#issuecomment-331830253, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLwIrv0qhinxycYGPkK8s9zFS4KyyFbks5sl3VEgaJpZM4PhBsh .

Coduz commented 7 years ago

Hi all,

We will add some documentation to track this recurring issue. This item will be kept open as tracking issue.

Regards,

Alberto

Coduz commented 7 years ago

I've try to put a fix on this problem with this commit 872aa369955044801680b86f988158c77e728943

I've updated the documentation and updated the Vagrant files.

lorthirk commented 7 years ago

I added a note to assembly/README.md in 791f5a33e