how to change listen port from default 7001 to something different?

133,753

Solution 1

Simplest option ...your can change it from AdminConsole. Login to AdminConsole--->Server-->--->Configuration--->ListenPort (Change it)!

Solution 2

if your port is 7001, since it's the default it might not be mentioned in the config.xml. config.xml only reports stuff which differs from the default, for sake of simplicity.

apart from the config.xml, you should look into a number of other places under your domain-home:

bin/stopWebLogic.sh
bin/stopManagedWebLogic.sh
bin/startManagedWebLogic.sh
config/fmwconfig/servers/osbts1as/applications/em/META-INF/emoms.properties
config/config.xml
init-info/startscript.xml
init-info/tokenValue.properties

servers/osbts1as/data/nodemanager/osbts1as.url
servers/osbts1as/data/ldap/conf/replicas.prop
servers/osbts1ms1/data/nodemanager/osbts1ms1.url
servers/osbts1ms1/data/nodemanager/startup.properties

servers/osbts1ms2/data/nodemanager/osbts1ms2.url
servers/osbts1ms2/data/nodemanager/startup.properties
startManagedWebLogic_readme.txt
sysman/state/targets.xml

And don't forget to update any internal URIs of your deployed code.

See also http://www.javamonamour.org/2013/04/weblogic-change-admin-port-number.html

Especially changing the listen address/port of the admin can be troublesome. If you change only the managed server, it's a lot easier.

The best option is just rebuilding the domain.

Solution 3

The following lines are used to control the listen-port of a server, both are necessary:

    <listen-port>7002</listen-port>
    <listen-port-enabled>true</listen-port-enabled>

Solution 4

You can change the listen port as per your requirement. This task can be accomplished in two diffrent ways. By changing config.xml file By changing in admin console Change the listen port in config.xml as per your requirement and bounce the domain. Admin Console Login to AdminConsole->Server->Configuration->ListenPort (Change it) Note: It is a bad practice to edit config.xml and try to edit in admin console(It's a good practise as well)

Solution 5

To update the listen ports for a server: 1.Click Lock & Edit in the Change Center of the webLogic Administration Console 2.expand Environment and select Server 3.click the name of the server and select Configuration > General 4.Find Listen Port to change it 5.click Save and start server.

Share:
133,753
Bhushan
Author by

Bhushan

I am here to learn, and also to contribute my two cents. Working as a Software Engineer. Sun Certified Java Programmer for Java 5.0 . #SOreadytohelp

Updated on March 31, 2020

Comments

  • Bhushan
    Bhushan about 4 years

    Can anyone tell me how to change the default listening port of Weblogic 10.3 to something different? I saw some posts on discussion boards which say that change it under ...//config/config.xml. Even I thought so, but surprisingly, there is no mention of word "port" in that file. Here is the file:

    <?xml version='1.0' encoding='UTF-8'?>
    <domain xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator/1.0/passwordvalidator.xsd http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd">
      <name>vistakon</name>
      <domain-version>10.3.5.0</domain-version>
      <security-configuration>
        <name>vistakon</name>
        <realm>
          <sec:authentication-provider xsi:type="wls:default-authenticatorType"></sec:authentication-provider>
          <sec:authentication-provider xsi:type="wls:default-identity-asserterType">
            <sec:active-type>AuthenticatedUser</sec:active-type>
          </sec:authentication-provider>
          <sec:role-mapper xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-role-mapperType"></sec:role-mapper>
          <sec:authorizer xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-authorizerType"></sec:authorizer>
          <sec:adjudicator xsi:type="wls:default-adjudicatorType"></sec:adjudicator>
          <sec:credential-mapper xsi:type="wls:default-credential-mapperType"></sec:credential-mapper>
          <sec:cert-path-provider xsi:type="wls:web-logic-cert-path-providerType"></sec:cert-path-provider>
          <sec:cert-path-builder>WebLogicCertPathProvider</sec:cert-path-builder>
          <sec:name>myrealm</sec:name>
          <sec:password-validator xmlns:pas="http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator" xsi:type="pas:system-password-validatorType">
            <sec:name>SystemPasswordValidator</sec:name>
            <pas:min-password-length>8</pas:min-password-length>
            <pas:min-numeric-or-special-characters>1</pas:min-numeric-or-special-characters>
          </sec:password-validator>
        </realm>
        <default-realm>myrealm</default-realm>
        <credential-encrypted>{AES}1NMyZAwXiucj9+d8cj/LGFmw+yhHyIj/YprGOq/PA9Vg0Se2+DkV54N5AwFzW+fN2SWvU5YtojWvVSTnifrUdT6uso4fpO6inAa3LQccOQv59VFxdceHOMv2h1dkngxq</credential-encrypted>
        <node-manager-username>weblogic</node-manager-username>
        <node-manager-password-encrypted>{AES}tRw5L/hFc8+4J4w1H8uBj3unE0BC06cdk42CyMLR6Pk=</node-manager-password-encrypted>
      </security-configuration>
      <server>
        <name>AdminServer</name>
        <ssl>
          <name>AdminServer</name>
          <enabled>true</enabled>
        </ssl>
        <listen-port>8080</listen-port>
        <listen-port-enabled>true</listen-port-enabled>
        <listen-address></listen-address>
        <java-compiler>javac</java-compiler>
        <client-cert-proxy-enabled>false</client-cert-proxy-enabled>
        <server-diagnostic-config>
          <wldf-diagnostic-volume>Low</wldf-diagnostic-volume>
        </server-diagnostic-config>
      </server>
      <embedded-ldap>
        <name>vistakon</name>
        <credential-encrypted>{AES}U6dM6LlDLLUYzefQ3M3NnsqijzWKSOgqLqNdJHVJEmeIU5v0wRZGm3ffumXif/uX</credential-encrypted>
      </embedded-ldap>
      <configuration-version>10.3.5.0</configuration-version>
      <app-deployment>
        <name>tbl</name>
        <target>AdminServer</target>
        <module-type>war</module-type>
        <source-path>C:\Documents and Settings\bchitte\Desktop\tbl.war</source-path>
        <security-dd-model>DDOnly</security-dd-model>
      </app-deployment>
      <app-deployment>
        <name>DatabaseLoggerService</name>
        <target>AdminServer</target>
        <module-type>war</module-type>
        <source-path>C:\Documents and Settings\bchitte\workspace\DatabaseLoggerService\DatabaseLoggerService.war</source-path>
        <security-dd-model>DDOnly</security-dd-model>
      </app-deployment>
      <app-deployment>
        <name>ReadingsProgressLogService</name>
        <target>AdminServer</target>
        <module-type>war</module-type>
        <source-path>C:\Documents and Settings\bchitte\workspace\ReadingsProgressLogService\ReadingsProgressLogService.war</source-path>
        <security-dd-model>DDOnly</security-dd-model>
      </app-deployment>
      <app-deployment>
        <name>de</name>
        <target>AdminServer</target>
        <module-type>war</module-type>
        <source-path>C:\Documents and Settings\bchitte\workspace\de.vogella.jersey.first\de.vogella.jersey.first.war</source-path>
        <security-dd-model>DDOnly</security-dd-model>
      </app-deployment>
      <app-deployment>
        <name>UpdateWIPQService</name>
        <target>AdminServer</target>
        <module-type>war</module-type>
        <source-path>C:\Documents and Settings\bchitte\workspace\UpdateWIPQService\UpdateWIPQService.war</source-path>
        <security-dd-model>DDOnly</security-dd-model>
      </app-deployment>
      <jms-server>
        <name>VistakonJMSServer</name>
        <target>AdminServer</target>
        <persistent-store>VistakonFileStore</persistent-store>
      </jms-server>
      <file-store>
        <name>VistakonFileStore</name>
        <target>AdminServer</target>
      </file-store>
      <jms-system-resource>
        <name>VistakonModule</name>
        <target>AdminServer</target>
        <sub-deployment>
          <name>sdVistakon</name>
          <target>VistakonJMSServer</target>
        </sub-deployment>
        <descriptor-file-name>jms/VistakonModule-jms.xml</descriptor-file-name>
      </jms-system-resource>
      <admin-server-name>AdminServer</admin-server-name>
      <jdbc-system-resource>
        <name>jdbc/MSSQL1</name>
        <target></target>
        <descriptor-file-name>jdbc/jdbc2fMSSQL1-5853-jdbc.xml</descriptor-file-name>
      </jdbc-system-resource>
    </domain>
    
  • Codrguy
    Codrguy almost 12 years
    you then will need to go into your domain bin directory and open stopWebLogic.sh and stopManagedWeblogic.sh . change all instances of your old port ( 7001 ) to the new one you chose in the console.
  • Bhushan
    Bhushan about 10 years
    @Codrguy: It's been a long time since I did this, but I don't think I did anything like you said above. Plus it is utility provided by Weblogic itself. So updating required files should be done by it, I guess.
  • Ankit
    Ankit over 9 years
    Not when you are not able to start the server because port is already in use :)
  • NullUserException
    NullUserException almost 8 years
    Most of these files get automatically generated anyway. I would only worry about config.xml and the start and stop WebLogic scripts.