log only shows

```
time="2017-11-13T06:28:03.485879714+01:00" level=warning msg="could not
change group /var/run/docker.sock to docker
: group docker not found"
time="2017-11-13T06:28:03.488257938+01:00" level=info msg="libcontainerd:
new containerd process, pid: 8426"
```

I also tried install dockerd as service

```
- template:
src: templates/dockerd.service.j2
dest: /etc/systemd/system/dockerd.service
owner: root
mode: 0644

- systemd:
name: dockerd
state: started
enabled: True
```

But still same error , need restart dockerd

- systemd:
name: dockerd
state: restarted

before run command  `docker run -d xxx`





2017-11-11 0:00 GMT+08:00 Dick Visser <[email protected]>:

> Your deamon doesn't start, but you're redirecting everything to
> /dev/null, which masks any issues.
> Try redirecting everything to a log file and examine that.
>
> Dick
>
>
> On 10 November 2017 at 10:08, twinmegami arara <[email protected]>
> wrote:
> >
> > ##### ANSIBLE VERSION
> > <!--- Paste verbatim output from "ansible --version" between quotes below
> > -->
> > ```
> > 2.4.1.0
> > ```
> >
> > ##### OS / ENVIRONMENT
> >
> > centos 7 in  vagrant
> >
> > ##### SUMMARY
> >
> > #  install docker script
> >
> > ```
> > function docker_install() {
> >     echo "docker install"
> >     if [ ${sysOS} == "Linux" ]
> >     then
> >
> >         if [ ! -f /tmp/install_docker_flag ]; then
> >
> >             rm -f /var/run/docker.sock
> >
> >             tar zxvf ${DOCKER_ENGINE_DIR}/${DOCKER_FILE}.tar.gz
> >             mv ${DOCKER_FILE}/* /usr/local/bin
> >
> >             tar zxvf ${DOCKER_ENGINE_DIR}/${DOCKER_COMPOSE_FILE}.tar.gz
> >             mv ${DOCKER_COMPOSE_FILE}/* /usr/local/bin/docker-compose
> >
> >             # echo '{"insecure-registries":["'${PRIVATE_REGISTRY}'"]}' >
> > /etc/docker/daemon.json
> >             mkdir -p /etc/docker
> >             echo '{"registry-mirrors": ["http://'${PRIVATE_REGISTRY}'"],
> > "insecure-registries" : [ "'${PRIVATE_REGISTRY}'"] }' >
> > /etc/docker/daemon.json
> >
> >
> >             rm -fr ${DOCKER_FILE}
> >             rm -fr ${DOCKER_COMPOSE_FILE}
> >
> >             echo 'success' > /tmp/install_docker_flag
> >         else
> >             echo 'already installed docker'
> >         fi
> >
> >     else
> >         echo "this is "${sysOS}
> >         exit 1
> >     fi
> >
> > }
> > ```
> >
> > This just copy dockerd binary  to /usr/local/bin
> >
> > #  start docker
> >
> > ```
> > - name: start docker
> >   shell: /usr/local/bin/dockerd >/dev/null 2>&1 &
> >   # command: sh {{ start_docker_script }}
> > ```
> >
> >
> >
> >
> > # logs
> >
> > 1. But script `docker load < ${DOCKER_IMAGES_DIR}/${
> packages['registry']}`
> > in `TASK [registry : Install registry]`  ,  complain  docker not found.
> > 2.  After ansible failed, I enter that vm, confirmed dockerd was not
> > running.
> > 3. I also tried to start `dockerd ` by a script , nether work.
> > 4. I enter vagrant and have confirmed all files copied successful   .
> > 5. In vagrant vm,  directly  run  `/usr/local/bin/dockerd >/dev/null
> 2>&1 &`
> > is working
> >
> > ```
> > TASK [common : Install docker]
> > ************************************************************
> ********************
> > changed: [host02]
> > changed: [host01]
> >
> > TASK [common : start docker]
> > ************************************************************
> **********************
> > changed: [host02]
> > changed: [host01]
> >
> > PLAY [registry]
> > ************************************************************
> ***********************************
> >
> > TASK [Gathering Facts]
> > ************************************************************
> ****************************
> > ok: [host01]
> >
> > TASK [registry : Install registry]
> > ************************************************************
> ****************
> > fatal: [host01]: FAILED! => {
> >     "changed": true,
> >     "cmd": [
> >         "sh",
> >         "/data/bidspy-yychen/dist/scripts/install_registry.sh"
> >     ],
> >     "delta": "0:00:00.045283",
> >     "end": "2017-11-10 03:28:33.555247",
> >     "failed": true,
> >     "rc": 125,
> >     "start": "2017-11-10 03:28:33.509964"
> > }
> >
> > STDOUT:
> >
> > /data/bidspy-yychen/dist/scripts
> > /data/bidspy-yychen/dist
> >
> >
> > STDERR:
> >
> > Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is
> the
> > docker daemon running?
> > Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is
> the
> > docker daemon running?
> > docker: Cannot connect to the Docker daemon at
> unix:///var/run/docker.sock.
> > Is the docker daemon running?.
> > See 'docker run --help'.
> >
> >
> > MSG:
> >
> > non-zero return code
> > ```
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Ansible Project" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > To post to this group, send email to [email protected].
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/ansible-project/
> 55b059f4-5f99-432b-b556-63546f45ffb1%40googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Dick Visser
> GÉANT
>
> Want to join us? We're hiring: https://www.geant.org/jobs
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ansible-project/1kuXchCEFcs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/CAL8fbwNePAmMAicgph6bB9_
> pjE1G1Q%2BtdArOgMBQPLbchrYfYA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKLrwOfP%2BTA2inm5ShAvBKT%2B7CR46bLnSGf-bYvdnQA7cUU4GA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to