我正在尝试从eclipse milo 项目运行用户数据库独立示例,但是当我运行 Client.jar 时出现 UaException。我该如何解决这个问题?
我按照指南并按照描述使用 Maven 构建客户端和服务器 jar。服务器运行得很好,但是一旦我运行客户端,我就会收到 UaException。受信任的文件夹中没有 Users.db,被拒绝的文件夹中的 Users.db 没有条目,所以我无法在那里更改任何内容。
我在 Fedora 28 上运行它,Java 版本 1.8 和 Maven 版本 3.5.2。
编辑:我试图包括所有日志,但似乎太多了。如果需要更多,我可以将所有内容都包含在 pastebin 中。
Maven 构建(不确定此处的警告是否可能是原因):
[[1;34mINFO[m] Scanning for projects...
[[1;33mWARNING[m]
[[1;33mWARNING[m] Some problems were encountered while building the effective model for org.eclipse.milo:standalone-examples:jar:0.2.5-SNAPSHOT
[[1;33mWARNING[m] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing. @ org.eclipse.milo:standalone-examples:[unknown-version], /home/angelo/builds/milo/milo-examples/standalone-examples/pom.xml, line 167, column 21
[[1;33mWARNING[m]
[[1;33mWARNING[m] It is highly recommended to fix these problems because they threaten the stability of your build.
[[1;33mWARNING[m]
[[1;33mWARNING[m] For this reason, future Maven versions might no longer support building such malformed projects.
[[1;33mWARNING[m]
Client.jar 的日志(服务器抛出相同的异常,只有在我运行客户端后才会抛出,但如果需要,我也可以包含服务器输出):
11:52:00.979 [main] ERROR o.e.m.e.c.SecureClientStandaloneRunner - Error running client example: UaException: status=Bad_SecurityChecksFailed, message=status=Bad_SecurityChecksFailed, description=An error occurred verifying security.
java.util.concurrent.ExecutionException: UaException: status=Bad_SecurityChecksFailed, message=status=Bad_SecurityChecksFailed, description=An error occurred verifying security.
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at org.eclipse.milo.examples.client.ClientWithUserNameAndPasswordExample.run(ClientWithUserNameAndPasswordExample.java:46)
at org.eclipse.milo.examples.client.SecureClientStandaloneRunner.run(SecureClientStandaloneRunner.java:150)
at org.eclipse.milo.examples.client.ClientWithUserNameAndPasswordExample.main(ClientWithUserNameAndPasswordExample.java:40)
Caused by: org.eclipse.milo.opcua.stack.core.UaException: status=Bad_SecurityChecksFailed, description=An error occurred verifying security.
at org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientMessageHandler.onError(UaTcpClientMessageHandler.java:716)
at org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientMessageHandler.decodeMessage(UaTcpClientMessageHandler.java:411)
at org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientMessageHandler.decode(UaTcpClientMessageHandler.java:392)
at io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:491)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:430)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1304)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:921)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:135)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:131)
at java.lang.Thread.run(Thread.java:748)