[weblogic] how to change listen port from default 7001 to something different?

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>

This question is related to weblogic weblogic-10.x weblogic11g

The answer is


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.


If you still get the exception in the server startup after changing listen port, you should try changing Pointbase server port and debug port in setDomainEnv.cmd


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)


I solved the issue by Changing the port no. in adrs-instances.xml file:

\JDEV_USER_HOME\system11.1.1.3.37.56.60\o.j2ee\adrs-instances.xml


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.


That file has a listen-port element - that should be what you need to change, although it is currently set to 8080, not 7001.


As my experience, you can add another domain which listens different port than 7001, and use this domain in to deploy app.

Here's an example: http://st-curriculum.oracle.com/obe/fmw/wls/10g/r3/installconfig/install_wls/install_wls.htm

HTH.


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>