Wso2 Can';t构建产品-iots-3.1.0-M7

Wso2 Can';t构建产品-iots-3.1.0-M7,wso2,wso2iot,Wso2,Wso2iot,我尝试按照以下顺序构建WSO2 iot服务器3.1.0-M7 碳器件-mgt-2.0.66 carbon-device-mtg-plugins-3.0.36 产品-iots-3.1.0-M7 步骤1和步骤2已成功生成,但在生成步骤3时引发了以下异常 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test (default-test) on project org.wso2.ca

我尝试按照以下顺序构建WSO2 iot服务器3.1.0-M7

  • 碳器件-mgt-2.0.66
  • carbon-device-mtg-plugins-3.0.36
  • 产品-iots-3.1.0-M7
  • 步骤1和步骤2已成功生成,但在生成步骤3时引发了以下异常

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test (default-test) on project org.wso2.carbon.iot.test.integration: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test failed: There was an error in the forked process
    [ERROR] java.lang.RuntimeException: Error on initializing test environment
    [ERROR] at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.handleException(TestExecutionListener.java:71)
    [ERROR] at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:52)
    [ERROR] at org.testng.TestNG.runExecutionListeners(TestNG.java:1068)
    [ERROR] at org.testng.TestNG.run(TestNG.java:1015)
    [ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:295)
    [ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
    [ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:90)
    [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
    [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
    [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
    [ERROR] Caused by: java.lang.reflect.InvocationTargetException
    [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [ERROR] at java.lang.reflect.Method.invoke(Method.java:606)
    [ERROR] at org.wso2.carbon.automation.engine.extensions.TestNGExtensionExecutor.executeExtensible(TestNGExtensionExecutor.java:75)
    [ERROR] at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:47)
    [ERROR] ... 8 more
    [ERROR] Caused by: java.lang.RuntimeException: Fail to start carbon server
    [ERROR] at org.wso2.iot.integration.common.extensions.IOTServerExtension.handleException(IOTServerExtension.java:90)
    [ERROR] at org.wso2.iot.integration.common.extensions.IOTServerExtension.onExecutionStart(IOTServerExtension.java:73)
    [ERROR] ... 14 more
    [ERROR] Caused by: java.lang.RuntimeException: Port 9763 is not open
    [ERROR] at org.wso2.carbon.automation.extensions.servers.utils.ClientConnectionUtil.waitForPort(ClientConnectionUtil.java:248)
    [ERROR] at org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager.startServerUsingCarbonHome(CarbonServerManager.java:120)
    [ERROR] at org.wso2.iot.integration.common.extensions.CustomTestServerManager.startServer(CustomTestServerManager.java:134)
    [ERROR] at org.wso2.iot.integration.common.extensions.IOTServerExtension.onExecutionStart(IOTServerExtension.java:65)
    [ERROR] ... 14 more
    [ERROR] -> [Help 1]
    
    我的端口与iptables的输出相同

    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination 
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:9443
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:9763
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
    

    非常感谢您的帮助。

    这可能是由于服务关闭失败或在给定端口上运行的另一个iot实例失败所致。根据日志运行maven测试时发生故障

    请在手动终止所有不需要的进程后重试。 或者,您可以通过遵循下面的maven命令跳过测试运行来触发maven构建

    mvn clean install -Dmaven.test.skip=true
    

    谢谢Kachiex的评论。这是很大的帮助。