Giter Site home page Giter Site logo

ethernet-ip's Introduction

EtherNet/IP Client

Build status Maven Central

Asynchronous, non-blocking, EtherNet/IP client implementation for Java

Maven

EtherNet/IP Client

<dependency>
    <groupId>com.digitalpetri.enip</groupId>
    <artifactId>enip-client</artifactId>
    <version>1.4.1</version>
</dependency>

CIP Client

<dependency>
    <groupId>com.digitalpetri.enip</groupId>
    <artifactId>cip-client</artifactId>
    <version>1.4.1</version>
</dependency>

Quick Start

EtherNet/IP Example

EtherNetIpClientConfig config = EtherNetIpClientConfig.builder("10.20.4.57")
        .setSerialNumber(0x00)
        .setVendorId(0x00)
        .setTimeout(Duration.ofSeconds(2))
        .build();

EtherNetIpClient client = new EtherNetIpClient(config);

client.connect().get();

client.listIdentity().whenComplete((li, ex) -> {
    if (li != null) {
        li.getIdentity().ifPresent(id -> {
            System.out.println("productName=" + id.getProductName());
            System.out.println("revisionMajor=" + id.getRevisionMajor());
            System.out.println("revisionMinor=" + id.getRevisionMinor());
        });
    } else {
        ex.printStackTrace();
    }
});

client.disconnect().get();

// Call this before application / JVM shutdown
EtherNetIpShared.releaseSharedResources();

CIP Service Example

EtherNetIpClientConfig config = EtherNetIpClientConfig.builder("10.20.4.57")
        .setSerialNumber(0x00)
        .setVendorId(0x00)
        .setTimeout(Duration.ofSeconds(2))
        .build();

// backplane, slot 0
PaddedEPath connectionPath = new PaddedEPath(
        new PortSegment(1, new byte[]{(byte) 0}));

CipClient client = new CipClient(config, connectionPath);

client.connect().get();

GetAttributeListService service = new GetAttributeListService(
        new PaddedEPath(new ClassId(0x01), new InstanceId(0x01)),
        new int[]{4},
        new int[]{2}
);

client.invokeUnconnected(service).whenComplete((as, ex) -> {
    if (as != null) {
        try {
            ByteBuf data = as[0].getData();
            int major = data.readUnsignedByte();
            int minor = data.readUnsignedByte();

            System.out.println(String.format("firmware v%s.%s", major, minor));
        } catch (Throwable t) {
            t.printStackTrace();
        } finally {
            Arrays.stream(as).forEach(a -> ReferenceCountUtil.release(a.getData()));
        }
    } else {
        ex.printStackTrace();
    }
});

client.disconnect().get();

// Call this before application / JVM shutdown
EtherNetIpShared.releaseSharedResources();

Logix Example

See the logix-services README!

License

Apache License, Version 2.0

ethernet-ip's People

Contributors

chrisdutz avatar ia-mrojas avatar kevinherron avatar sushiesharma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ethernet-ip's Issues

ConnectionFailure for AllenBradley 1769-L33ER Controller with Firmware version 36

After the Firmware upgrade from 20 to 36 AllenBradley 1769-L33ER Controller is not connecting and giving the below error. Before upgradation, it was connected.

Caused by: com.digitalpetri.enip.cip.CipResponseException: status=0x01 [connection failure] , additional=[0x0315]
at com.digitalpetri.enip.cip.services.ForwardOpenService.decodeResponse(ForwardOpenService.java:50)
at com.digitalpetri.enip.cip.CipConnectionPool$DefaultConnectionFactory.lambda$forwardOpen$0(CipConnectionPool.java:214)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1975)
at com.digitalpetri.enip.cip.CipClient.lambda$sendUnconnectedData$8(CipClient.java:212)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1975)
at com.digitalpetri.enip.EtherNetIpClient$PendingRequest.lambda$new$0(EtherNetIpClient.java:311)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1975)
at com.digitalpetri.enip.EtherNetIpClient.onChannelRead(EtherNetIpClient.java:189)
at com.digitalpetri.enip.EtherNetIpClient.access$500(EtherNetIpClient.java:38)
at com.digitalpetri.enip.EtherNetIpClient$EtherNetIpClientHandler.lambda$channelRead0$0(EtherNetIpClient.java:245)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)

Getting above error while using ConnectionPool. For connectionPath I'm trying :

public static final PaddedEPath connectionPath = new EPath.PaddedEPath(new PortSegment(1, new byte[] {(byte) 0}));
public static final EPath.PaddedEPath connectionPath = new EPath.PaddedEPath(Collections.emptyList());

Still getting the same error.

Connecting to Fanuc controller

I'm using your package to write a client that can connect directly to a robotic controller instead of going through PLC. Everything seems to work well until I try to use connection pools.

Connection pools are throwing the following exception:
java.util.concurrent.ExecutionException: com.digitalpetri.enip.cip.CipResponseException: status=0x01 [connection failure] , additional=[0x0315]

Extended status error 0x0315 says, "This error occurs when the target device cannot understand the segment type or segment value in the Connection Path. Consult the documentation of the device to verify the correct segment type and value. If a Connection Point greater than 255 is specified this error could occur."

I am using the same connection path in my connection pool version and non-connection pool version. I did notice that there is another connection path in the call to ForwardOpenRequest. Is this the one it is complaining about?

Can I even use connections pool when connecting directly to a robotic controller.

[Android] DINT bug

I am doing exactly what the example code provide but the value sent to the PLC controller is not correct. Here is my code:

 config = EtherNetIpClientConfig.builder("10.2.217.48")//"192.168.0.252"
            .setSerialNumber(0x00)
            .setVendorId(0x00)
            .setTimeout(Duration.ofSeconds(5))
            .build();

 // backplane, slot 0
connectionPath = new EPath.PaddedEPath(
            new PortSegment(1, new byte[]{(byte) 1}));

 client = new CipClient(config, connectionPath);
 requestPath = new EPath.PaddedEPath(
            new DataSegment.AnsiDataSegment("MyDINT"));

 ByteBuf buffer = Unpooled.buffer();
 buffer.writeInt(1);
 WriteTagService serviced = new WriteTagService(
            requestPath,
            false,
            CipDataType.DINT.getCode(),
            buffer
  );

dint

Specifying an IP in a EPathSegment

I have a 1756-ENBT/A with a LOGIX5573 in Backplane Slot 0, and this works great, but the diagram I have says Slot 1 is an Ethernet connection, and I can’t seem to get the EPath right, it just times out. What is the proper way to specify an IP or am I missing something? This I what I’m trying currently:

InetAddress ip = null;
try {
ip = InetAddress.getByName("198.137.171.14");
} catch (UnknownHostException e) {
e.printStackTrace();
}
byte[] bytes = ip.getAddress();
// backplane, slot 0
PaddedEPath connectionPath = new PaddedEPath(
new PortSegment(1, new byte[]{(byte) 1}), //Backplane Slot
new PortSegment(2, bytes), //IP
new PortSegment(1, new byte[]{(byte) 1}));

Memory leak in ReadTagFragmentedService

There's a memory leak in ReadTagFragmentedService due to a bug in netty 4.0.32.Final and prior that causes a CompositeByteBuf not to release its component buffers.

Android Support

The title speaks for itself. If anyone can port this library to Android platform it would be very much appreciated. As I read the code it uses a lot of Java 8 features which is not available on Android yet.

Not able to read the String Values

Hi Kevin ,

Thanks For the Library. we are facing issue when we are trying to read the String value for Rockwell Rslogix 5000 PLC.
for example when i trying to read the hexadecimal value from PLC is "a002ce0f0900000054657374696e672039006700390067000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
can you guide me to understand the hex value.

Allow Charset of AnsiDataSegment to be specified

Some implementations, such as the Omron NJ/NX controllers, will treat the contents of an AnsiDataSegment as UTF-8 rather than ASCII to allow unicode tag names to be specified. Add a constructor that allows the Charset to be specified.

C# port

This is not really an "issue", but I was wondering if there exists a C# port of this library. It looks like just what I need :-)

unhandled item type: 0x86

I send out ListIdentity command as broadcast to scan a network for devices. Usually every Ethernet/IP device is responding as expected. One customer has a device in its network that sends a response which can't be decoded.
When I call EnipPacket.decode(byteBuf) then I get The following exception:
java.io.IOException: java.util.concurrent.ExecutionException: io.netty.handler.codec.DecoderException: unhandled item type: 0x86
at xxxx.scanEthernetIp(xxxx.java:526)
at xxxx.scanNetwork(xxxx.java:347)
at xxxx.scanNetwork(xxxx.java:240)
at xxxx.lambda$scanNetwork$1(xxxx.java:734)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: io.netty.handler.codec.DecoderException: unhandled item type: 0x86
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at xxxx.scanEthernetIp(xxxx.java:524)
... 4 more
Caused by: io.netty.handler.codec.DecoderException: unhandled item type: 0x86
at com.digitalpetri.enip.cpf.CpfItem.decode(CpfItem.java:79)
at com.digitalpetri.enip.cpf.CpfPacket.decode(CpfPacket.java:49)
at com.digitalpetri.enip.commands.ListIdentity.decode(ListIdentity.java:54)
at com.digitalpetri.enip.EnipPacket.decodeCommand(EnipPacket.java:163)
at com.digitalpetri.enip.EnipPacket.decode(EnipPacket.java:127)
at xxxx.receive(Scanner.java:65)
at xxxx.scanNet(Scanner.java:32)
at xxxx.scanAllNet(Scanner.java:42)
at xxxx.scan(GlobalEthernetIpConnectionDevice.java:63)
at xxxx.lambda$scanEthernetIp$2(xxxx.java:512)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more

I could see that the response contains 2 CpfItem, a CipIdentityItem and an unknown one.
Here is the response as byte array:
[99, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 12, 0, 45, 0, 1, 0, 0, 2, -81, 18, -64, -88, -56, -7, 0, 0, 0, 0, 0, 0, 0, 0, 77, 0, 12, 0, 115, 0, 11, 1, 96, 0, -23, 27, -51, 44, 11, 82, 68, 78, 69, 84, 76, 84, 69, 69, 48, 55, -1, -122, 0, 5, 0, 2, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

I hope someone can help me with that issue.

Unable to write STRUCT values

Hey Kevin, Thanks for the tool !. I do have one problem when writing STRING to ALB PLC's. I can read though. The tag type is a STRUCT x020A, do you have any example for writing Struct tag types.
Below is the tag I am trying to write.

image

How to run ethernet/ip client?

Hi. I am using ubuntu-18.04 OS. After I "git clone" and "mvn clean install", I tried java -jar enip-client/target/enip-client-1.3.2-SNAPSHOT.jar, but the console responds "no main manifest attribute".

I want to generate a series ethernet/ip request packets with different function codes to send to the honeypot. Can you help me? Thank you.

GetInstanceAttributeListService

There are many Logix objects that use the GetInstanceAttributeListService in order to pull attributes from all instances. Is there a reason the implementation of this service is not more generic (as opposed to only supporting the Symbol Object instances)?

Hangs while running

When I run a program using this library to connect to a device, even when doing something as simple as connecting and disconnecting, there are background threads that continue to run, making the application hang.

My guess is that the netty connection was not shut down properly. Or perhaps I'm missing a shutdown command? Either way, this is going to lead to major thread leak on my server. How can I fix this?

EtherNetIpClientConfig config = EtherNetIpClientConfig.builder("10.20.1.1")
                .setSerialNumber(0x00)
                .setVendorId(0x00)
                .setTimeout(Duration.ofSeconds(2))
                .build();

EtherNetIpClient client = new EtherNetIpClient(config);

client.connect().get();

client.disconnect();

Examples of reading (cyclically) and writing UDTs and ARRAYs?

CONSTANTS_UDT
CM_STATUS_UDT

Hello Kevin and others,

I have been granted the challenging task of creating a communication driver for our Java based software, to communicate with a new RSLogix PLC. In the PLC we use Controller Tags to store the Control Module statuses, commands, constants etcetera. Basically we have recreated the structures we also use for our Siemens PLC's.

My task is to build a prototype using the cip-client and my question is: are there any examples of how to read an UDT cyclically (say, every 0.25 sec) and where can I find them? I would expect that the cip-client was tested with use-cases like mine?

To elaborate a bit further. The CM_STATUS UDT contains one UDT per Control Module, which holds the BOOLEAN status-bits (no other types of data). It would be great if the whole STRUCT could be read 'in one go' and the entire STRUCT translated into an array of bytes in Java.

The other STRUCTs (like CONSTANTS) contain an array of DINTS per Control Module. These should be read and written per Control Module.

Of course I do not expect you to do my programming for me, but any help is appreciated!

ReadTagService service = new ReadTagService(requestPath); is not available

I followed the code for the logix server that connect to the ethernet/ip simulator and the code return the error

com.digitalpetri.enip.cip.CipResponseException: status=0x08 [service not supported] , additional=[]
at com.digitalpetri.enip.logix.services.ReadTagService.decodeResponse(ReadTagService.java:63)
at com.digitalpetri.enip.logix.services.ReadTagService.decodeResponse(ReadTagService.java:13)

Bug: Timeout always waited before returning message result

Hello,
Troubleshooting slow performance, I noticed that the client will always wait the timeout before returning.
I tested with timeouts up to 30 seconds and the behavior is always the same, the client will always wait the full timeout before returning.

Configuring the client with the timeout:

EtherNetIpClientConfig config = EtherNetIpClientConfig.builder(pathParts[0])
                    .setSerialNumber(0x00)
                    .setVendorId(0x00)
                    .setTimeout(Duration.ofSeconds(timeout))
                    .build();

...

 //Build client
CipClient client = new CipClient(config, connectionPath);
client.connect().get(); //Create connection

Getting the result like so:

recvBuff = client.invokeUnconnected(genericService).get();

Is this expected and I need to modify how I am using the client, or is this an issue in the client timeout?

Thank you,
Trevor

EDIT: I tested with both connected and unconnected messages, they both have the same behavior.

"service not supported" While trying to Read Program tags

HI,

While trying to read Program Tags configured in ALLEN BRADLEY Logix5585E PLC , getting "status=0x08 [service not supported] , additional=[]" error.

PFA the code to read one of the program tags:
SampleCode.txt

PFA the Logs :
Logs.txt

PFA the ProgramTags configured in PLC:
PLC_ALL_TAGS.txt

If I give any other controller tag name in AnsiDataSegment , I get same result of "service not supported" error.

If I try to give whole tag name ie "Program:MainProgram.HeartbeatPLC" , I get "status=0x04 [path segment error] , additional=[0x0000]"

I am new to the domain and looking for pointers to resolve the issue.
Appreciate your help.
Thanks.

Refactor the code to use the "LE" accessors instead of constructing a ByteBuffer with changed byte order

Currently my build is polluted by deprecation warnings as within the code we are constructing multiple LE ByteBuffers. It is suggested by the netty guys to use a normal byte buffer and use LE accessors instead. So instead of

    buf.readShort() 

we would use

    buf.readShortLE()

I think this is a lot clearer and would get rid of the deprecation warnings.

I would be happy to be of assistance in changing this.

MicroLogix 1400

Does this work with the micrologix 1400? I cant seem to get it to work, Ethernet/IP returns some information from the PLC

productName=1766-L32BWA B/13.00
revisionMajor=2
revisionMinor=13

but can read/write anything

Connecting to a 5069 processor

I receive an error from the Connection Manager when I attempt to connect to a 5069 bulletin CompactLogix 5380 processor via your tutorial in the logix-services readme.

pool.acquire().whenComplete((connection, ex) -> {
    if (connection != null) {
        ...
    } else {
        ex.printStackTrace();
    }
});

This always fails with the connection manager passing extended error 0x0315.

I was able to fix this by changing the connectionPath constructor to

PaddedEPath connectionPath = new PaddedEPath();

and modifying the static MESSAGE_ROUTER_CP_PATH.

        private static final PaddedEPath MESSAGE_ROUTER_CP_PATH = new PaddedEPath(
                new ClassId(0x02),
                new InstanceId(0x01));

MultipleServicePacketService fail with MALFORMED_DATA

I'm using MultipleServicePacketService to read multipe tags, but it fails with:
com.digitalpetri.enip.EtherNetIpClient onChannelRead
WARNING: Received SendUnitData command with status: MALFORMED_DATA

Reading the tags individually works fine.

Is it the PLC which does not support multiple service packets, and if so, how can I check for this?

When to release the connection and when not

Hello Kevin,

In the documentation we find the phrase "We recommend using connected messaging whenever possible.".

The logix services example shows me how to invoke the ReadTagService and WriteTagService using connected communication. But when the requested Service is complete, the example shows pool.release(connection);. Surely this is not the way to do it in a real application?

What would be valid reason(s) to release the connection? Failure to read or write data?

Hi Speed data logging best practice? TagList?

Thanks for this library -- it looks really great and seems to work with the examples in README...

Now I am trying to read a bunch of tags as fast as possible and log them. Any suggestions on the best way to do this?

etherip sets up a TimerTask... but this can hit issues if you as for too much without enoguh time:
https://github.com/EPICSTools/etherip/blob/master/src/etherip/scan/ScanList.java

Is there some clever netty way to just keep its request buffer full?

Related question, what is the best way to read multiple tags? The ReadTagService constructor takes elementCount, but I have not made it work with anything other than 1.

I have implemented TagList with MultipleServicePacketService, and that seems to work. But I am not sure you gain anything of just multiple ReadTagService requests.

Feature: GenericService

Hello,
First, thank you for this amazing library.

It would be very helpful to have a GenericService class, where the service code can be provided in the constructor.
Something like this:

public class GenericService implements CipService<ByteBuf> {

    private final EPath.PaddedEPath requestPath;
    private final int serviceCode;

    public GenericService(int serviceCode, EPath.PaddedEPath requestPath) {
        this.requestPath = requestPath;
        this.serviceCode = serviceCode;
    }

    @Override
    public void encodeRequest(ByteBuf buffer) {
        MessageRouterRequest request = new MessageRouterRequest(
                serviceCode,
                requestPath,
                byteBuf -> {
                }
        );

        MessageRouterRequest.encode(request, buffer);
    }

    @Override
    public ByteBuf decodeResponse(ByteBuf buffer) throws CipResponseException {
        MessageRouterResponse response = MessageRouterResponse.decode(buffer);

        if (response.getGeneralStatus() == 0x00) {
            return response.getData();
        } else {
            ReferenceCountUtil.release(response.getData());

            throw new CipResponseException(response.getGeneralStatus(), response.getAdditionalStatus());
        }
    }
}

Thank you,
Trevor

PaddedEPath for Program Tag, Request Multiple Tags

Using the Logix ReadTagService and WriteTagService, how do I specify the path to a Program level tag. I've attempted to use 'Program:Name.Tag' like inside Ignition, but that doesn't work. I've also tried doing two AnsiDataSegments with the 'Name' and 'Tag'.

Is there a way to request retrieval/updating of multiple disparate tags?

Is there a better way to communicate about questions with this project other than opening issues?

Memory leak in GetAttributesAllService

When decoding a response to a GetAttributesAll request, the ByteBuf data is retained during the MessageRouterResponse decode() method (line 56), but GetAttributesAllService decodeResponse() method may throw an exception without releasing that data (line 38). I believe this is the cause of a memory leak I am seeing.

Example for using a forward open

Hello,
Could you please provide an example of using the ForwardOpenService?
I am trying to figure out how to send a connected message to one module though another module which is a message router.

Thank you,
Trevor

Question about io.netty.channel.DefaultChannelPipeline onUnhandledInboundException logs

I'm not sure where in the stack this goes wrong (My use of Ethernet-ip, in ethernet-ip, in Netty or ???).
But I'm getting many of these:

aug. 22, 2022 3:49:28 PM io.netty.channel.DefaultChannelPipeline onUnhandledInboundException
WARNING: 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.net.SocketException: Connection reset
	at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394)
	at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426)
	at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:258)
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)

The setup has 4 PLC connections (2 using Milo and 2 using Ethernet/IP), so debugging Netty is a bit difficult.
I suspect it is something related to asynchrous tasks not being cleared on reconnect in Ethernet/IP, but I have nothing but a gut feeling to back this up, and the fact that it only happens when the Ethernet/IP connections start to "act up" (disconnects for some reason), which only happens on the production system ~2 times in a week, which does not make it specifically easy to debug, but the logs quickly fills up the harddrive.
Do you have any idea about where to start looking?

Add an implementation of ethernet-ip as Netty Codec

Hi!

I'm from the PLC4X Project which is here well known, I guess : )
As we have Netty 4.x as the basis for our IO I thought if it wouldnt the cleanest way for us to use Ethernet/IP to add it as Codec in the ChannelPipeline.
Did you ever consider that or do you agree / disagree?
Perhaps I could also offer some help with integration of such a feature if such a PR would be welcome?

Julian

Read data from PLC-5

Hi everybody,

I'm quite new in the topic. Could you please tell if it is possible to read data from PLC-5 using the library? I'm able to connect to it using eth-ip client but don't understand how to read data.

BR

FEATURE: Way to shutdown a connection pool

Hello,
Can you please provide a way to shutdown a connection pool that will close all connections and empty the pool?
I am running into an issue that the pool is leaving hanging connections once I am done using it, with no way to clean up the connections prior to it getting GC'd.

Thanks,
Trevor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.