我试图从基本的 Milo 客户端(ReadSample)连接,但得到 UnresolvedAdressException。客户端和服务器都在远程网络中,我只能访问客户端。我很确定它不是防火墙,因为我可以与其他客户端(Prosys OPC UA 客户端)连接,并且我可以看到 ip 已解析为日志中的主机名:
服务器是 opc.tcp://192.168.115.40:49580 aka opc.tcp://Extern-Mess-Rec:49580(在 UaTcpStackClient.getEndpoints(url).get(); 中都试过)
13:24:51.530 [main] 调试 io.netty.util.internal.logging.InternalLoggerFactory - 使用 SLF4J 作为默认日志记录框架 13:24:51.546 [main] 调试 io.netty.channel.MultithreadEventLoopGroup - -Dio.netty。 eventLoopThreads:8 13:24:51.561 [main] 调试 io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address:可用 13:24:51.561 [main] 调试 io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe:可用 13:24:51.561 [main] 调试 io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory:可用 13:24:51.561 [main] 调试 io.netty。 util.internal.PlatformDependent0 - java.nio.Bits.unaligned: true 13:24:51.561 [main] 调试 io.netty.util.internal.PlatformDependent - 平台:Windows 13:24:51.561 [main] 调试 io.netty。 util.internal.PlatformDependent - Java 版本:8 13:24:51。561 [main] 调试 io.netty.util.internal.PlatformDependent - -Dio.netty.noUnsafe:假 13:24:51.561 [main] 调试 io.netty.util.internal.PlatformDependent - sun.misc.Unsafe:可用 13 :24:51.561 [主]调试io.netty.util.internal.PlatformDependent--Dio.netty.noJavassist:假13:24:51.686 [主]调试io.netty.util.internal.PlatformDependent-Javassist:可用13: 24:51.686 [main] 调试 io.netty.util.internal.PlatformDependent --Dio.netty.tmpdir:C:\Users\SOFTWA~1\AppData\Local\Temp\3 (java.io.tmpdir) 13:24 :51.686 [main] 调试 io.netty.util.internal.PlatformDependent --Dio.netty.bitMode: 64 (sun.arch.data.model) 13:24:51.686 [main] 调试 io.netty.util.internal。 PlatformDependent - -Dio.netty.noPreferDirect: false 13:24:51.718 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization:false 13:24:51.718 [main] 调试 io.netty.channel.nio.NioEventLoop --Dio.netty.selectorAutoRebuildThreshold:512 13:24:51.858 [main] 调试 io.netty.util.ResourceLeakDetector --Dio.netty。 leakDetection.level: simple 13:24:51.858 [main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.maxRecords: 4 13:24:52.264 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - - Dio.netty.allocator.numHeapArenas:8 13:24:52.264 [main] 调试 io.netty.buffer.PooledByteBufAllocator --Dio.netty.allocator.numDirectArenas:8 13:24:52.264 [main] 调试 io.netty.buffer .PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192 13:24:52.264 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11 13:24:52.264 [main] DEBUG io .netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize:16777216 13:24:52.264 [main] 调试 io.netty.buffer.PooledByteBufAllocator --Dio.netty.allocator.tinyCacheSize:512 13:24:52.264 [main] 调试 io.netty.buffer.PooledByteBufAllocator --Dio.netty。 allocator.smallCacheSize: 256 13:24:52.264 [main] 调试 io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64 13:24:52.264 [main] 调试 io.netty.buffer.PooledByteBufAllocator - - Dio.netty.allocator.maxCachedBufferCapacity: 32768 13:24:52.264 [main] 调试 io.netty.buffer.PooledByteBufAllocator --Dio.netty.allocator.cacheTrimInterval: 8192 13:24:52.296 [main] 调试 io.netty.util .internal.ThreadLocalRandom - -Dio.netty.initialSeedUniquifier:0x35f32988e43eab85(耗时 10 毫秒)13:24:52.327 [main] DEBUG io.netty.buffer.ByteBufUtil --Dio.netty.allocator.type: unpooled 13:24:52.327 [主要] 调试 io.netty.buffer。ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 65536 13:24:52.327 [main] 调试 io.netty.buffer.ByteBufUtil - -Dio.netty.maxThreadLocalCharBufferSize: 16384 13:24:52.358 [ua-netty-event-loop-0 ] 调试 io.netty.util.internal.JavassistTypeParameterMatcherGenerator - 生成:io.netty.util.internal。匹配器.org.eclipse.milo.opcua.stack.client.handlers.UaRequestFutureMatcher 13:24:52.389 [ua-netty-event-loop-0] 调试 io.netty.buffer.AbstractByteBuf - -Dio.netty.buffer.bytebuf。 checkAccessible: true 13:24:52.858 [ua-netty-event-loop-0] 调试 io.netty.util.Recycler--Dio.netty.recycler.maxCapacity.default: 262144 13:24:52.890 [ua-netty- event-loop-0] 调试 org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientAcknowledgeHandler - 在通道 = [id: 0xa0ec7fec, L:/130.83.225.169:58872 - R:/192.168.115.40 上发送 Hello 消息: 49580]。13:24:52.905 [ua-netty-event-loop-0] 调试 org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientAcknowledgeHandler - 在通道 = [id: 0xa0ec7fec, L:/130.83.225.169 上收到确认消息:58872 - R:/192.168.115.40:49580]。13:24:52.921 [ua-netty-event-loop-0] 调试 org.eclipse.milo.opcua.stack.client。handlers.UaTcpClientMessageHandler - OpenSecureChannel 超时计划为 +5 秒 13:24:52.967 [ua-netty-event-loop-0] 调试 org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientMessageHandler - OpenSecureChannel 超时取消 13:24: 52.967 [ua-shared-pool-0] 调试 org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientMessageHandler - 发送 OpenSecureChannelRequest(问题,id=0,currentToken=-1,previousToken=-1)。13:24:52.999 [ua-shared-pool-1] 调试 org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientMessageHandler - 收到 OpenSecureChannelResponse。13:24:52.999 [ua-shared-pool-1] 调试 org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientMessageHandler - SecureChannel id=1140,currentTokenId=1,previousTokenId=-1,lifetime=3600000ms,createdAt =DateTime{utcTime=131384570808248472, javaDate=Fri May 05 13:24: 40 CEST 2017} 13:24:52.999 [ua-netty-event-loop-0] 调试 org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientMessageHandler - 0 条消息在握手完成之前排队;现在发送。13:24:52.999 [ForkJoinPool.commonPool-worker-1] 调试 org.eclipse.milo.opcua.stack.client.ClientChannelManager - 通道引导成功:localAddress=/130.83.225.169:58872,remoteAddress=/192.168.115.40:49580 13:24:53.061 [ForkJoinPool.commonPool-worker-1] 调试 org.eclipse.milo.opcua.stack.client.ClientChannelManager - 发送 CloseSecureChannelRequest... 13:24:53.061 [main] INFO org.eclipse.milo.examples .client.ClientExampleRunner - 使用端点:opc.tcp://Extern-Mess-Rec:49580 [None] 13:24:53.077 [ua-netty-event-loop-0] DEBUG org.eclipse.milo.opcua.stack .client.ClientChannelManager - channelInactive(),