Mulesoft构建仅在我们的CI / CD服务器上提供'LifecycleException: failed to invoke lifecycle phase "start"' on DefaultHttpListenerConfig with a 'BindException address already in use'
。
相应的构建和munits在本地成功,但是一旦svn在构建服务器上触发竹子/工件构建,即使在运行munits('Tests: 0'
)之前也会发生错误(下面),所以它似乎是关于预先调用测试。
我没有定义名为DefaultHttpListenerConfig
的HTTP侦听器,我将mule-app.properties中的所有端口都更改为localhost(即使munits正在模拟所有HTTP端点)。
构建失败消息:
java.lang.RuntimeException: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.module.http.internal.listener.DefaultHttpListenerConfig@2f07930a
build 28-Mar-2017 12:11:06 at org.mule.munit.runner.simple.MunitSimpleRunner.run(MunitSimpleRunner.java:54)
build 28-Mar-2017 12:11:06 at org.mule.munit.remote.path.ApplicationPathBuilder.buildApplicationPaths(ApplicationPathBuilder.java:80)
build 28-Mar-2017 12:11:06 at org.mule.munit.remote.path.ApplicationPathBuilder.getFlowPaths(ApplicationPathBuilder.java:41)
build 28-Mar-2017 12:11:06 at org.mule.munit.remote.CoverageManager.generateCoverageReport(CoverageManager.java:82)
build 28-Mar-2017 12:11:06 at org.mule.munit.remote.RemoteRunner.calculateCoverageIfApplicable(RemoteRunner.java:119)
build 28-Mar-2017 12:11:06 at org.mule.munit.remote.RemoteRunner.run(RemoteRunner.java:65)
build 28-Mar-2017 12:11:06 at org.mule.munit.remote.RemoteRunner.main(RemoteRunner.java:39)
build 28-Mar-2017 12:11:06 Caused by: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.module.http.internal.listener.DefaultHttpListenerConfig@2f07930a
build 28-Mar-2017 12:11:06 at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:249)
build 28-Mar-2017 12:11:06 at org.mule.lifecycle.RegistryLifecycleCallback.doApplyLifecycle(RegistryLifecycleCallback.java:99)
build 28-Mar-2017 12:11:06 at org.mule.lifecycle.RegistryLifecycleCallback.onTransition(RegistryLifecycleCallback.java:71)
build 28-Mar-2017 12:11:06 at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155)
build 28-Mar-2017 12:11:06 at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126)
build 28-Mar-2017 12:11:06 at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:88)
build 28-Mar-2017 12:11:06 at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:141)
build 28-Mar-2017 12:11:06 at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:91)
build 28-Mar-2017 12:11:06 at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:87)
build 28-Mar-2017 12:11:06 at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:69)
build 28-Mar-2017 12:11:06 at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:61)
build 28-Mar-2017 12:11:06 at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:311)
build 28-Mar-2017 12:11:06 at org.mule.munit.runner.MuleContextManager.startMule(MuleContextManager.java:77)
build 28-Mar-2017 12:11:06 at org.mule.munit.runner.MuleContextManager.startMule(MuleContextManager.java:71)
build 28-Mar-2017 12:11:06 at org.mule.munit.runner.simple.MunitSimpleRunner.run(MunitSimpleRunner.java:47)
build 28-Mar-2017 12:11:06 ... 6 more
build 28-Mar-2017 12:11:06 Caused by: java.net.BindException: Address already in use: bind
build 28-Mar-2017 12:11:06 at sun.nio.ch.Net.bind0(Native Method)
build 28-Mar-2017 12:11:06 at sun.nio.ch.Net.bind(Net.java:433)a
答案 0 :(得分:0)
抛出此异常是因为您的mule测试配置正在使用已在Bamboo服务器上使用的端口。 你可以在竹子服务器上运行这个命令吗?用您的测试正在使用的端口替换课程80
sudo netstat -plnt | grep ':80'
如果你得到命令提示响应是这样的:
tcp 0 0 :::80 :::* LISTEN 8448/httpd
这意味着已经使用了端口,在这种情况下,您应该使用另一个端口进行测试配置。