[jira] [Created] (PLC4X-332) Maven Precondition Check fails on M1 Mac
Julian Feinauer created PLC4X-332: - Summary: Maven Precondition Check fails on M1 Mac Key: PLC4X-332 URL: https://issues.apache.org/jira/browse/PLC4X-332 Project: Apache PLC4X Issue Type: Bug Components: Build Reporter: Julian Feinauer Assignee: Christofer Dutz I have libpcap installed (via brew install libpcap) but when I trigger the maven build the precondition check fails and reports {code:java} [INFO] --- groovy-maven-plugin:2.1.1:execute (prerequisite-check) @ plc4x-parent --- Detected OS: mac Detected Arch: x86_64Detecting Java version: 17.0.1 OK Detecting Git version: 2.30.1 OK Detecting LibPcap version: missing {code} My System is a M1 Mac, if that helps using macOS Monterey 12.0.1. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Created] (PLC4X-224) Add URI normalization method for Connection Strings for PooledDriverManager
Julian Feinauer created PLC4X-224: - Summary: Add URI normalization method for Connection Strings for PooledDriverManager Key: PLC4X-224 URL: https://issues.apache.org/jira/browse/PLC4X-224 Project: Apache PLC4X Issue Type: Improvement Affects Versions: 0.7.0 Reporter: Julian Feinauer Currently, one could write two "identical" connections with different connection strings, e.g. {code:java} s7://127.0.0.1?rackId=0=1 {code} and {code:java} s7://127.0.0.1?slotId=1=0{code} If the connection Pool only looks at String comparison he would open two connetions as the strings are different. Thus each Connection should have a way to normalize its strings (also paste in all defaults) so that two Connection Stirngs beeing equal means the Connections are equal and can be shared. See PoolKeyFactory.java L44ff -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (PLC4X-223) PooledPlcDriverManager does not support parameter
Julian Feinauer created PLC4X-223: - Summary: PooledPlcDriverManager does not support parameter Key: PLC4X-223 URL: https://issues.apache.org/jira/browse/PLC4X-223 Project: Apache PLC4X Issue Type: Bug Affects Versions: 0.7.0 Reporter: Julian Feinauer Assignee: Julian Feinauer For my application I need to specify the slave ID in the following format: modbus://192.168.0.1:503?unit-identifier=50 This works for a single PlcConnection. However, parameters are not supported in the PooledPlcDriverManager, I get this exception: Caused by: org.apache.plc4x.java.api.exceptions.PlcConnectionException: java.lang.IllegalArgumentException: modbus:// 192.168.0.5:503?unit-identifier=50 doesn't match ^(?modbus:(tcp://(?[\w.]+)(:(?\d*))?|serial://(?((?!/\d).)*)))/?(?\?.*)? at org.apache.plc4x.java.utils.connectionpool.PooledPlcDriverManager.getConnection(PooledPlcDriverManager.java:117) Is there a reason the pool does not like parameters for tcp (but does accept them for serial modbus)? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (PLC4X-203) GraalVM / Native Image support for PLC4J
Julian Feinauer created PLC4X-203: - Summary: GraalVM / Native Image support for PLC4J Key: PLC4X-203 URL: https://issues.apache.org/jira/browse/PLC4X-203 Project: Apache PLC4X Issue Type: New Feature Affects Versions: 0.70, 0.6.0 Reporter: Julian Feinauer Assignee: Julian Feinauer We would like to start native images / graal VM generally and want to have a look how compatible the PLC4X code is that we currently use. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (PLC4X-199) Request future never returns when ResponseCode not OK for Siemes S7
Julian Feinauer created PLC4X-199: - Summary: Request future never returns when ResponseCode not OK for Siemes S7 Key: PLC4X-199 URL: https://issues.apache.org/jira/browse/PLC4X-199 Project: Apache PLC4X Issue Type: Bug Components: Driver-S7 Affects Versions: 0.7.0 Reporter: Julian Feinauer Assignee: Julian Feinauer When a request is made against a PLC which returns a ResponseCode other than OK the future will never complete and hang forever. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (PLC4X-185) OPC UA Driver should support client certificates
Julian Feinauer created PLC4X-185: - Summary: OPC UA Driver should support client certificates Key: PLC4X-185 URL: https://issues.apache.org/jira/browse/PLC4X-185 Project: Apache PLC4X Issue Type: New Feature Components: Driver-OPC-UA Affects Versions: 0.6.0 Reporter: Julian Feinauer Assignee: Julian Feinauer Fix For: 0.6.1 For an application we need to support Cert based Security in the OPC UA Driver. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (PLC4X-139) PLC4X leaks sockets in case of connection problems
Julian Feinauer created PLC4X-139: - Summary: PLC4X leaks sockets in case of connection problems Key: PLC4X-139 URL: https://issues.apache.org/jira/browse/PLC4X-139 Project: Apache PLC4X Issue Type: Bug Components: Core Affects Versions: 0.4.0 Reporter: Julian Feinauer Assignee: Julian Feinauer See my description on the list: https://lists.apache.org/thread.html/4aa229421668a92275e33643dbc57f2fea29cee7ffcb07891f58c9eb@%3Cdev.plc4x.apache.org%3E I created a MWE like that {code:java} public static void main(String[] args) throws Exception { IntStream.range(0, 100).parallel().forEach(i -> createConnection(i)); } private static void createConnection(int i) { System.out.println("trying " + i); try (PlcConnection plcConnection = new PlcDriverManager().getConnection("s7://192.168.167.211/0/0")) { } catch (Exception e) { logger.error("Kann keine Verbindung zu der angegebenen Adresse aufbauen"); } } {code} where the IP is *not reachable*, thus it fails every time. When looking at the open sockets with (works on my Mac) {code:bash} while true; do lsof -p 16843 | wc -l; sleep 10; done {code} I get the output {noformat} 1640 1640 1640 1736 1736 1736 1832 1832 1832 1928 1928 1928 2024 2024 2024 2120 2120 2120 2216 2216 2216 2312 2312 2312 2408 2408 2408 2504 2504 2504 2500 {noformat} So this reall sems to be the case. I think this could be due to us only propagating the exception but not closing the channel, I will investigate further. -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Created] (PLC4X-138) [API] Change Syntax of connection strings
Julian Feinauer created PLC4X-138: - Summary: [API] Change Syntax of connection strings Key: PLC4X-138 URL: https://issues.apache.org/jira/browse/PLC4X-138 Project: Apache PLC4X Issue Type: New Feature Components: API Reporter: Julian Feinauer See a complete description and discussion here: -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Created] (PLC4X-137) Fetch Driver Metadata without Connecting
Julian Feinauer created PLC4X-137: - Summary: Fetch Driver Metadata without Connecting Key: PLC4X-137 URL: https://issues.apache.org/jira/browse/PLC4X-137 Project: Apache PLC4X Issue Type: New Feature Components: API Reporter: Julian Feinauer When using PLC4X from an application it is often times desireable to get the (syntactical) validation of a Field Adress or other things. This can, for many drivers, be done without being connected to a PLC. So we should give the PlcConnection Metadata Information which is already accessible without it being connected so that Clients can use all these features although they have no direct Connection to the PLC. -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Created] (PLC4X-136) Add Async API for new Connections
Julian Feinauer created PLC4X-136: - Summary: Add Async API for new Connections Key: PLC4X-136 URL: https://issues.apache.org/jira/browse/PLC4X-136 Project: Apache PLC4X Issue Type: New Feature Components: API Reporter: Julian Feinauer Currently we only support an async API for Requests. But as creating a new Connection is sometimes even slower it would be good to provide an additional asyc API which returns a Future and leaves it to the Client to handle asynchronity. -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Created] (PLC4X-135) Allow the PooledPlcDriverManager to use a given PlcDriverManager as "base"
Julian Feinauer created PLC4X-135: - Summary: Allow the PooledPlcDriverManager to use a given PlcDriverManager as "base" Key: PLC4X-135 URL: https://issues.apache.org/jira/browse/PLC4X-135 Project: Apache PLC4X Issue Type: New Feature Reporter: Julian Feinauer Currently, the pool automatically creates a new Driver Manager (via a possibly given ClassLoader). But it would be good to use a given one so that one can, e.g. use Monitoring or other Things on the Manager. Reason is that we use Subclassing there instead of delegate, see {code:java} private void setFromPoolCreator(PooledPlcDriverManager.PoolCreator poolCreator) { this.keyedObjectPool = poolCreator.createPool(new PooledPlcConnectionFactory() { public PlcConnection create(PoolKey key) throws Exception { PlcAuthentication plcAuthentication = key.plcAuthentication; String url = key.url; if (plcAuthentication == PooledPlcDriverManager.noPlcAuthentication) { PooledPlcDriverManager.LOGGER.debug("getting actual connection for {}", url); return PooledPlcDriverManager.super.getConnection(url); } else { PooledPlcDriverManager.LOGGER.debug("getting actual connection for {} and plcAuthentication {}", url, plcAuthentication); return PooledPlcDriverManager.super.getConnection(url, plcAuthentication); } } }); } {code} from org.apache.plc4x.java.utils.connectionpool.PooledPlcDriverManager.java; -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Created] (PLC4X-132) [S7] Communication to S7 PLC dies in some situations
Julian Feinauer created PLC4X-132: - Summary: [S7] Communication to S7 PLC dies in some situations Key: PLC4X-132 URL: https://issues.apache.org/jira/browse/PLC4X-132 Project: Apache PLC4X Issue Type: Bug Components: Driver-S7 Affects Versions: 0.4.0 Reporter: Julian Feinauer The following is from the Mailing Thread [1]: In the last weeks we observed multiple times strange behavior when connecting to Siemens S7 devices. We have not yet been able to trace it down entirely but I have the assumption that it is an issue with the PooledPlcDriverManager. Whats the issue? When doing requests (either via OPM or the “regular” API) we come at a point where all subsequent requests simply fail (and in some cases we were no longer able to send requests to the PLC from other instances, so it looks like the internal server went down). Whats the setup? When I remember correctly, all situations where this occurred used the Pool as Basis. We had it both with OPM and the normal API but NOT with the Scraper. I remember that I spent like a hole day at the Hackathon in Mallorca to get all timeout things to work correctly, as the S7 does not like when you simply cancel your request futures. Currently there are two “suspects” from my side. First, the pool calls the “.connect()” method on a now Connection it establishes but by API convention you also have to do that in your code so it gets called multiple times, which could fuck up stuff. Second, connection can also time out (but its no future in our API) so in the Scraper I implemented it as Future with timeout (as I’m unsure how everything behaes if the pool starts to initialize a connection but then the “waitTime” times out and it abandons this). [1] https://lists.apache.org/thread.html/328a6780b34b4fd2e3298e9e70340293ebb397b1978a7b631030067e@%3Cdev.plc4x.apache.org%3E -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (PLC4X-131) [ROCKWELL] Implement the DF1 Protocoll
Julian Feinauer created PLC4X-131: - Summary: [ROCKWELL] Implement the DF1 Protocoll Key: PLC4X-131 URL: https://issues.apache.org/jira/browse/PLC4X-131 Project: Apache PLC4X Issue Type: New Feature Components: Driver-Rockwell Reporter: Julian Feinauer We have a new customer approaching which uses several Allen Bradley SLC504. With the help of my beloved Tim, Matthias and Björn we at least found out that there seems to be a proprietary protocol called DF1 (“ControlNet, DeviceNet oder Remote-E/A-Kommunikation. DF1 Halbduplex-Master-Protokoll gewährt die Steuerung von SCADA Netzwerken über Modems“). There also is an open source implementation online under https://github.com/leicht/Df1/tree/master/src. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (PLC4X-127) Uncaught exceptions from the Netty Pipeline
Julian Feinauer created PLC4X-127: - Summary: Uncaught exceptions from the Netty Pipeline Key: PLC4X-127 URL: https://issues.apache.org/jira/browse/PLC4X-127 Project: Apache PLC4X Issue Type: Bug Affects Versions: 0.3.1, 0.4.0 Reporter: Julian Feinauer When using in production for long times.. we often times get this WARN from Netty. This should be adressed and handled properly. {code:java} 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. java.io.IOException: Die Verbindung wurde vom Kommunikationspartner zurückgesetzt at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[?:1.8.0_161] at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[?:1.8.0_161] at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[?:1.8.0_161] at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[?:1.8.0_161] {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (PLC4X-124) [S7] Read the Cycle time of Siemes S7
Julian Feinauer created PLC4X-124: - Summary: [S7] Read the Cycle time of Siemes S7 Key: PLC4X-124 URL: https://issues.apache.org/jira/browse/PLC4X-124 Project: Apache PLC4X Issue Type: New Feature Components: Driver-S7 Reporter: Julian Feinauer It woudl be a great feature to support reading the cycle time of PLCs in a unique fashion. For Siemens S7 I found the references https://support.industry.siemens.com/tf/WW/en/posts/cycle-time-of-previous-ob1-scan-milliseconds/141751?page=0=10 https://support.industry.siemens.com/cs/document/87668055/with-s7-1200-s7-1500-how-do-you-measure-the-total-cycle-time-of-an-organization-block-?dti=0=en-CH https://support.industry.siemens.com/tf/WW/en/posts/capturing-cycle-time-in-s7-400/21277?page=0=10 We should try if this generally works, and if so, we should think about adding something like that to our API(s). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (PLC4X-121) Develop Code Generation to allow Generated Drivers in multiple Languages
Julian Feinauer created PLC4X-121: - Summary: Develop Code Generation to allow Generated Drivers in multiple Languages Key: PLC4X-121 URL: https://issues.apache.org/jira/browse/PLC4X-121 Project: Apache PLC4X Issue Type: New Feature Components: Generation-Framework, Core Reporter: Julian Feinauer Assignee: Julian Feinauer As we want to have (multiple) Drivers in (multiple) Languages we should use Code Generation to write each driver once in rather generic form and generate valid Code in the target Languages (Java, Python, .NET, Cpp, Brainfuck, ...). This Ticket covers the effort of generating the Tools and API to Generate valid Target Java Code for an interal representation. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (PLC4X-117) Subscription links on the website not working
Julian Feinauer created PLC4X-117: - Summary: Subscription links on the website not working Key: PLC4X-117 URL: https://issues.apache.org/jira/browse/PLC4X-117 Project: Apache PLC4X Issue Type: Bug Components: Website Reporter: Julian Feinauer Currently the subscribe, ... links on the /mailing-lists.html point to https://plc4x.apache.org/dev-subscr...@plc4x.apache.org but should to mailto:xxx. I tried to change it in the pom.xml (as this side is generated, but it did not work). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (PLC4X-116) Build fails locally during thrift phase
Julian Feinauer created PLC4X-116: - Summary: Build fails locally during thrift phase Key: PLC4X-116 URL: https://issues.apache.org/jira/browse/PLC4X-116 Project: Apache PLC4X Issue Type: Bug Affects Versions: 0.3.1 Reporter: Julian Feinauer Assignee: Christofer Dutz When I run {code:bash} mvn clean install {code} with the exception {code:java} [INFO] --- maven-thrift-plugin:0.1.11:compile (thrift-sources) @ plc4py --- [ERROR] thrift failed output: [ERROR] thrift failed error: /bin/sh: /Users/julian/Develop/incubator-plc4x/plc4py/target/thrift-compiler/thrift: No such file or directory {code} and when I run `mvn -Pdevelopment,with-cpp,with-python,with-proxies,with-sandbox clean compile` (like Jenkins does) I get {code:java} [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.1:unpack (unpack-protocol-spec) on project interop-server: Artifact has not been packaged yet. When used on reactor artifact, unpack should be executed after packaging: see MDEP-98. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :interop-server {code} Is there something wrong with my setup? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (PLC4X-113) Implement support for complex field types in the PLC4X API
Julian Feinauer created PLC4X-113: - Summary: Implement support for complex field types in the PLC4X API Key: PLC4X-113 URL: https://issues.apache.org/jira/browse/PLC4X-113 Project: Apache PLC4X Issue Type: New Feature Components: API Reporter: Julian Feinauer *This is a (possibly) incompatible change.* Currently we have support for primitives as well as lists (arrays) as first class "ciitzens" of the PLC4X model. Especially, when thinking about OPC UA, but also other protocols like ADS (and even S7) support complex objects in their programming model. Thus, it is necessary to refactor / extend the API to support these complex objects. I guess we need at least * primitives * lists * maps (should be equal to "structs") Basically, this should be roughly equivalent to what one can represent with JSON. Thus, the API could be structured i two ways.. first, we could use an internal Node Tree to represent the objects, but we could also provide to use someone elses NodeTree or structure to represent the Objects. For example Jackson.. this would even allow us to directly map these objects to POJOs via Jackson. As example for such a model, one can look at that of Apache Calcite: https://github.com/apache/calcite/blob/3fa29455664bec0056c436491b369e0cd72242ea/core/src/main/java/org/apache/calcite/rel/type/RelDataType.java They have an interface with methods {code:java} public interface DataType { // Checker boolean isMap; boolean isList; boolean isPrimitive; // Getter for complex types DataType get(String key); DataType get(Long i); // Primitive getters long getLong(); String getString(); //... } {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (PLC4X-111) Implement an interop Server for clients in other languages
Julian Feinauer created PLC4X-111: - Summary: Implement an interop Server for clients in other languages Key: PLC4X-111 URL: https://issues.apache.org/jira/browse/PLC4X-111 Project: Apache PLC4X Issue Type: New Feature Reporter: Julian Feinauer Assignee: Julian Feinauer Fix For: 0.4.0 Currently we have native support only for Java. The generated drivers for other languages will still take a while till ready or finished. Thus, to make it possible to play around with other languages than Java a thrift based interop server should be implemented. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (PLC4X-108) Add ping() method to PlcConnection
Julian Feinauer created PLC4X-108: - Summary: Add ping() method to PlcConnection Key: PLC4X-108 URL: https://issues.apache.org/jira/browse/PLC4X-108 Project: Apache PLC4X Issue Type: New Feature Components: API, Core Reporter: Julian Feinauer Fix For: 0.4.0 Goes back to the discussion: https://lists.apache.org/thread.html/d06e2227bdf31f49e013adec6e31292809af15f467e70010af27eec8@%3Cdev.plc4x.apache.org%3E -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (PLC4X-95) Make DriverManager Pluggable for Scraper
Julian Feinauer created PLC4X-95: Summary: Make DriverManager Pluggable for Scraper Key: PLC4X-95 URL: https://issues.apache.org/jira/browse/PLC4X-95 Project: Apache PLC4X Issue Type: Improvement Components: Util-Scraper Reporter: Julian Feinauer Fix For: 0.4.0 Currently the plc scraper creates its DriverManager as default from its Class Loader. Especially for testing we should allow to pass in a (custom) Driver Manager which is then used by the scraper. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (PLC4X-94) Build fails due to dependency-check plugin
Julian Feinauer created PLC4X-94: Summary: Build fails due to dependency-check plugin Key: PLC4X-94 URL: https://issues.apache.org/jira/browse/PLC4X-94 Project: Apache PLC4X Issue Type: Bug Components: Build Reporter: Julian Feinauer Assignee: Christofer Dutz It seems that there are problems with the update of the NVD-CVE's (also had some locally) which breaks our build (due to timeout for site stage). I currently removed the dependency-check plugin for the jenkins-build profile to get it back to green (hopefully) but this has to be solved. I've assigned it directly to [~cdutz] because he currently manages the build mostly alone but it would be good to incorporate [~timbo2k] and me in the resolution. -- This message was sent by Atlassian JIRA (v7.6.3#76005)