Depending on the configuration of WebLogic Server 11g, when starting the managed servers (such as WLS_FORMS and WLS_REPORTS), they may either listen by the IP address of the PC/server or the computer name of the PC/server. Sometimes when a computer is moved to another room in a building, the IP address changes. If the managed servers listen to the IP address, a problem or error may occur during startup resulting in the WebLogic managed server not starting:
“Unable to create a server socket for listening on channel “Default”. The address ###.###.###.### might be incorrect or another process is using port ####: java.net.BindException: Cannot assign requested address: JVM_Bind.”
To fix this, you will need to modify some scripts so that the servers will listen on the new IP address:
A. startManagedWebLogic.cmd:
- Go to Start –> All Programs –> Oracle Classic Instance — asinst_1 –> Forms Services
- Right-click on Start Managed Server – WLS_FORMS
- Select Properties
- Change the IP address to the IP address your machine currently is
- Apply changes and click OK
- Repeat for Stop Managed Server – WLS_FORMS
- Go to Start –> All Programs –> Oracle Classic Instance — asinst_1 –> Reports Services
- Right-click on Start Managed Server – WLS_REPORTS
- Select Properties
- Change the IP address to the IP address your machine currently is
- Apply changes and click OK
- Repeat for Stop Managed Server – WLS_REPORTS
B. config.xml:
- Go to C:\Oracle\Middleware\user_projects\domains\FormsDomain\config
- Make a backup of config.xml. This is important so you will have a backup just in case.
- Open config.xml in a text editor
- Replace all occurrences of the old IP address with the new IP address by using the Replace tool in the text editor
- Save all changes and close the file
C. Hosts file
- Go to C:\Windows\system32\drivers\etc
- Make a backup of the hosts file. This is important so you will have a backup just in case.
- Open up the hosts file in a text editor.
- If your old IP address is mapped to your hostname, change the IP address to the new one.
- Save and close the file.
You should be able to start your WebLogic managed servers without fail.
NOTE: If you make a change to the hosts file and the WebLogic servers still fail to start up, restart your PC/server and try again.
NOTE: Instead of the IP address, you can also use your PC’s hostname.