Docker problem after machine restart

I had to reboot the machine I have Discourse running on to replace a bad graphics card. However, Discourse won’t restart. When I try ./launcher restart app from within /var/discourse, I see:

clay@machine:/var/discourse$ ./launcher restart app
+ /usr/bin/docker stop -t 10 app
app

starting up existing container
+ /usr/bin/docker start app
Error response from daemon: Cannot start container app: Bind for 0.0.0.0:9999 failed: port is already allocated
Error: failed to start containers: [app]

When I docker ps -a it looks like:

clay@machine:/var/discourse$ docker ps -a
CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS                        PORTS                                        NAMES
1784278bfaa7        local_discourse/app   "/sbin/boot"        4 weeks ago         Exited (143) 18 minutes ago                                                app                 
fdfe02391dc0        local_discourse/app   "/sbin/runit"       12 months ago       Up 10 minutes                 0.0.0.0:2222->22/tcp, 0.0.0.0:9999->80/tcp   tender_mayer        
72e1859eb261        hello-world           "/hello"            12 months ago       Exited (0) 12 months ago                                                   hopeful_kirch 

That sort of makes it look like an old version of Discourse is running?

What’s going on here? How can I get Discourse up and running again? All was fine before I shut down and rebooted.

Ok - I just stopped the “old” discourse and started the proper one with ./launcher start app. What was that ‘old’ discourse and how do I make sure that doesn’t happen again?

Well… it probably won’t. Any real clues we might have had as to why are probably gone by now. If it happens again, that’s when we need to worry.

2 Likes