I'm using Cloudify 2.7 with OpenStack Icehouse.
I have deployed a tomct service behind a load balancer apache, using the following application grooxy:
application {
name="servizio_tomcat"
service {
name = "LB_apache"
}
service {
name = "tomcat"
dependsOn = ["LB_apache"]
}
}
Now, the Load Balancer (LB) was started succesfully, whereas the tomcat service returns the following log:
2015-07-10 15:40:00,705 vm1.tomcat [1] INFO [org.cloudifysource.usm.launcher.DefaultProcessLauncher] - tomcat_install.groovy: Tomcat installazione terminata 2015-07-10 15:40:01,039 vm1.tomcat [1] INFO [org.cloudifysource.usm.launcher.DefaultProcessLauncher] - Command exited with value: 0 2015-07-10 15:40:01,239 vm1.tomcat [1] INFO [org.cloudifysource.usm.USMEventLogger.vm1.tomcat] - vm1.tomcat-1 INSTALL completed, duration: 69.2 seconds 2015-07-10 15:40:01,240 vm1.tomcat [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Waiting for dependencies 2015-07-10 15:40:01,240 vm1.tomcat [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Waiting for dependency: vm1.LB_apache 2015-07-10 15:40:01,241 vm1.tomcat [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Waiting for PU: vm1.LB_apache 2015-07-10 15:40:01,242 vm1.tomcat [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Waiting for PUI of service: vm1.LB_apache for 1799998 Milliseconds 2015-07-10 15:40:02,246 vm1.tomcat [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Timeout ended. processing unit vm1.LB_apache found result is false 2015-07-10 15:40:02,246 vm1.tomcat [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Could not find a running instance of service: vm1.LB_apache. Sleeping before trying again 2015-07-10 15:40:07,246 vm1.tomcat [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Waiting for PUI of service: vm1.LB_apache for 1793994 Milliseconds
--EDITED-- Moreover, the LB_apache load balancer service was succesfully started, as follows:
2015-07-23 10:56:56,750 vm1.LB_apache [1] INFO [org.cloudifysource.dsl.internal.BaseDslScript] - LB_apache-service.groovy: service started 2015-07-23 10:56:56,751 vm1.LB_apache [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Process liveness test passed 2015-07-23 10:56:56,751 vm1.LB_apache [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Executing Process Locators! 2015-07-23 10:56:56,761 vm1.LB_apache [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Monitored processes: [4805, 4650] 2015-07-23 10:56:56,766 vm1.LB_apache [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Starting async tasks 2015-07-23 10:56:57,340 vm1.LB_apache [1] WARNING [org.openspaces.admin.internal.discovery.DiscoveryService] - Failed to add GSC with uid [78079166-64e2-496f-8960-9f8da5384c05]; Caused by: java.rmi.ConnectException: Connect Failed to [NIO://192.168.0.197:7010/pid[4133]/156099058240_2_-9033342841429766968_details[class com.gigaspaces.grid.gsc.GSCImpl]]; nested exception is: java.net.SocketTimeoutException 2015-07-23 10:56:57,440 vm1.LB_apache [1] WARNING [org.openspaces.admin.internal.discovery.DiscoveryService] - Failed to add GSC with uid [7651d9af-980b-4609-b025-b6f032cdd5ca]; Caused by: java.rmi.ConnectException: Connect Failed to [NIO://192.168.0.198:7010/pid[4114]/150333879046_2_3930206808247770008_details[class com.gigaspaces.grid.gsc.GSCImpl]]; nested exception is: java.net.SocketTimeoutException 2015-07-23 10:56:57,478 vm1.LB_apache [1] WARNING [org.openspaces.admin.internal.discovery.DiscoveryService] - Failed to add [Processing Unit Instance] with uid [8e7aa0bb-c9e6-48bc-818b-eef54109d19b]; Caused by: java.rmi.ConnectException: Connect Failed to [NIO://192.168.0.197:7010/pid[4133]/156099058256_3_-9033342841429766968_details[class org.openspaces.pu.container.servicegrid.PUServiceBeanImpl]]; nested exception is: java.net.SocketTimeoutException 2015-07-23 10:56:57,742 vm1.LB_apache [1] INFO [LB_apache-stdout] - LB_apache_Start.groovy: About to start LB_apache ...
2015-07-23 10:56:57,743 vm1.LB_apache [1] INFO [LB_apache-stdout] - LB_apache_Start.groovy: Finished start of LB_apache.
Can someone help me to understand that warning? Thanks
This log file only contains INFO logs, not errors. The log lines just indicate that the instance of the Apache load balancer has not started yet. The tomcat instance is configured to 'depend' on the load balancer instance. As a result, tomcat will not be started until the load balancer has started and completed registering to the Cloudify cluster.
The tomcat service will keep waiting until the Apache instance is up.