Reputation: 605
I'm trying to connect to a OPC UA server with camel. I downloaded the camel java template via mvn:archetype. This is what my route looks like:
public class MyRouteBuilder extends RouteBuilder {
public void configure() {
from("milo-client:tcp://10.0.75.1:4840")
.log("From OPC UA: ${body}");
}
}
No matter what server I try to connect to, I always get:
java.util.concurrent.ExecutionException: UaException: status=Bad_Timeout, message=io.netty.channel.ConnectTimeoutException: connection timed out: /172.17.0.2:4840
The OPC servers aren't the problem, I can reach all of them with any other client.
Am I missing something here? Thank you for your help.
Upvotes: 3
Views: 384
Reputation: 605
The solution for this for my case is appending "&overrideHost=true" to the uri of the opc-ua server. It should look like this:
public class MyRouteBuilder extends RouteBuilder {
public void configure() {
from("milo-client:tcp://10.0.75.1:4840&overrideHost=true")
.log("From OPC UA: ${body}");
}
}
It really does look like the server endpoints aren't properly configured on any server that I've tried lol
Upvotes: 1
Reputation: 7005
I'd have to guess that your OPC UA server is misconfigured and returning 172.17.0.2 in its EndpointDescriptions instead of 10.0.75.1.
This either needs to be fixed in the Camel/Milo integration, if there's not already an option to override the hostname, or you would need to correctly configure the server to include 10.0.75.1 in its endpoints.
Upvotes: 2