Docker exits with a exit code on starting

Shiv4nsh

As soon as I start Docker it fails to start and says:

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

When I try to run the command systemctl status docker.service, it gives me this:

 Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
    shivansh@localhost:~/Documents/Huawei/pulsar/docker-files/pulsarReporting/memcached$ systemctl status docker.service
    ● docker.service - Docker Application Container Engine
       Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
       Active: failed (Result: exit-code) since Tue 2016-10-25 11:10:12 IST; 13s ago
         Docs: https://docs.docker.com
      Process: 20514 ExecStart=/usr/bin/docker daemon -H fd:// $DOCKER_OPTS (code=exited, status=1/FAILURE)
     Main PID: 20514 (code=exited, status=1/FAILURE)

    Oct 25 11:10:11 localhost systemd[1]: Starting Docker Application Container Engine...
    Oct 25 11:10:11 localhost docker[20514]: time="2016-10-25T11:10:11.789509056+05:30" level=info msg="[graphdriver] using prior storage driver \"aufs\""
    Oct 25 11:10:11 localhost docker[20514]: time="2016-10-25T11:10:11.914441951+05:30" level=info msg="Graph migration to content-addressability took 0.00 seconds"
    Oct 25 11:10:11 localhost docker[20514]: time="2016-10-25T11:10:11.918206945+05:30" level=info msg="Firewalld running: false"
    Oct 25 11:10:12 localhost docker[20514]: time="2016-10-25T11:10:12.697748195+05:30" level=fatal msg="Error starting daemon: Error initializing network controller: could not delete the default bridge network: network bridge has acti
    Oct 25 11:10:12 localhost systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
    Oct 25 11:10:12 localhost systemd[1]: Failed to start Docker Application Container Engine.
    Oct 25 11:10:12 localhost systemd[1]: docker.service: Unit entered failed state.
    Oct 25 11:10:12 localhost systemd[1]: docker.service: Failed with result 'exit-code'.

I do not know what the problem is here. I am using Docker on Ubuntu 16.04 (Xenial Xerus), and I am fairly new to this. I tried with restarting the system, but it does not help.

VonC

This error comes from daemon/daemon_unix.go

// Clear stale bridge network
    if n, err := controller.NetworkByName("bridge"); err == nil {
        if err = n.Delete(); err != nil {
            return nil, fmt.Errorf("could not delete the default bridge network: %v", err)
        }
}

In your case, the full error message is:

Error starting daemon: 
Error initializing network controller: 
could not delete the default bridge network: network bridge has active endpoints

See for instance issue 18283, with a possible workaround in issue 17083

sudo rm -r /var/lib/docker/network 

Supposedly, PR 21261 solves a couple of cases that fixes the active endpoint issue during ungraceful daemon shutdown scenario.
It is only available with docker 1.12.2, so check your current docker version.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Docker build exits with exit code: 1

Docker service exits with exit code 0

Starting UWSGI via init.d script exits with exit code 1 and says 'failed', but processes are running fine

python docker container exits immediately upon starting

Eclipse exits automatically exit code 127

Debugger is not starting, exit code 0

netbeans java code exits with exit code 1 with no apparant reason

Docker container exits on non-zero exit status

Docker httpd:alpine image exits with code 1

Docker: Play framework application exits with code 0

why docker container exits with code 0?

What does it mean when Click exits with exit code 2?

Ruby exits with exit code 1 responding to TERM if running without shell

Loop over vector exits with error Process finished with exit code -1073741819

Error starting eclipse exit code=13

Docker exits with code 0 when using pm2 start

Python exits with code 0 immediatelly after stand up with docker

Container exits with the following message docker container exited with code 0

Docker container exits with code 0 after running composer install

Why does docker compose exit right after starting?

React server does not start in docker and exits after message Starting development server

Error starting Eclipse in Linux: "JVM terminated. Exit code=13"

Postgres Container Exits After Starting

worker exits after starting in Supervisor

Parent script continues when child exits with non-zero exit code

For loop in gilab-ci exits when inner command produces non-zero exit code

Trying to run Docker resulted in exit code 127

Go Docker Container Fail: "Exit Code 1"

How to get exit code for Docker container that is not running