java.net.SocketException:IP_MULTICAST_IF的参数错误:地址未绑定到任何接口

wnrlj8wa  于 2022-11-08  发布在  Java
关注(0)|答案(1)|浏览(103)

I am deploying Keycloak with the help of Helm Chart But Wildfly Stop with the following errors
[0m[0m03:34:19,891 INFO [org.jboss.as.patching] (MSC service thread 1-2) WFLYPAT0050: Keycloak cumulative patch ID is: base, one-off patches include: none [0m[0m03:34:20,086 INFO [org.jboss.modcluster] (ServerService Thread Pool -- 56) MODCLUSTER000001: Initializing mod_cluster version 1.4.4.Final [0m[31m03:34:20,089 ERROR [org.jboss.modcluster] (ServerService Thread Pool -- 56) MODCLUSTER000034: Failed to start advertise listener: java.net.SocketException: bad argument for IP_MULTICAST_IF: address not bound to any interface at java.base/java.net.PlainDatagramSocketImpl.socketSetOption0(Native Method) at java.base/java.net.PlainDatagramSocketImpl.socketSetOption(PlainDatagramSocketImpl.java:91) at java.base/java.net.AbstractPlainDatagramSocketImpl.setOption(AbstractPlainDatagramSocketImpl.java:371) at java.base/java.net.MulticastSocket.setInterface(MulticastSocket.java:477) at org.jboss.mod_cluster.core@1.4.4.Final//org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl.init(AdvertiseListenerImpl.java:151) at org.jboss.mod_cluster.core@1.4.4.Final//org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl.start(AdvertiseListenerImpl.java:161) at org.jboss.mod_cluster.core@1.4.4.Final//org.jboss.modcluster.ModClusterService.init(ModClusterService.java:166) at org.wildfly.mod_cluster.undertow@26.0.1.Final//org.wildfly.mod_cluster.undertow.UndertowEventHandlerAdapterService.start(UndertowEventHandlerAdapterService.java:83) at org.wildfly.clustering.service@26.0.1.Final//org.wildfly.clustering.service.AsyncServiceConfigurator$AsyncService.lambda$start$0(AsyncServiceConfigurator.java:117) at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) at java.base/java.lang.Thread.run(Thread.java:829) at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
[0m[0m03:34:20,095 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0006: Undertow HTTPS listener https listening on [0:0:0:0:0:0:0:0]:8443 [0m[0m03:34:20,095 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0493: Jakarta Enterprise Beans subsystem suspension complete [0m[0m03:34:20,194 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "keycloak-server.war" (runtime-name: "keycloak-server.war") [0m[0m03:34:20,197 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) WFLYDS0013: Started FileSystemDeploymentService for directory /opt/jboss/keycloak/standalone/deployments [0m[0m03:34:20,599 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS] [0m[0m03:34:20,599 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0001: Bound data source [java:jboss/datasources/KeycloakDS] [0m[33m03:34:22,285 WARN [org.jgroups.protocols.UDP] (ServerService Thread Pool -- 56) JGRP000015: the receive buffer of socket ManagedMulticastSocketBinding was set to 20.00MB, but the OS only allocated 16.78MB [0m[33m03:34:22,286 WARN [org.jgroups.protocols.UDP] (ServerService Thread Pool -- 56) JGRP000015: the receive buffer of socket ManagedMulticastSocketBinding was set to 25.00MB, but the OS only allocated 16.78MB [0m[0m03:34:25,293 INFO [org.jgroups.protocols.pbcast.GMS] (ServerService Thread Pool -- 56) keycloak-v6-0: no members discovered after 3003 ms: creating cluster as coordinator
In my Value.yaml i added

- name: JAVA_OPTS
              value: '-Djboss.bind.address=0.0.0.0'

If i remove JAVA_OPTS it will fail to connect with DB as well and fail with following error

03:42:21,999 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service org.wildfly.network.interface.private: org.jboss.msc.service.StartException in service org.wildfly.network.interface.private: WFLYSRV0082: failed to resolve interface private at org.jboss.as.server@18.0.4.Final//org.jboss.as.server.services.net.NetworkInterfaceService.start(NetworkInterfaceService.java:98) at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739) at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701) at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559) at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363) at java.base/java.lang.Thread.run(Thread.java:829) 03:42:22,092 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("interface" => "private")]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.network.interface.private" => "WFLYSRV0082: failed to resolve interface private"}} 03:42:22,391 INFO [org.jboss.as.server] (ServerService Thread Pool -- 45) WFLYSRV0010: Deployed "keycloak-server.war" (runtime-name : "keycloak-server.war") 03:42:22,392 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report WFLYCTL0186: Services which failed to start: service org.wildfly.network.interface.private: WFLYSRV0082: failed to resolve interface private WFLYCTL0448: 47 additional services are down due to their dependencies being missing or failed 03:42:22,702 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server 03:42:22,785 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: Keycloak 16.1.1 (WildFly Core 18.0.4.Final) started (with errors) in 18700ms - Started 471 of 930 services (54 services failed or missing dependencies, 694 services are lazy, passive or on-demand)

  • Keycloak 16.1.1
  • WildFly Core 18.0.4.Final
  • Kubernets
8yoxcaq7

8yoxcaq71#

尝试在接口部分添加新的专用接口。

<interface name="private">
        <inet-address value="<your private address>"/>
    </interface>

相关问题