- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 MacOS 11.3 上运行 Julien Ponge 的书“Vert.x In Action”中的第 3 章 Infinispan 示例。 https://github.com/jponge/vertx-in-action/tree/master/chapter3
public class FirstInstance {
private static final Logger logger = LoggerFactory.getLogger(FirstInstance.class);
public static void main(String[] args) {
Vertx.clusteredVertx(new VertxOptions(), ar -> {
if (ar.succeeded()) {
logger.info("First instance has been started");
Vertx vertx = ar.result();
vertx.deployVerticle("chapter3.HeatSensor", new DeploymentOptions().setInstances(4));
vertx.deployVerticle("chapter3.HttpServer");
} else {
logger.error("Could not start", ar.cause());
}
});
}
}
下载示例代码后,在我做的chapter3文件夹中
./gradlew run -PmainClass=chapter3.cluster.FirstInstance -Pjvmargs="-Djava.net.preferIPv4Stack=true"
这导致
failed sending discovery request to /228.6.7.8:46655
这适用于 Windows。我想知道 MacOS 多播是否存在问题?我尝试按照以下步骤启用多播,但仍然遇到相同的错误:https://blogs.agilefaqs.com/2009/11/08/enabling-multicast-on-your-macos-unix/
完整输出:
News-MacBook-Pro:chapter3f newuser$ ./gradlew run -PmainClass=chapter3.cluster.FirstInstance
> Task :run
DEBUG [main] LoggerFactory - Using io.vertx.core.logging.SLF4JLogDelegateFactory
WARN [vert.x-worker-thread-0] InfinispanClusterManager - Cannot find Infinispan config 'infinispan.xml', using default
WARN [vert.x-worker-thread-0] CONFIG - ISPN000569: Unable to persist Infinispan internal caches as no global state enabled
INFO [vert.x-worker-thread-0] CONTAINER - ISPN000128: Infinispan version: Infinispan 'Corona Extra' 11.0.5.Final
INFO [vert.x-worker-thread-0] CLUSTER - ISPN000078: Starting JGroups channel ISPN with stack jgroups
ERROR [jgroups-6,News-MacBook-Pro-2273] MPING - News-MacBook-Pro-2273: failed sending discovery request to /228.6.7.8:46655
java.io.IOException: Can't assign requested address
at java.base/java.net.PlainDatagramSocketImpl.send(Native Method)
at java.base/java.net.DatagramSocket.send(DatagramSocket.java:695)
at org.jgroups.protocols.MPING.sendMcastDiscoveryRequest(MPING.java:286)
at org.jgroups.protocols.PING.sendDiscoveryRequest(PING.java:63)
at org.jgroups.protocols.PING.findMembers(PING.java:31)
at org.jgroups.protocols.Discovery.invokeFindMembers(Discovery.java:217)
at org.jgroups.protocols.Discovery.lambda$findMembers$0(Discovery.java:228)
at org.jgroups.protocols.Discovery$$Lambda$380.000000009D98CA20.run(Unknown Source)
at org.jgroups.util.TimeScheduler3$Task.run(TimeScheduler3.java:328)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:831)
ERROR [jgroups-6,News-MacBook-Pro-2273] MPING - News-MacBook-Pro-2273: failed sending discovery request to /228.6.7.8:46655
java.io.IOException: Can't assign requested address
at java.base/java.net.PlainDatagramSocketImpl.send(Native Method)
at java.base/java.net.DatagramSocket.send(DatagramSocket.java:695)
at org.jgroups.protocols.MPING.sendMcastDiscoveryRequest(MPING.java:286)
at org.jgroups.protocols.PING.sendDiscoveryRequest(PING.java:63)
at org.jgroups.protocols.PING.findMembers(PING.java:31)
at org.jgroups.protocols.Discovery.invokeFindMembers(Discovery.java:217)
at org.jgroups.protocols.Discovery.lambda$findMembers$0(Discovery.java:228)
at org.jgroups.protocols.Discovery$$Lambda$380.000000009D98CA20.run(Unknown Source)
at org.jgroups.util.TimeScheduler3$Task.run(TimeScheduler3.java:328)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:831)
ERROR [jgroups-6,News-MacBook-Pro-2273] MPING - News-MacBook-Pro-2273: failed sending discovery request to /228.6.7.8:46655
java.io.IOException: Can't assign requested address
at java.base/java.net.DatagramSocket.send(DatagramSocket.java:695)
at org.jgroups.protocols.MPING.sendMcastDiscoveryRequest(MPING.java:286)
at org.jgroups.protocols.PING.sendDiscoveryRequest(PING.java:63)
at org.jgroups.protocols.PING.findMembers(PING.java:31)
at org.jgroups.protocols.Discovery.invokeFindMembers(Discovery.java:217)
at org.jgroups.protocols.Discovery.lambda$findMembers$0(Discovery.java:228)
at org.jgroups.protocols.Discovery$$Lambda$380.000000009D98CA20.run(Unknown Source)
at org.jgroups.util.TimeScheduler3$Task.run(TimeScheduler3.java:328)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:831)
INFO [vert.x-worker-thread-0] GMS - News-MacBook-Pro-2273: no members discovered after 2003 ms: creating cluster as coordinator
INFO [vert.x-worker-thread-0] CLUSTER - ISPN000094: Received new cluster view for channel ISPN: [News-MacBook-Pro-2273|0] (1) [News-MacBook-Pro-2273]
INFO [vert.x-worker-thread-0] CLUSTER - ISPN000079: Channel ISPN local address is News-MacBook-Pro-2273, physical addresses are [192.168.0.101:7800]
INFO [vert.x-eventloop-thread-0] FirstInstance - First instance has been starte
INFO [vert.x-eventloop-thread-5] threads - JBoss Threads version 2.3.3.Final
ERROR [jgroups-5,News-MacBook-Pro-2273] MPING - News-MacBook-Pro-2273: failed sending discovery request to /228.6.7.8:46655
java.io.IOException: Can't assign requested address
at java.base/java.net.DatagramSocket.send(DatagramSocket.java:695)
at org.jgroups.protocols.MPING.sendMcastDiscoveryRequest(MPING.java:286)
at org.jgroups.protocols.PING.sendDiscoveryRequest(PING.java:63)
at org.jgroups.protocols.PING.findMembers(PING.java:31)
at org.jgroups.protocols.Discovery.invokeFindMembers(Discovery.java:217)
at org.jgroups.protocols.Discovery.findMembers(Discovery.java:244)
at org.jgroups.protocols.Discovery.down(Discovery.java:387)
at org.jgroups.protocols.MERGE3$InfoSender.run(MERGE3.java:412)
at org.jgroups.util.TimeScheduler3$Task.run(TimeScheduler3.java:328)
at org.jgroups.util.TimeScheduler3$RecurringTask.run(TimeScheduler3.java:362)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:831)
ERROR [jgroups-6,News-MacBook-Pro-2273] MPING - News-MacBook-Pro-2273: failed sending discovery request to /228.6.7.8:46655
java.io.IOException: Can't assign requested address
at java.base/java.net.DatagramSocket.send(DatagramSocket.java:695)
at org.jgroups.protocols.MPING.sendMcastDiscoveryRequest(MPING.java:286)
at org.jgroups.protocols.PING.sendDiscoveryRequest(PING.java:63)
at org.jgroups.protocols.PING.findMembers(PING.java:31)
at org.jgroups.protocols.Discovery.invokeFindMembers(Discovery.java:217)
at org.jgroups.protocols.Discovery.findMembers(Discovery.java:244)
at org.jgroups.protocols.Discovery.down(Discovery.java:387)
at org.jgroups.protocols.MERGE3$InfoSender.run(MERGE3.java:412)
at org.jgroups.util.TimeScheduler3$Task.run(TimeScheduler3.java:328)
at org.jgroups.util.TimeScheduler3$RecurringTask.run(TimeScheduler3.java:362)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:831)
最佳答案
@tsegismont 提供了有效的答案。 https://gist.github.com/rafaeltuelho/208568668e4205bd9b93
为 224.0.0.1-231.255.255.254 添加多播路由:
sudo route add -net 224.0.0.0/5 127.0.0.1
为 232.0.0.1-239.255.255.254 添加多播路由
sudo route add -net 232.0.0.0/5 192.168.1.3
所以对于 230.0.0.0,我绑定(bind)到 192.168.1.3
关于Vert.x Infinispan 获取 "failed sending discovery request to/228.6.7.8:46655",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68874473/
我是 Vert.X 新手。 Vert.x 是否有内置的集中式过滤器?我的意思是您将在 J2EE 应用程序上使用的过滤器类型。 例如,所有页面都必须经过身份验证过滤器或类似的操作。 在 Vert.x 中
正在关注 similar question在 Spring 。我希望能够在路由器中获得响应。并进行响应刷新,这样我就可以在不延长 RTT 的情况下继续在服务器上工作 意思是,做一些类似 Spring
我正在我的一个工作线程中进行阻塞服务调用,并记录了警告。这是通过增加时间限制来“解决”的,但是,我更好奇如何读取日志行中线程的命名 - vert.x-worker-thread-3,5,main。完整
我是 vert.x 的新手。我不寻找代码片段/示例,因为 vert.x github 页面充满了它们。 我正在寻找一些事实和最佳实践。 我正在编写一个应用程序,其主要verticle是一个处理Rest
顶点中的 TCP 服务器/网络服务器和 HTTP 服务器有什么区别? 每个的用例是什么? 我尝试谷歌搜索并浏览了官方网站,他们都没有明确的解释。 最佳答案 首先,在通用网络中,有两种常见的处理连接类型
如上所示,我需要构建一个 Vert.x Java 应用程序,该应用程序将作为 HTTP 服务器/虚拟主机(TLS Http 流量、Web 套接字流量),它将重定向/ channel 特定域流量到其他
我正在尝试为 Vert.x 开发一个概念验证——一个简单的实时浏览器游戏。 让我们想象一个类似于在线扑克的游戏 - 您有一个大厅,里面有许多您可以加入的现有游戏。您还可以创建一个新游戏(因此该大厅中的
我的问题是在内联列表之后有一个垂直列表 li {display:inline;} li.vert (color:red;} 如何让 li.vert 垂直显示它显示红色 OK 但内联 最佳答案
其实网上有大量讨论HTTP长连接的文章,而且Idle Timeout和KeepAlive Timeout都是HTTP协议上的事情,跟Vert.x本身没有太大关系,只不过最近在项目上遇到了一些问题,用到
是否可以为路径添加 2 个处理程序? 我需要加载 html文件夹中的内容并检查 session我访问时的值 /小路。 如果我放置 router.route().handler(StaticHandle
在 vertx docs他们提到有可能限制每个 vertx 实例的事件循环线程数: Instead of a single event loop, each Vertx instance mainta
考虑其中一个顶点抛出未捕获异常的情况。 接下来发生什么? 如果从系统中删除了 Verticle 状态,是否有一些类似于 erlang supervisor 的机制来重新启动 Verticle? 关于这
我正在使用vert.x 2.1.5版本。我试图在项目中使用事件循环。下面给出的示例代码 JsonObject result = null; //loop starting for (int i=0;i
我确实有同时使用协程和Vert.x的项目。 我正在尝试编写包装器函数以在vertx工作线程池上运行阻塞代码 就像是: suspend inline fun executeOnWorkerThread
Closed. This question is not reproducible or was caused by typos。它当前不接受答案。 想改善这个问题吗?更新问题,以便将其作为on-to
我最近在java中使用vert.x框架,但我对vert.x还是新手。 通常当我们按照以下方式启动 future 时 SMObj自动分配给promise1 promise 。 Future future
查看 Vert.x 应用程序的日志,我注意到在取消部署 verticle 时出现以下异常(所有 3 个异常都是相同的): Failed to undeploy netsci.graphservice.
我正在将超时上下文传递给 Server.Shutdown(http 包)。我看不出我需要调用返回的取消函数,所以我忽略了它。但是当我运行 go vet 时,它说 context.WithTimeout
在这篇文章中,我们将会看到怎样在vert.x应用中使用HSQL,当然也可以使用任意JDBC,以及使用vertx-jdbc-client提供的异步的API,这篇文章的代码在github。 异步?
在我正在实现的 Vert.x verticle 中,我有一个之前加载到内存中的缓冲区,现在我想将它转储到磁盘中。 据我所知,我们应该使用 Pump 来确保不会使 WriteStream 过载。 但我没
我是一名优秀的程序员,十分优秀!