CenturyLinkLabs / panamax-ui

The Web GUI for Panamax
http://panamax.io
Apache License 2.0
1.44k stars 150 forks source link

The name [container name] is already in use by container [container number]. You have to delete (or rename) that container to be able to reuse that name. #552

Open JulianKingman opened 8 years ago

JulianKingman commented 8 years ago

I'm getting the below error when trying to set up a Wordpress application. I've tried the template, as well as my own configuration that I've used successfully on my VPS. I'm currently running it on OSX, which is the main difference. I've tried renaming the container as it suggests, but that doesn't help, it gives me the same error with the new name instead. I've tried it with both mariadb and mysql.

Oct 14 17:14:35 docker Status: Image is up to date for centurylink/mysql:5.5
Oct 14 17:14:35 systemd Started MySQL.
Oct 14 17:14:35 docker time="2015-10-14T21:14:35Z" level=fatal msg="Error response from daemon: Conflict. The name \"DB\" is already in use by container 853031a3eb7d. You have to delete (or rename) that container to be able to reuse that name."
Oct 14 17:14:35 systemd DB.service: main process exited, code=exited, status=1/FAILURE
Oct 14 17:14:35 docker DB
Oct 14 17:14:35 systemd Unit DB.service entered failed state.
Oct 14 17:14:35 systemd DB.service failed.
Oct 14 17:14:35 systemd WP.service holdoff time over, scheduling restart.
danibram commented 8 years ago

I "solved" changing the name, in your case "DB" to have another name. I changed also the application name too. Find where you use "DB" and change by another name, until we find a definitive solution.

jorgecolonconsulting commented 8 years ago

I think the problem is that there's times where you want to just start up an existing container, but panamax doesn't do that. It tries to re-create the container each time. That assumption is based on my current observation.

...after thinking about it for a while this might be an issue when the vm is either paused or halted abruptly (sudden shutdown or restart).

drptbl commented 8 years ago

I can confirm that I have exactly the same issue as @2upmedia described. Instead of re-using, it tries to create new container.

May 20 10:36:38 docker 66699ca43df5: Already exists
May 20 10:36:38 docker 0e981045f2a5: Already exists
May 20 10:36:38 docker Digest: sha256:4baf71a85bfc7c23beb8ae6f912403ab8f62ad5bcd5d8c8b5407850a9b6f39ff
May 20 10:36:38 docker Status: Image is up to date for mattermost/platform:latest
May 20 10:36:38 docker time="2016-05-20T08:36:38Z" level=fatal msg="Error response from daemon: Conflict. The name \"mattermost_platform_latest\" is already in use by container b567f01155b5. You have to delete (or rename) that container to be able to reuse that name."
May 20 10:36:38 systemd mattermost_platform_latest.service: main process exited, code=exited, status=1/FAILURE
May 20 10:36:38 docker mattermost_platform_latest
May 20 10:36:38 systemd Unit mattermost_platform_latest.service entered failed state.
May 20 10:36:38 systemd mattermost_platform_latest.service failed.
May 20 10:36:48 systemd mattermost_platform_latest.service holdoff time over, scheduling restart.
May 20 10:36:48 systemd Starting mattermost_platform_latest.service...