流程无限期地开始和停止

时间:2015-07-14 10:09:18

标签: cloudify

我在OpenStack Icehouse中使用Cloudify 2.7。

我为Glassfish开发了一个服务配方,它将实例注册到Apache Load Balancer。

start事件执行glassfish_start.groovy文件,该文件运行以下命令:

su - glassfish -c "asadmin --passwordfile /home/glassfish/passwd.gf --user $userAdmin start-domain $domain"
su - glassfish -c "asadmin --passwordfile /home/glassfish/passwd.gf --user $userAdmin deploy --contextroot \"/\" $warName"

在开始活动结束后,我可以看到:

2015-07-14 09:59:15,678 glassfish.glassfish [1] INFO ....
[org.cloudifysource.dsl.internal.BaseDslScript] - glassfish-service.groovy (startDetection): arePortsFree http=8080
2015-07-14 09:59:15,680 glassfish.glassfish [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Process liveness test passed
2015-07-14 09:59:15,680 glassfish.glassfish [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Executing Process Locators!
2015-07-14 09:59:15,684 glassfish.glassfish [1] INFO [org.cloudifysource.usm.locator.DefaultProcessLocator] - Looking for actual process ID in process tree
2015-07-14 09:59:15,692 glassfish.glassfish [1] INFO [org.cloudifysource.usm.locator.DefaultProcessLocator] - Located process (6446): /usr/lib/jvm/java-8-oracle/jre/bin/java [java, -jar, /opt/glassfish4/bin/../glassfish/lib/client/appserver-cli.jar, --passwordfile, /home/glassfish/passwd.gf, --user, <user>, deploy, --contextroot, /, hello.war]
2015-07-14 09:59:15,693 glassfish.glassfish [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Monitored processes: [6446]

2015-07-14 09:59:15,700 glassfish.glassfish [1] INFO [org.cloudifysource.usm.USMEventLogger.glassfish.glassfish] - glassfish.glassfish-1 POST_START invoked
2015-07-14 09:59:15,707 glassfish.glassfish [1] INFO [org.cloudifysource.dsl.internal.BaseDslScript] - glassfish-service.groovy: glassfish Post-start - useLoadBalancer = true - Adding Glassfish instance onto ApacheLB...
2015-07-14 09:59:15,721 glassfish.glassfish [1] WARNING [org.cloudifysource.utilitydomain.admin.TimedAdmin] - Admin object might expire prematurely! The specified timeout for waiting for PU was set to 180 SECONDS while the admin timeout is 120 seconds
2015-07-14 09:59:15,740 glassfish.glassfish [1] INFO [org.cloudifysource.dsl.internal.BaseDslScript] - glassfish-service.groovy: add-node onto ApacheLB ...
2015-07-14 09:59:15,742 glassfish.glassfish [1] INFO [org.cloudifysource.dsl.internal.BaseDslScript] - glassfish-service.groovy: ipAddress is <IP> ...
2015-07-14 09:59:15,745 glassfish.glassfish [1] INFO [org.cloudifysource.dsl.internal.BaseDslScript] - glassfish-service.groovy: Sto per aggiungere l'URL http://<IP>:8080 ad ApacheLB ...
2015-07-14 09:59:21,686 glassfish.glassfish [1] INFO [glassfish-stdout] -      [exec] Application deployed with name hello.
2015-07-14 09:59:21,687 glassfish.glassfish [1] INFO [glassfish-stdout] -      [exec] Command deploy executed successfully.
2015-07-14 09:59:21,687 glassfish.glassfish [1] INFO [glassfish-stdout] -      [exec] startOnUbuntu.sh: End
2015-07-14 09:59:21,687 glassfish.glassfish [1] INFO [glassfish-stdout] -      [exec] + echo 'startOnUbuntu.sh: End'
2015-07-14 09:59:23,007 glassfish.glassfish [1] INFO [org.cloudifysource.dsl.internal.BaseDslScript] - glassfish-service.groovy: glassfish Post-start ended
2015-07-14 09:59:23,008 glassfish.glassfish [1] INFO [org.cloudifysource.usm.USMEventLogger.glassfish.glassfish] - glassfish.glassfish-1 POST_START completed, duration: 7.3 seconds

2015-07-14 09:59:23,008 glassfish.glassfish [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Starting async tasks
2015-07-14 09:59:25,011 glassfish.glassfish [1] INFO [org.cloudifysource.usm.USMLifecycleBean] - Stop detection - service has stopped!
2015-07-14 09:59:25,011 glassfish.glassfish [1] INFO [org.cloudifysource.usm.UniversalServiceManagerBean] - Detected death of underlying process
2015-07-14 09:59:25,011 glassfish.glassfish [1] INFO [org.cloudifysource.usm.USMEventLogger.glassfish.glassfish] - glassfish.glassfish-1 POST_STOP invoked

为什么要调用停止检测?

此外,the Cloudify docs说明了这一点:

  

已知限制:如果您的启动脚本返回,Cloudify会将您的服务实例视为已停止,因此会尝试再次配置它。要避免此行为,请确保您的启动脚本永远处于休眠状态。

我该怎么办?

0 个答案:

没有答案
相关问题