Tuesday, 18 October 2016

com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable HOST


I saw this today on a newly built ODM Rules box ( using Red Hat Enterprise Linux 6.6 )

SystemOut.log

...
[10/18/16 15:44:36:553 BST] 00000001 WsServerImpl  E   WSVR0100W: An error occurred initializing, Node1-DSServer [class com.ibm.ws.runtime.component.ServerImpl]
com.ibm.ws.exception.ConfigurationError: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable HOST
at com.ibm.ws.security.core.distSecurityComponentImpl.initialize(distSecurityComponentImpl.java:415)
at com.ibm.ws.security.core.SecurityComponentImpl.initialize(SecurityComponentImpl.java:94)
at com.ibm.ws.runtime.component.ContainerHelper.initWsComponent(ContainerHelper.java:1193)
at com.ibm.ws.runtime.component.ContainerHelper.initializeComponent(ContainerHelper.java:1100)
at com.ibm.ws.runtime.component.ContainerHelper.initializeComponents(ContainerHelper.java:902)
at com.ibm.ws.runtime.component.ContainerImpl.initializeComponents(ContainerImpl.java:776)
at com.ibm.ws.runtime.component.ContainerImpl.initializeComponents(ContainerImpl.java:750)
at com.ibm.ws.runtime.component.ServerImpl.initialize(ServerImpl.java:370)
at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:293)
at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:224)
at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:697)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:234)
at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:96)
at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:981)
at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:402)
at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:165)
Caused by: com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable HOST
at com.ibm.ws.runtime.component.VariableMapImpl.expand(VariableMapImpl.java:433)
at com.ibm.ws.runtime.component.VariableMapImpl.expand(VariableMapImpl.java:327)
at com.ibm.ws.runtime.config.AbstractConfigObject.getString(AbstractConfigObject.java:42)
at com.ibm.ws.security.config.SecurityConfigManagerImpl.getString(SecurityConfigManagerImpl.java:1128)
at com.ibm.ws.security.config.GenericConfigHelperImpl.getString(GenericConfigHelperImpl.java:346)
at com.ibm.ws.security.config.GenericConfigHelperImpl.getString(GenericConfigHelperImpl.java:300)
at com.ibm.ws.security.config.AuthMechanismConfigImpl.getString(AuthMechanismConfigImpl.java:1154)
at com.ibm.ws.security.config.CSIv2ConfigImpl.initializeOnServer(CSIv2ConfigImpl.java:744)
at com.ibm.ws.security.config.CSIv2ConfigImpl.initialize(CSIv2ConfigImpl.java:1130)
at com.ibm.ws.security.config.CSIv2ConfigImpl.<init>(CSIv2ConfigImpl.java:107)
at com.ibm.ws.security.config.SecurityConfigObjectFactoryImpl.createCSIv2Config(SecurityConfigObjectFactoryImpl.java:116)
at com.ibm.ws.security.config.SecurityObjectLocator.do_getCSIv2Config(SecurityObjectLocator.java:869)
at com.ibm.ws.security.config.SecurityObjectLocator.getCSIv2Config(SecurityObjectLocator.java:899)
at com.ibm.ws.security.core.distSecurityComponentImpl.initialize_CSIv2(distSecurityComponentImpl.java:1128)
at com.ibm.ws.security.core.distSecurityComponentImpl.initializeSecurityConfig(distSecurityComponentImpl.java:1308)
at com.ibm.ws.security.core.distSecurityComponentImpl.initialize(distSecurityComponentImpl.java:382)
... 37 more
...

FFDC

...
[10/18/16 15:44:36:495 BST]     FFDC Exception:com.ibm.wsspi.runtime.variable.UndefinedVariableException SourceId:com.ibm.ws.security.core.distSecurityComponentImpl.initialize ProbeId:402 Reporter:com.ibm.ws.security.core.distSecurityComponentImpl@34e74114
com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable HOST
...

As ever, the internet had the answer: -


The solution was to ensure that my server's hostname was in /etc/hosts.

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.153.130 odmdemo

Once I did this, and restarted the application server JVM, we were Good To Go (TM)


No comments:

Yay, VMware Fusion and macOS Big Sur - no longer "NAT good friends" - forgive the double negative and the terrible pun ...

After macOS 11 Big Sur was released in 2020, VMware updated their Fusion product to v12 and, sadly, managed to break Network Address Trans...