用户数据库示例中的 UaException

UaException in userdatabase-example

我正在尝试 运行 来自 eclipse milo project 的用户数据库独立示例,但是当我 运行 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.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.run(SingleThreadEventExecutor.java:131)
    at java.lang.Thread.run(Thread.java:748)

这些错误意味着您可能没有按照说明生成接受证书的密钥库and/or。

milo-examples 模块中的其他示例开始可能更容易。这个有点无人维护,已从下一个版本中删除。