oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects
https://developer.oracle.com/use-cases/#containers
Universal Permissive License v1.0
6.53k stars 5.42k forks source link

Failing to connect to 12.2.1.3 weblogic image when using wljmsclient #1828

Open BlueEldur opened 3 years ago

BlueEldur commented 3 years ago

I'm able to connect to local instances of weblogic 12.2.1.3 that I run with ./startweblogic.sh, but when I try using a 12.2.1.3 docker image, I get the error

"Caused by: javax.naming.NamingException: Couldn't resolve initial reference: NameService; no valid urls found in [EndPointSelector{ iiop://localhost:7001/NameService}]"

When trying to establish an initialcontext. I'm able to log in to the docker image and configure via the console just fine. Also mentioning that my use case is with JMS resources. But in either case, it seems the connection fails from the start. What could the difference be/what causes this? I realize this may not be an issue specific to docker images, but I haven't been able to find answers elsewhere so I'm just opening this as a request for help.

domain.properties

ADMIN_NAME=admin-server
ADMIN_HOST=wlsadmin
MANAGED_SERVER_NAME_BASE=managed-server
CONFIGURED_MANAGED_SERVER_COUNT=1
CLUSTER_NAME=weblogic-1
DEBUG_FLAG=true
PRODUCTION_MODE_ENABLED=false
CLUSTER_TYPE=DYNAMIC
username=connectuser
password=connectweblogicjms0

running with command

docker run -d -e ADMINISTRATION_PORT_ENABLED=false -e DOMAIN_NAME='base_domain' -p 7001:7001 -p 9002:9002 \
      -v $PWD:/u01/oracle/properties store/oracle/weblogic:12.2.1.3-dev-200127
ddsharpe commented 3 years ago

@BlueEldur is the attempt to connect to the running WLS instance from inside the same Docker container, or outside? What does the command look like that you executed to start the Docker container with WLS?

BlueEldur commented 3 years ago

I'm attempting to connect from outside the docker container. updated OP with more details about the setup, sorry.

BlueEldur commented 3 years ago

I should also further clarify that what I've done is use the image released here https://hub.docker.com/_/oracle-weblogic-server-12c, started the container, logged in, and setup the JMS resources myself and tried to connect. I thought maybe it was an issue with wljmsclient using IIOP like here but given that it works against my local setup, maybe not. IIOP is enabled in the console.

I had a lot of difficulty trying to generate a weblogic image and extend it using the examples in the repo. I could often get to the domain volume step, but the JMS extension part was proving difficult. The example extensions, such as 12213-domain-with-resources did not work out of the box for me when extending 12213-weblogic-domain-in-volumel and may have inconsistent config names from my experience.

mriccell commented 3 years ago

@BlueEldur do you have a specific requirement to use the IIOP client? The WebLogic Server-IIOP client is deprecated as of WebLogic Server 12.1.3 because of its dependency on the wlfullclient.jar and it has been removed from WebLogic 14.1.1.0. Oracle recommends using T3 clients instead of IIOP. Please refer to https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-server/12.2.1.4/notes/whatsnew.html#GUID-69F8EBC9-3141-4015-A58F-C9BA0EB57277. Thanks Monica

ddsharpe commented 3 years ago

@BlueEldur In regards to your domain configuration, have you tried WDT and WIT (WebLogic Deploy Tooling, and WebLogic Image Tool)?

BlueEldur commented 3 years ago

@mriccell I would love to use t3thinclient but we are using maven.oracle.com which only seems to have 12.2.1.3 wljmsclient in it. My use case actually has to do with an integration test that requires an oracle weblogic server to connect to. We are trying to move to a testcontainer running an oracle weblogic image, and running the tests with jenkins. Thus, purely for building in jenkins to do automated integration testing, we use maven.oracle.com for the client jar dependency instead of using a local jar.

@ddsharpe This image tool looks promising - I will test it out, thank you!

zappee commented 3 years ago

I faced a similar issue. On my side to add -Dweblogic.rjvm.enableprotocolswitch=true JVM param to the WebLogic start script solved that issue. Maybe it worth a try.