Monday Oct 19, 2015

java.lang.AssertionError: Could not obtain the localhost address in a new 12c install

If you get the error below in a new weblogic server install:

<19-10-2015 16:51:13 CLT> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: A MultiException has 2 exceptions.  They are:
1. java.lang.AssertionError: Could not obtain the localhost address. The most likely cause is an error in the network configuration of this machine.
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.rjvm.RJVMService
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:447)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225)
    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2488)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.AssertionError: Could not obtain the localhost address. The most likely cause is an error in the network configuration of this machine.
    at weblogic.utils.net.AddressUtils$AddressMaker.getLocalHost(AddressUtils.java:39)
    at weblogic.utils.net.AddressUtils$AddressMaker.<clinit>(AddressUtils.java:34)
    at weblogic.utils.net.AddressUtils.getIPForLocalHost(AddressUtils.java:207)
    at weblogic.rjvm.JVMID.setLocalID(JVMID.java:241)
    at weblogic.rjvm.RJVMService.setJVMID(RJVMService.java:69)
    Truncated. see log file for complete stacktrace
Caused By: java.net.UnknownHostException: lmestre-linux: lmestre-linux: unknown error
    at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
    at weblogic.utils.net.AddressUtils$AddressMaker.getLocalHost(AddressUtils.java:37)
    at weblogic.utils.net.AddressUtils$AddressMaker.<clinit>(AddressUtils.java:34)
    at weblogic.utils.net.AddressUtils.getIPForLocalHost(AddressUtils.java:207)
    at weblogic.rjvm.JVMID.setLocalID(JVMID.java:241)
    Truncated. see log file for complete stacktrace
Caused By: java.net.UnknownHostException: lmestre-linux: unknown error
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
    at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
    at weblogic.utils.net.AddressUtils$AddressMaker.getLocalHost(AddressUtils.java:37)
    Truncated. see log file for complete stacktrace
>
***************************************************************************
The WebLogic Server encountered a critical failure
Reason: Assertion violated
***************************************************************************
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class weblogic.protocol.ServerIdentityManager$Initializer
    at weblogic.protocol.ServerIdentityManager.findServerIdentity(ServerIdentityManager.java:66)
    at weblogic.protocol.URLManager.findAdministrationURL(URLManager.java:174)
    at weblogic.server.ServerLifeCycleRuntime.getLifeCycleOperationsRemote(ServerLifeCycleRuntime.java:1166)
    at weblogic.t3.srvr.ServerRuntime.sendStateToAdminServer(ServerRuntime.java:433)
    at weblogic.t3.srvr.ServerRuntime.updateRunState(ServerRuntime.java:419)
    at weblogic.t3.srvr.T3Srvr.setState(T3Srvr.java:231)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:531)
    at weblogic.Server.main(Server.java:65)

Make sure your network configuration is fine.

This was my hosts configuration:

[lmestre@lmestre-linux bin]$ more /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6  


After I added my hostname at the end of /etc/hosts, the issue is gone

[lmestre@lmestre-linux bin]$ uname -a
Linux lmestre-linux 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 13:35:02 PST 2013 x86_64 x86_64 x86_64 GNU/Linux

[lmestre@lmestre-linux bin]$ more /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 lmestre-linux
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 lmestre-linux

Enjoy!

Friday Feb 14, 2014

How to install weblogic Administration Console after it is uninstalled?

As per security purposes, you might need to uninstall your WebLogic Administration Console, or perhaps by mistake.
I would say that this is a very uncommon scenario, but one of my customer's faced it recently.


So,  How do I uninstall WebLogic Administration Console?

1. To uninstall WebLogic Administration Console, execute uninstall script, and select Administration Console to be uninstall it.

eg:

For Windows Environments

wlserver_10.3/uninstall/uninstall.cmd

For Linux/Unix Environments

wlserver_10.3/uninstall/uninstall.sh

2. Hit Next

You have Administration Console Uninstalled it.

Admin Server will start normally, but you won't have access to admin console e.g.: http://localhost:7001/console


What if you just did it by mistake and you need to access it again?

So, How do I install it again ?

Voila!

1. Use the installer you used to re install the components uninstalled, e.g:

java -d64 -jar wls1036_generic.jar

2. Start Admin Server

3. Access Administration Console at http://localhost:7001/console


Enjoy!
About


My name is Luz Mestre. I work as Principal Technical Support Engineer at Oracle Support. I'll post here the most interesting challenges I have in my daily work. The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Categories
Archives
« July 2016
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
      
Today