Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[milo-dev] Error when connecting to OPC server

I came up with a client version and was attempting to connect to a free OPC server here: opc.tcp://opcuaserver:4840

Here is the link to my project, where I run my unit test to get the server timestamp and state

Here is the unit test: https://github.com/joesan/opc-client-stream/blob/master/src/test/scala/com/example/services/opc/OpcClientSpec.scala

When I run my unit test, I get this error:

May 23, 2019 1:51:40 PM wvlet.log.Logger log
INFO: Using endpoint: opc.tcp://opcuaserver:4840, None

java.net.UnknownHostException: opcuaserver: nodename nor servname provided, or not known
java.util.concurrent.CompletionException: java.net.UnknownHostException: opcuaserver: nodename nor servname provided, or not known
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:593)
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
.....

Any idea why is this?


Back to the top