[jira] [Created] (PLC4X-205) Incorrect shutdown sequence on error
Niclas Hedhman created PLC4X-205: Summary: Incorrect shutdown sequence on error Key: PLC4X-205 URL: https://issues.apache.org/jira/browse/PLC4X-205 Project: Apache PLC4X Issue Type: Bug Components: Core Reporter: Niclas Hedhman In the testcase below, there is a permission problem and I think because of that the closing of channel and buffers are out of order/state. [code] 11:59:51.855 [pool-1-thread-1] WARN i.n.c.AbstractChannelHandlerContext - Failed to mark a promise as failure because it has succeeded already: DefaultChannelPromise@63ab80ee(success) java.lang.IllegalStateException: close() must be invoked after the channel is closed. at io.netty.channel.ChannelOutboundBuffer.close(ChannelOutboundBuffer.java:683) at io.netty.channel.ChannelOutboundBuffer.close(ChannelOutboundBuffer.java:711) at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:741) at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:607) at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1352) at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:622) at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:606) at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:472) at io.netty.channel.DefaultChannelPipeline.close(DefaultChannelPipeline.java:957) at io.netty.channel.AbstractChannel.close(AbstractChannel.java:232) at io.netty.channel.ChannelFutureListener$2.operationComplete(ChannelFutureListener.java:56) at io.netty.channel.ChannelFutureListener$2.operationComplete(ChannelFutureListener.java:52) at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577) at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:551) at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490) at io.netty.util.concurrent.DefaultPromise.addListener(DefaultPromise.java:183) at io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:95) at io.netty.bootstrap.Bootstrap$3.run(Bootstrap.java:248) at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:69) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.lang.Thread.run(Thread.java:748) [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.26 s <<< FAILURE! - in org.apache.plc4x.java.utils.rawsockets.netty.RawSocketChannelTest [ERROR] doConnect Time elapsed: 2.478 s <<< ERROR! org.pcap4j.core.PcapNativeException: lo: You don't have permission to capture on that device (socket: Operation not permitted) [code] -- This message was sent by Atlassian Jira (v8.3.4#803005)
Serial port Connection
Hi, IIUIC, the connection string for Serial Modbus would be something like; modbus:serial:/dev/ttyS0?unit-identifier=7 assuming I want to communicate with device with address 7. That would mean that I have one connection per device I talk to over a single serial port. Is that correct? (Personally, I would not made the device part of the connection abstraction, but realize that it is a bit late for that) Are there any issues here, regarding which connection has access to the port, or do I need to open and close the connection on each set of messages? Couldn't find info about this in the documentation. The serial port page is missing information on the configuration (data, parity, stop,...). The source code doesn't have the @ConfigurationParameter annotations, so will they still work or do I need to add that programmatically somehow? Cheers Niclas