[英]Error running mvn package for jeromq: “Bind Cannot assign requested address: connect”
I want to send and receive data from Matlab and MetaTrader 5 on Windows 10. According to this post , JeroMQ is the easiest route to go: 我想在Windows 10上从Matlab和MetaTrader 5发送和接收数据。根据这篇文章 ,JeroMQ是最简单的方法:
[ERROR] Failures:
[ERROR] TestEvents.testEventConnectRetried:85 No event was received
[ERROR] Errors:
[ERROR] PollTest.testPollUdp:100 » Bind Cannot assign requested address:
connect
[INFO]
[ERROR] Tests run: 588, Failures: 1, Errors: 1, Skipped: 17
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:48 min
[INFO] Finished at: 2019-09-12T18:51:01+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project jeromq: There are test failures.
I tried to fix this by setting the IP configuration for the localhost to 127.0.0.1 according to these posts: 我试图根据这些帖子通过将localhost的IP配置设置为127.0.0.1来解决此问题:
which did not fix the problem (same error message). 不能解决问题(相同的错误消息)。
I think it is related to some IP settings, but I am new to socket communication. 我认为它与某些IP设置有关,但是我是套接字通信的新手。 I have no experience in Java programming/debugging. 我没有Java编程/调试经验。 Please help me to fix this, so the .jar
file is built successfully and I can add it to my javaclasspath
in Matlab. 请帮助我解决此问题,因此.jar
文件已成功构建,可以将其添加到Matlab中的javaclasspath
中。
Otherwise: Is there an (easy) alternative way to establish Matlab socket communication with other programs (eg via ZeroMQ)? 否则:是否有(简便)替代方法与其他程序建立Matlab套接字通信(例如,通过ZeroMQ)?
I had the same problem, to bypass the tests, you need to add some code to the pom.xml file which is at the main folder jeromq-masters. 我有同样的问题,要绕过测试,您需要在主文件夹jeromq-masters的pom.xml文件中添加一些代码。
So the part that I changed is below. 因此,我更改的部分如下。 You can compare with your own pom and change it according to it. 您可以将其与自己的pom进行比较,并根据它进行更改。 Since a couple of days passed, I dont exactly remember the part that I added,but starting with "includes" must be the part that I added. 由于已经过去了几天,所以我不记得添加的部分,但是以“ includes”开头的部分必须是添加的部分。
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
<includes>
<include>TestFail.java</include>
</includes>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
Then you need to recompile it with mvn package command. 然后,您需要使用mvn package命令重新编译它。
This allowed me to compile the JAR file. 这使我可以编译JAR文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.