viernes, 16 de septiembre de 2016

Fallo con Coherence + WKA en weblogic server

En una VM descargada del sitio de Oracle con la Oracle SOA Suite 12.2.1.1 + BAM al instalar y configurar la suite BPM y extender el dominio SOA para incluir las características BPM, se produce un error al tratar de tener los servidores bamserver1 y soaserver1 iniciados al mismo tiempo.

El error es antecedido por el siguiente WARNING:

<Sep 15, 2016, 12:42:24,970 PM PDT> <Warning> <CoherenceIntegration> <BEA-2194505> <Server bam_server1 is configured with localhost as the Unicast Listen Address. A generated Coherence WKA list will not operate correctly across multiple machines. This will result in an error if Coherence is run in Production mode.>
<Sep 15, 2016, 12:42:25,900 PM PDT> <Warning> <CoherenceIntegration> <BEA-2194505> <Server soa_server1 is configured with localhost as the Unicast Listen Address. A generated Coherence WKA list will not operate correctly across multiple machines. This will result in an error if Coherence is run in Production mode.>
Sep 15, 2016 12:42:30 PM com.tangosol.coherence.component.util.logOutput.Jdk log

Este WARNING conlleva finalmente a que no se puedan enlazar los nodos del clúster Coherence y finaliza con un ERROR:

There are 1 nested errors:
weblogic.cacheprovider.coherence.CoherenceException:
    at weblogic.cacheprovider.coherence.CoherenceClusterManager.ensureWKAAddresses(CoherenceClusterManager.java:510)
    at weblogic.cacheprovider.coherence.CoherenceClusterManager.configureClusterService(CoherenceClusterManager.java:236)
    at weblogic.cacheprovider.CacheProviderServerService.bootCoherenceFromWLSCluster(CacheProviderServerService.java:225)
    at weblogic.cacheprovider.CacheProviderServerService.initCoherence(CacheProviderServerService.java:94)
    at weblogic.cacheprovider.CacheProviderServerService.initialize(CacheProviderServerService.java:71)
    at weblogic.cacheprovider.CacheProviderServerService.start(CacheProviderServerService.java:65)
    at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:78)
    at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1017)
    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:388)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:430)
    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)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>
 
El WARNING nos alerta que si el Coherence es ejecutado en modo de desarrollo se tendrá problemas, lo cual se ve reflejado en los logs al poco tiempo, pero también nos alerta que se está usando localhost en vez del nombre real del servidor. Entre escoger poner Coherence en modo desarrollo o cambiar el listener address del valor localhost al nombre real del servidor, la segunda variante es la más factible.

La solución conlleva los siguientes pasos:
  1. Levantar el adminserver y acceder a la consola de administración.
  2. Modificar los valores de listener address tanto en el bamserver1 como en el soaserver1 por el nombre del servidor obtenido al ejecutar el comando hostname en una consola.
  3. Bajar el servidor adminserver.
  4. Iniciar el adminserver, el soaserver1 y el bamserver1.

Se podrá comprobar que el problema ha sido resuelto.

Espero les sea de utilidad.