gustavoschewinski commented on issue #125:
URL: https://github.com/apache/plc4x-extras/issues/125#issuecomment-2323041830
Hello @chrisdutz,
Sorry for continuing this thread...
I've tracked down the problem, and it appears to be coming from the scraper
when it tries to connect:
```
Timeout error acquiring connection to:
opcua:tcp://Yoshi.lab.mtu-digilab.io:53530/OPCUA/SimulationServer?discovery=false&username=admin&password=admin&security-policy=Basic256Sha256&message-security=SIGN_ENCRYPT&server-certificate-file=/usr/certificates/SimulationServer@Yoshi_2048.der&key-store-file=/usr/certificates/client_cert.p12&key-store-password=gustavo&tcp.keep-alive=true&channel-lifetime=30000&session-timeout=10000,
error: null
java.util.concurrent.TimeoutException
```
This occurs exactly at the part where it tries to establish the connection,
and it doesn't work:
```java
public static PlcConnection getPlcConnection(PlcConnectionManager
plcConnectionManager,
String connectionString,
ExecutorService executorService,
long requestTimeoutMs,
String info) throws
InterruptedException, ExecutionException, TimeoutException {
if (!info.isEmpty() && LOGGER.isTraceEnabled()) {
LOGGER.trace("Additional Info from caller {}", info);
}
CompletableFuture<PlcConnection> future =
CompletableFuture.supplyAsync(() -> {
try {
System.out.println("Attempting to get a connection to: " +
connectionString);
PlcConnection connection =
plcConnectionManager.getConnection(connectionString);
System.out.println("Connection object created successfully: " +
connection);
return connection;
} catch (Exception e) {
LOGGER.warn("Unable to instantiate connection to " +
connectionString, e);
System.out.println("Unable to instantiate connection to: " +
connectionString + ", exception: " + e);
e.printStackTrace(); // Print the full stack trace to stdout for
debugging
throw new PlcRuntimeException(e);
}
}, executorService);
```
It gets stuck on this specific line:
```java
PlcConnection connection =
plcConnectionManager.getConnection(connectionString);
```
The strange part is that with release 0.12.0, this error does not occur, and
everything works fine. Another odd thing is that I can see in Prosys that the
connection is opened, and it also seems to renew the channel, but it does not
pull the data.
At this point, I still don't know how to fix the issue. If you have any
suggestions, I would greatly appreciate it :)
All the best,
Gustavo
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]