Monday, 30 April 2018

change IP address of weblogic server… don’t forget the adminserver cache

There are a heap of instructions of what you need to change if you change the IP address of your weblogic server, but I find they are not complete.  Google it and use oracle support.  The classic sections are:


For the Administration Server and Managed Servers:

For Node Manager:

  • Modify the IP Address in the WebLogic Server Administration Console, in Home >Summary of Machines > Configuration > Node Manager;
  • Modify occurrences of the IP Address in the nodemanager.properties


It’s easy to grep around for the ADMIN_HOST through the start scripts and the nodemanager.properties files, but this will not fix things.  For example, look at this ps output.

Classic example:  You can see that the management.server is listed as http://10.250.252.190:7001 , yet the ip address of the server is a new and improved 10.255.252.201

[root@northstar ~]# ps -ef |grep java |grep 9085
oracle    2162  2105  0 12:47 ?        00:01:09 /usr/java/jdk1.7.0_99/bin/java -server -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dweblogic.Name=NORTHSTAR_HTML_9085 -Djava.security.policy=/u01/Oracle_Home/wlserver/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -Dweblogic.system.BootIdentityFile=/u01/Oracle_Home/user_projects/domains/e1apps/servers/NORTHSTAR_HTML_9085/data/nodemanager/boot.properties -Dweblogic.nodemanager.ServiceEnabled=true -Dweblogic.nmservice.RotationEnabled=true -Dweblogic.security.SSL.ignoreHostnameVerification=false -Dweblogic.ReverseDNSAllowed=false -XX:MaxPermSize=256m -Dweblogic.wsee.wstx.wsat.deployed=false -Xms2048m -Xmx2048m -Dweblogic.security.SSL.ProtocolVersion=TLSv1.2 -Duser.timezone=Pacific/Auckland -Djava.endorsed.dirs=/usr/java/jdk1.7.0_99/jre/lib/endorsed:/u01/Oracle_Home/wlserver/../oracle_common/modules/endorsed -da -Dwls.home=/u01/Oracle_Home/wlserver/server -Dweblogic.home=/u01/Oracle_Home/wlserver/server -Dweblogic.management.server=
http://10.250.252.190:7001 -Dweblogic.utils.cmm.lowertier.ServiceDisabled=true weblogic.Server

[root@northstar ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
         inet 10.255.252.201  netmask 255.255.255.0  broadcast 10.255.252.255
         inet6 fe80::216:3eff:fe1a:15c3  prefixlen 64  scopeid 0x20<link>
         ether 00:16:3e:1a:15:c3  txqueuelen 1000  (Ethernet)
         RX packets 142041  bytes 12104966 (11.5 MiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 38313  bytes 8723699 (8.3 MiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

When I start this server with commandline on Linux, it starts, but does not register with SM and cannot login with a connection error.

[root@northstar default]# pwd
/u01/Oracle_Home/user_projects/domains/e1apps/servers/AdminServer/data/store/default

-rw-r-----. 1 oracle oracle 1049088 Apr 30 12:49 _WLS_ADMINSERVER000000.DAT

The file above in the DIR above, as the incorrect server address in it’s config:


[root@northstar default]# grep 10. _WLS_ADMINSERVER000000.DAT
Binary file _WLS_ADMINSERVER000000.DAT matches

It’s a binary match – this needs to be removed.

stop admin server:

delete it

goto

/u01/Oracle_Home/user_projects/domains/e1apps/servers/AdminServer/data/nodemanager
[oracle@northstar nodemanager]$ ls -l
total 16
-rw-r-----. 1 oracle oracle  13 Apr 30 21:15 AdminServer.state
-rw-r-----. 1 oracle oracle  27 Apr 30 12:47 AdminServer.url
-rw-r-----. 1 oracle oracle 174 Sep 22  2017 boot.properties
-rw-r-----. 1 oracle oracle 432 Sep 22  2017 startup.properties

change AdminServer.url

NOW:

startManagedWebLogic.sh

ps –ef |grep java

you’ll see that your process now has the correct management server defined (FQDN for the machine – YAY!)


oracle    3709  3653 53 21:22 pts/0    00:00:24 /usr/java/jdk1.7.0_99/bin/java -server -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dweblogic.Name=NORTHSTAR_HTML_9085 -Djava.security.policy=/u01/Oracle_Home/wlserver/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -Dweblogic.security.SSL.trustedCAKeyStore=/u01/Oracle_Home/wlserver/server/lib/cacerts -Djava.endorsed.dirs=/usr/java/jdk1.7.0_99/jre/lib/endorsed:/u01/Oracle_Home/wlserver/../oracle_common/modules/endorsed -da -Dwls.home=/u01/Oracle_Home/wlserver/server -Dweblogic.home=/u01/Oracle_Home/wlserver/server -Dweblogic.management.server=http://northstar.xxx:7001 -Dweblogic.utils.cmm.lowertier.ServiceDisabled=true weblogic.Server
oracle    3829  2836  0 21:23 pts/0    00:00:00 grep --color=auto java
[oracle@northstar default]$


Following my instructions – you’ll delete the DAT file and change the ADminServer.url file and start the AdminServer again – you’ll find everything works.

Instead of

image

I get

image




No comments:

Extending JDE to generative AI