2021 Feb 18 6:00 AM
Hello,
to be honest, I haven't understand the stop and re-start process of the Abap AS 1909 in Docker. Somewhere it is mentioned just to press Ctrl+C (but where?). Blog post of Thomas Jung mentions something to log on AS shell and manually stop system and database process. Anyway, I tried all methods, but when I executed run command again, I received always followeing issue:
docker: Error response from daemon: Conflict. The container name "/a4h" is already in use by container "8371f56577cc88aft name.
Ok, the solution is to execute command
docker rm -f a4h
After that I could execute docker run command again. And system works. But is this really the way it works? Always remove the container and execute again?
It would be nice, if somebody could describe the exact steps to safely stopping and starting the Abap AS within docker. Please remember not every Abap developer is a docker, unix and system adminstrator specialist. 🙂
Best regards, Tapio
2021 Feb 18 7:47 AM
If you use you use "docker rm -f a4h" you will remove the container with all the changes in it and you will not be able to run "docker start -ai a4h" and thus continue in your work.
If you hit Ctrl-C in the console window where you issued the command "docker run ...", the container will sthud down gracefully and you will be able to run "docker start -ai a4h" and the changes you had done so far will be preserved.
You don't need to use Ctrl-C because you can also use "docker stop --time 3600 a4h". This option provides the same results.
The container name conflict was caused by the fact you issued another "docker run ... --name a4h ...". If you meant to start a fresh system from scratch, then you need to run "docker rm -f a4h" before you can proceed. But if you wanted to continue where left the container before you stopped it, then you should use "docker start -ai a4h".
Thomas Jung likes to play with tools and thus he wanted to shut down the system manually even though it is not necessary and there was no need for it.
PS: You can find some details about Stopping and Starting docker containers at the bottom of https://hub.docker.com/_/sap-abap-trial/plans/ac8a4f9b-ae29-4afa-9b39-25aeea24b821?tab=instructions
2021 Feb 18 7:47 AM
If you use you use "docker rm -f a4h" you will remove the container with all the changes in it and you will not be able to run "docker start -ai a4h" and thus continue in your work.
If you hit Ctrl-C in the console window where you issued the command "docker run ...", the container will sthud down gracefully and you will be able to run "docker start -ai a4h" and the changes you had done so far will be preserved.
You don't need to use Ctrl-C because you can also use "docker stop --time 3600 a4h". This option provides the same results.
The container name conflict was caused by the fact you issued another "docker run ... --name a4h ...". If you meant to start a fresh system from scratch, then you need to run "docker rm -f a4h" before you can proceed. But if you wanted to continue where left the container before you stopped it, then you should use "docker start -ai a4h".
Thomas Jung likes to play with tools and thus he wanted to shut down the system manually even though it is not necessary and there was no need for it.
PS: You can find some details about Stopping and Starting docker containers at the bottom of https://hub.docker.com/_/sap-abap-trial/plans/ac8a4f9b-ae29-4afa-9b39-25aeea24b821?tab=instructions
2021 Feb 18 7:56 AM
Hello Jakub,
I did press CTRL-C in the Terminal-Window where I issued the "docker run..." command, but nothing happend. Only a red colored "^C" was shown in the command line. Nothing else and I think that was the problem. In future I will use "docker stop..." Thank you.
Tapio