Search code examples
oracle-databasecommand-linewebserverweblogic-10.xwlst

Connecting to Oracle WebLogic Server Instance (Admin Server)


I have just started playing around with Oracle Weblogic. I am trying to do some scripting using WLST , a commandline tool. I have a test environment set up which has Weblogic 10.3 and Linux 2.6.18 on it. I have managed to log into wlst in the offline/interactive mode.

I now want to connect to the AdminServer in my domain. I am having issues doing so.

Following is the command that I am using:

    wls:/offline> connect('username','password','localhost:7002')

Once the command is fired it just shows the cursor blinking and the operation does not timeout.

Using the console I have verified the state of the AdminServer , the user defined in security realm and the listen port of the server.

I am wondering why the above command did not work.

On the other hand I created a test managed server using the administration console and successfully made a connection through wlst using the same command.

Am I missing something ?

Thanks !!


Solution

  • I see two things.

    On a default installation, port 7002 is a ssl port. It might not be configured and to use it you should specify the t3s protocol, instead of using default t3.

    Also, the server is not listening on localhost. That server has an IP address, and chances are the admin server bound to it. It is not listening to 127.0.0.1.

    To tell, issue this command (Linux):

    #Linux
    netstat -plan | grep 7001.*LISTEN 
    
    REM Windows
    netstat -a -p tcp -n -o | findstr /R 7001.*LISTENING 
    

    You will see something like this (Linux):

    tcp   0    0 ::ffff:192.168.1.11:7001   :::*     LISTEN      20993/java
    

    You can use the IP address, but might as well use the fully qualified name given by:

    nslookup 192.168.1.11
    

    Try again connecting :

    connect('username','password','t3://myserver-fqdn.example.com:7001')
    

    Or if SSL is configured, this should work:

    connect('username','password','t3s://myserver-fqdn.example.com:7002')