docker-images: WebLogic Docker container silently fails to start
docker run -d -p 7001:7001 -p 9002:9002 -v $PWD:/u01/oracle/properties store/oracle/weblogic:12.2.1.4
Unable to find image 'store/oracle/weblogic:12.2.1.4' locally
12.2.1.4: Pulling from store/oracle/weblogic
822ace0353cb: Pull complete
19841f86e7b5: Pull complete
b3c7d6d987c6: Pull complete
cc5da308016d: Pull complete
91c19f73b26d: Pull complete
afca886f8980: Pull complete
Digest: sha256:7f0cb6f693cc15c18ae279c30df8dbdda8073598cc09caab8f5f67ce150823d8
Status: Downloaded newer image for store/oracle/weblogic:12.2.1.4
f47e055898f6f7443a6bc9d02e7ee22246328fa8c61d0a93fea184dfcbeac392
Looks fine so far… Let’s see the running container:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f47e055898f6 store/oracle/weblogic:12.2.1.4 "/u01/oracle/createA…" 9 seconds ago Up 8 seconds 0.0.0.0:7001->7001/tcp, 0.0.0.0:9002->9002/tcp clever_curie
Great, let’s try to run a bash shell in the container:
docker exec -it f47e055898f6 /bin/bash
Error response from daemon: Container f47e055898f6f7443a6bc9d02e7ee22246328fa8c61d0a93fea184dfcbeac392 is not running```
Ok, so the container exited in the 30 seconds that elapsed between running ‘docker ps’ and the command above. Below I have confirmation that the container exited, but I have no idea why.
Let’s see the stopped container.
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f47e055898f6 store/oracle/weblogic:12.2.1.4 "/u01/oracle/createA…" 53 seconds ago Exited (1) 39 seconds ago clever_curie```
docker logs -f f47e055898f6
Domain Home is: /u01/oracle/user_projects/domains/
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
domain_name : [base_domain]
admin_listen_port : [7001]
domain_path : [/u01/oracle/user_projects/domains/base_domain]
production_mode : [prod]
admin name : [AdminServer]
administration_port_enabled : [true]
administration_port : [9002]
Exiting WebLogic Scripting Tool.
/u01/oracle/createAndStartEmptyDomain.sh: line 66: /u01/oracle/user_projects/domains//bin/setDomainEnv.sh: No such file or directory
/u01/oracle/createAndStartEmptyDomain.sh: line 70: /u01/oracle/user_projects/domains//startWebLogic.sh: No such file or directory
touch: cannot touch ‘/u01/oracle/user_projects/domains//servers/AdminServer/logs/AdminServer.log’: No such file or directory
tail: cannot open ‘/u01/oracle/user_projects/domains//servers/AdminServer/logs/AdminServer.log’ for reading: No such file or directory
tail: no files remaining
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 45 (22 by maintainers)
To all who are struggling as I did:
For me this solved the problem. You just need to wait for the container now to init.
for docker image store/oracle/weblogic:12.2.1.4-dev-200117 follow this link " https://hub.docker.com/_/oracle-weblogic-server-12c "
modify this line
#Define DOMAIN_HOME export DOMAIN_HOME=/u01/oracle/user_projects/domains/$DOMAIN_NAME
to
export DOMAIN_HOME=/u01/oracle/user_projects/domains/base_domain
and save
change permission
and restart
I suspect you do not have permissions to see the properties file. The owner of the directories is oracle:oracle you can not be root also the permission s of the host directory where the properties file is should be 777. Try docker run -it -v $PWD:/u01/oracle/properties store/oracle/weblogic:12.2.1.4 /bin/bash then cd /u01/oracle/properties and see if you can cat the properties file.
Thanks a lot haythamadel82. I ran into the exact same issue with the 12.2.1.4-dev-200117 image, and I was able to get my WebLogic container up and running successfully with your workaround. Thanks also to the other people who provided input.
Sounds like the domain still isn’t created correctly. Check your logs, because I suspect the OCR images need all the environment variables provided. You may have better luck by building the image yourself using the Dockerfiles.
@astrapotro I was able to start the container with the command from @mriccell
Despite the errors we both get when running
createAndStartEmptyDomain.shit does actually create the path/u01/oracle/user_projects/domains/base_domainand you can go to that path to runstartWebLogic.shwhich should successfully start the server.