fdupont-noovelia commented on issue #1626:
URL: https://github.com/apache/plc4x/issues/1626#issuecomment-2379944765

   I when through the same though process as mrwhy-orig. Maybe symbolic too 
big, trying « load-symbol-and-data-type-tables » to « false », which end up « 
INVALID_ADDRESS ».
   
   In my case, 10 out of 10 the connection doesn't work.
   
   In the connection, I set the usual : target-ams-net-id, arget-ams-port, 
source-ams-net-id and source-ams-port
   Had to increase the timeout. Made it bigger than necessary : 
timeout-request=20000
   
   Program hang on the connection.
   Wireshark attached.
   
[1626-fdupont.pcapng.gz](https://github.com/user-attachments/files/17168875/1626-fdupont.pcapng.gz)
   
   Last packet is smaller than the others.
   
   Test program :
   
   ```java
   PlcDriverManager plcDriver = new DefaultPlcDriverManager();
     try (PlcConnection plcConnection = plcDriver.getConnectionManager()
       .getConnection(/*ads...  */) {
       //...
     } catch (Exception ex) {
       //...        
     }
   ```
   
   Two logs of « maybe » interest :
   
   ```json
   {
       "level": "TRACE",
       "threadName": "nioEventLoopGroup-2-1",
       "loggerName": "org.apache.plc4x.java.spi.Plc4xNettyWrapper",
       "message": "Failure while processing payload {} with handler {}",
       "throwable": {
           "className": "java.lang.NullPointerException",
           "message": "Cannot invoke 
\"org.apache.plc4x.java.ads.readwrite.AdsDataTypeTableEntry.getDataType()\" 
because \"adsDataTypeTableEntry\" is null",
           "stepArray": [{
                   "className": 
"org.apache.plc4x.java.ads.protocol.AdsProtocolLogic",
                   "methodName": 
"resolveDirectAdsTagForSymbolicNameFromDataType",
                   "fileName": "AdsProtocolLogic.java",
                   "lineNumber": 1779
               }
           ]
       }
   }, {
       "level": "WARN",
       "threadName": "nioEventLoopGroup-2-1",
       "loggerName": "io.netty.channel.DefaultChannelPipeline",
       "message": "An exceptionCaught() event was fired, and it reached at the 
tail of the pipeline. It usually means the last handler in the pipeline did not 
handle the exception.",
       "throwable": {
           "className": "io.netty.handler.codec.DecoderException",
           "message": "java.lang.ClassCastException: class 
org.apache.plc4x.java.ads.readwrite.AdsReadResponse cannot be cast to class 
org.apache.plc4x.java.ads.readwrite.AmsTCPPacket 
(org.apache.plc4x.java.ads.readwrite.AdsReadResponse and 
org.apache.plc4x.java.ads.readwrite.AmsTCPPacket are in unnamed module of 
loader 'app')",
           "stepArray": [{
                   "className": 
"io.netty.handler.codec.MessageToMessageDecoder",
                   "methodName": "channelRead",
                   "fileName": "MessageToMessageDecoder.java",
                   "lineNumber": 98
               }
           ],
           "cause": {
               "className": "java.lang.ClassCastException",
               "message": "class 
org.apache.plc4x.java.ads.readwrite.AdsReadResponse cannot be cast to class 
org.apache.plc4x.java.ads.readwrite.AmsTCPPacket 
(org.apache.plc4x.java.ads.readwrite.AdsReadResponse and 
org.apache.plc4x.java.ads.readwrite.AmsTCPPacket are in unnamed module of 
loader 'app')",
               "stepArray": [{
                       "className": 
"org.apache.plc4x.java.spi.Plc4xNettyWrapper",
                       "methodName": "decode",
                       "fileName": "Plc4xNettyWrapper.java",
                       "lineNumber": 191
                   }, {
                       "className": 
"io.netty.handler.codec.MessageToMessageCodec$2",
                       "methodName": "decode",
                       "fileName": "MessageToMessageCodec.java",
                       "lineNumber": 81
                   }, {
                       "className": 
"io.netty.handler.codec.MessageToMessageDecoder",
                       "methodName": "channelRead",
                       "fileName": "MessageToMessageDecoder.java",
                       "lineNumber": 88
                   }
               ]
           }
       }
   }
   ```
   Nothing of level « error ».


-- 
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]

Reply via email to