aerospike / aerospike-server.docker

Dockerfiles for Aerospike Server
Other
141 stars 68 forks source link

asd exits immediately #24

Closed dsw9742 closed 7 years ago

dsw9742 commented 7 years ago

Hi, trying to run this on Amazon Linux, Docker version 1.12.6, from Jenkins, within Docker Pipeline plugin, using the script command sh 'docker run -tid --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike/aerospike-server'

It appears the container runs and exits almost immediately. The next line of the script calls sh 'docker inspect aerospike', and I get the following output:

{
        "Id": "9fc8d14e89fe9908e20c1e297c65215e73dd4594e5873a1c1a43b4b7e048314a",
        "Created": "2017-03-31T16:09:25.152504286Z",
        "Path": "/entrypoint.sh",
        "Args": [
            "asd"
        ],
        "State": {
            "Status": "exited",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2017-03-31T16:09:25.709286579Z",
            "FinishedAt": "2017-03-31T16:09:25.778224404Z"
        },
        "Image": "sha256:ef4796745b5b9e098550e9d1c11f0ae561806b4e31127eba30ab8167eb207f95",
        "ResolvConfPath": "/var/lib/docker/containers/9fc8d14e89fe9908e20c1e297c65215e73dd4594e5873a1c1a43b4b7e048314a/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/9fc8d14e89fe9908e20c1e297c65215e73dd4594e5873a1c1a43b4b7e048314a/hostname",
        "HostsPath": "/var/lib/docker/containers/9fc8d14e89fe9908e20c1e297c65215e73dd4594e5873a1c1a43b4b7e048314a/hosts",
        "LogPath": "/var/lib/docker/containers/9fc8d14e89fe9908e20c1e297c65215e73dd4594e5873a1c1a43b4b7e048314a/9fc8d14e89fe9908e20c1e297c65215e73dd4594e5873a1c1a43b4b7e048314a-json.log",
        "Name": "/aerospike",
        "RestartCount": 0,
        "Driver": "devicemapper",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": null,
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {
                "3000/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "3000"
                    }
                ],
                "3001/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "3001"
                    }
                ],
                "3002/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "3002"
                    }
                ],
                "3003/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "3003"
                    }
                ]
            },
            "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,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "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": {
            "Name": "devicemapper",
            "Data": {
                "DeviceId": "860",
                "DeviceName": "docker-202:1-524296-10f35343443b4e2fa01a3c23a7b3f128818672de16cbc15749bda0c09fe66fdb",
                "DeviceSize": "10737418240"
            }
        },
        "Mounts": [
            {
                "Name": "61afd37f25a3836e329935a6d8b4ee6e9d2d314fae8c7278e39f599bcd39321f",
                "Source": "/var/lib/docker/volumes/61afd37f25a3836e329935a6d8b4ee6e9d2d314fae8c7278e39f599bcd39321f/_data",
                "Destination": "/opt/aerospike/data",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            }
        ],
        "Config": {
            "Hostname": "9fc8d14e89fe",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "3000/tcp": {},
                "3001/tcp": {},
                "3002/tcp": {},
                "3003/tcp": {}
            },
            "Tty": true,
            "OpenStdin": true,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "AEROSPIKE_VERSION=3.12.0",
                "AEROSPIKE_SHA256=61aa3e7c0ee3adfbf0f2182a7e6a5556a4feffc20ab5aa1f93e0a25b282f3f1d"
            ],
            "Cmd": [
                "asd"
            ],
            "Image": "aerospike/aerospike-server",
            "Volumes": {
                "/opt/aerospike/data": {}
            },
            "WorkingDir": "",
            "Entrypoint": [
                "/entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "b0156ca457ab4f17b94d2e91698ceaaf8716b664de4e6aa42bafe767d67676df",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": null,
            "SandboxKey": "/var/run/docker/netns/b0156ca457ab",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "0c18b9dbe04bf3841f46d1bc6cfefe1cc2b2c394b14fa1c4f0b74d9ca6dff699",
                    "EndpointID": "",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": ""
                }
            }
        }
    }

Feels like I'm doing something incorrectly, but it isn't obvious to me what the problem is, or how to troubleshoot it.

dsw9742 commented 7 years ago

Related to https://hub.docker.com/r/aerospike/aerospike-server/ comment 1. As the author wrote, this failed for me due to file descriptors limit. My solution was to provide a lower proto-fd-max setting in the conf file, but I imagine changing the limit at the OS level would work as well.