Coder Social home page Coder Social logo

eclipse / milo Goto Github PK

View Code? Open in Web Editor NEW
1.1K 79.0 412.0 16.74 MB

Eclipse Milo™ - an open source implementation of OPC UA (IEC 62541).

Home Page: http://www.eclipse.org/milo

License: Eclipse Public License 2.0

Java 99.93% HTML 0.07%
opc-ua java iot client server stack sdk iec-62541 opcua iec62541

milo's Introduction

Eclipse Milo

Jenkins Maven Central

Milo is an open-source implementation of OPC UA (currently targeting 1.03). It includes a high-performance stack (channels, serialization, data structures, security) as well as client and server SDKs built on top of the stack.

Stack Overflow tag: milo

Mailing list: https://dev.eclipse.org/mailman/listinfo/milo-dev

Maven

Building Milo

Using JDK 8, run mvn clean install from the project root.

To maintain compatibility with Java 8 it is recommended that you build using JDK 8, however the library is runtime compatible with versions 8 and later (e.g. JDK 11, JDK 17).

Releases

Releases are published to Maven Central and snapshots to Sonatype.

OPC UA Client SDK

<dependency>
    <groupId>org.eclipse.milo</groupId>
    <artifactId>sdk-client</artifactId>
    <version>0.6.12</version>
</dependency>

OPC UA Server SDK

<dependency>
    <groupId>org.eclipse.milo</groupId>
    <artifactId>sdk-server</artifactId>
    <version>0.6.12</version>
</dependency>

Referencing a SNAPSHOT release requires the Sonatype snapshot repository be added to your pom file:

<repository>
    <id>oss-sonatype</id>
    <name>oss-sonatype</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>

Public Demo Server

An internet-facing demo server is accessible at opc.tcp://milo.digitalpetri.com:62541/milo.

It accepts both unsecured and secured connections. Before connecting with security you must upload your client's DER-encoded X509 certificate using the form at http://milo.digitalpetri.com.

Authenticate anonymously or with one of the following credential pairs:

  • user1 / password
  • user2 / password
  • admin / password

The code powering the demo server is available here: https://github.com/digitalpetri/opc-ua-demo-server

milo's People

Contributors

apupier avatar asashour avatar asunc avatar cmello avatar comtel2000 avatar ctron avatar eclipse-milo-bot avatar eclipsewebmaster avatar hekonsek avatar igarciasz avatar jlleitschuh avatar joesan avatar kevinherron avatar lln-ijinus avatar locutusv0nb0rg avatar marcusschneider avatar michaelstofan avatar mx990 avatar pro avatar shoothzj 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  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

milo's Issues

Problems when session lifetime has expired

When session lifetime expires (ie. there is "Session id=NodeId{ns=1, id=Session:0841d805-7944-40f3-a7b3-b710d938d77a} lifetime expired (120000ms)" on debug log) the next operation seems to run into problems.

I observed this with readValues(), but it can be reproduced with ReadExample by adding Thread.sleep(130000) before readServerStateAndTime call (timeout in ClientExampleRunner needs to be bumped up also).

For asynchronous request, the system seems to notice that session has expired and builds a new one, but the original request never completes (ie. thenAccept is never called). A synchronous request using get() results in "UaServiceFaultException: status=Bad_SessionIdInvalid, message=The session id is not valid."

opc client code stops fetching data after a reconnect

Sometimes, the opc client code fails to get data from opc broker/server, after a reconnect.

Here's successful connection logs (data is fetched from opc broker successfully after this reconnect)

2016-07-01 21:05:07 DEBUG UaTcpClientAcknowledgeHandler:150 - Sent Hello message on channel=[id: 0x4f988c56, /172.18.0.5:44544 => /10.83.202.40:49320].
2016-07-01 21:05:07 DEBUG UaTcpClientAcknowledgeHandler:208 - Received Acknowledge message on channel=[id: 0x4f988c56, /172.18.0.5:44544 => /10.83.202.40:49320].
2016-07-01 21:05:07 DEBUG UaTcpClientMessageHandler:153 - OpenSecureChannel timeout scheduled for +5s
2016-07-01 21:05:07 DEBUG UaTcpClientMessageHandler:220 - Sent OpenSecureChannelRequest (Issue, id=0, currentToken=-1, previousToken=-1).
2016-07-01 21:05:07 DEBUG UaTcpClientMessageHandler:378 - OpenSecureChannel timeout canceled
2016-07-01 21:05:07 DEBUG UaTcpClientMessageHandler:422 - Received OpenSecureChannelResponse.
2016-07-01 21:05:07 DEBUG UaTcpClientMessageHandler:500 - SecureChannel id=118612, currentTokenId=1, previousTokenId=-1, lifetime=3600000ms, createdAt=DateTime{utcTime=131118806733609274, javaDate=Fri Jul 01 21:04:33 UTC 2016}
2016-07-01 21:05:07 DEBUG UaTcpClientMessageHandler:128 - 0 message(s) queued before handshake completed; sending now.
2016-07-01 21:05:07 DEBUG ClientChannelManager:178 - Channel bootstrap succeeded: localAddress=/172.18.0.5:44544, remoteAddress=/10.83.202.40:49320
2016-07-01 21:05:07 DEBUG ClientSessionManager:431 - Sending (re)ActivateSessionRequest, secureChannelId=118612, channel=[id: 0x4f988c56, /172.18.0.5:44544 => /10.83.202.40:49320]...
2016-07-01 21:05:07 DEBUG ClientChannelManager:219 - Reconnect succeeded, channelId=118612
2016-07-01 21:05:07 DEBUG ClientSessionManager:448 - Session reactivated: NodeId{ns=1, id=143dd10c-2ac8-4ae0-9361-7e4aaf0414f6}
2016-07-01 21:05:07 DEBUG OpcUaSubscriptionManager:339 - Sending PublishRequest, requestHandle=2573, acknowledgements=[id=1049/seq=2566]
2016-07-01 21:05:07 DEBUG OpcUaSubscriptionManager:339 - Sending PublishRequest, requestHandle=2574, acknowledgements=[]
2016-07-01 21:05:08 DEBUG OpcUaSubscriptionManager:349 - Received PublishResponse, sequenceNumber=2567
2016-07-01 21:05:08 DEBUG OpcUaSubscriptionManager:339 - Sending PublishRequest, requestHandle=2575, acknowledgements=[]
2016-07-01 21:05:08 DEBUG OpcUaSubscriptionManager:377 - onPublishComplete() response for subscriptionId=1049
2016-07-01 21:05:08 DEBUG OpcUaSubscriptionManager:427 - [id=1049] PublishResponse sequence=2567, available sequences=[id=1049/seq=2567]
2016-07-01 21:05:08 DEBUG OpcUaSubscriptionManager:495 - onNotificationMessage(), subscriptionId=1049, sequenceNumber=2567, publishTime=DateTime{utcTime=131118806742501290, javaDate=Fri Jul 01 21:04:34 UTC 2016}
2016-07-01 21:05:08 DEBUG OpcUaSubscriptionManager:510 - Received 6 MonitoredItemNotifications

And below's logs for failure case (opc client code stops fetching code from opc server)

2016-07-01 21:37:08 DEBUG ClientChannelManager:208 - Scheduling reconnect for +0 seconds...
2016-07-01 21:37:08 DEBUG ClientChannelManager:211 - 0 seconds elapsed; reconnecting...
2016-07-01 21:37:08 DEBUG UaTcpClientAcknowledgeHandler:150 - Sent Hello message on channel=[id: 0xf4eab6a7, /172.18.0.5:47640 => /10.83.202.40:49320].
2016-07-01 21:37:08 DEBUG UaTcpClientAcknowledgeHandler:208 - Received Acknowledge message on channel=[id: 0xf4eab6a7, /172.18.0.5:47640 => /10.83.202.40:49320].
2016-07-01 21:37:08 DEBUG UaTcpClientMessageHandler:153 - OpenSecureChannel timeout scheduled for +5s
2016-07-01 21:37:08 DEBUG UaTcpClientMessageHandler:220 - Sent OpenSecureChannelRequest (Issue, id=0, currentToken=-1, previousToken=-1).
2016-07-01 21:37:08 DEBUG UaTcpClientMessageHandler:378 - OpenSecureChannel timeout canceled
2016-07-01 21:37:08 DEBUG UaTcpClientMessageHandler:422 - Received OpenSecureChannelResponse.
2016-07-01 21:37:08 DEBUG UaTcpClientMessageHandler:500 - SecureChannel id=118613, currentTokenId=1, previousTokenId=-1, lifetime=3600000ms, createdAt=DateTime{utcTime=131118825950971028, javaDate=Fri Jul 01 21:36:35 UTC 2016}
2016-07-01 21:37:08 DEBUG UaTcpClientMessageHandler:128 - 0 message(s) queued before handshake completed; sending now.
2016-07-01 21:37:08 DEBUG ClientChannelManager:178 - Channel bootstrap succeeded: localAddress=/172.18.0.5:47640, remoteAddress=/10.83.202.40:49320
2016-07-01 21:37:08 DEBUG ClientChannelManager:219 - Reconnect succeeded, channelId=118613
2016-07-01 21:37:11 DEBUG Logger:18 - ConfigurationManager.getFreshConfiguration
2016-07-01 21:37:11 DEBUG Logger:18 - EdgeConnection.getSensor host = 172.18.0.3 port = 8001

OSGi duplicate package export: sdk-core vs. sdk-server

Hello!

Both bundles sdk-server and sdk-core have
Export-Package: ... org.eclipse.milo.opcua.sdk.core, ...
in their OSGi headers, which leads to the following error when starting sdk-server in Karaf/Felix:

Error executing command: Error executing command on bundles:
    Error starting bundle 253: Uses constraint violation. Unable to resolve resource org.eclipse.milo.sdk-server [org.eclipse.milo.sdk-server [253](R 253.0)] because it exports package 'org.eclipse.milo.opcua.sdk.core' and is also exposed to it from resource org.eclipse.milo.sdk-core [org.eclipse.milo.sdk-core [278](R 278.0)] via the following dependency chain:

  org.eclipse.milo.sdk-server [org.eclipse.milo.sdk-server [253](R 253.0)]
    import: (&(osgi.wiring.package=org.eclipse.milo.opcua.sdk.core.model)(version>=0.1.0)(!(version>=1.0.0)))
     |
    export: osgi.wiring.package: org.eclipse.milo.opcua.sdk.core.model; uses:=org.eclipse.milo.opcua.sdk.core
    export: osgi.wiring.package=org.eclipse.milo.opcua.sdk.core
  org.eclipse.milo.sdk-core [org.eclipse.milo.sdk-core [278](R 278.0)] Unresolved requirements: [[org.eclipse.milo.sdk-server [253](R 253.0)] osgi.wiring.package; (&(osgi.wiring.package=org.eclipse.milo.opcua.sdk.core.model)(version>=0.1.0)(!(version>=1.0.0)))]

Looks like either that package import should be removed from sdk-server or sdk-server should be declared as a fragment bundle of sdk-core?

Subclassing is made difficult by private variables and final classes

Moving this from the "WeakReference" discussion. (I'll take a look at that fix as soon as I have a chance - at first glance it looks good. Does it include an exception chain?).

This is just a re-hashing of our philosophical differences, but I still find the library very frustrating to use because it's locked down with private variables and final classes. I'd like to do what I want to do with it, not what you think I should be able to do with it. But, they'd actually be one and the same if you'd loosen up the codebase somewhat.

My latest observation is that I have a use-case for subclassing Variant (which is marked final). In essence, I already have a type that duplicates the functionality of Variant. A Variant subclass could be created that would encapsulate that value and ensure that all type-conversions are in one place. (We created a Variant type in COM OPC that did exactly that).

Because Variant is final, I have to perform type conversion all over the code-base. This makes the code difficult to debug and hard to maintain (because the to/from conversion have to match). (Today's frustration is that I've just had make exactly that change and I'm not sure that I got all the places the conversions are performed - so I apologize if this is a bit of a rant, I am a little frustrated, but that's just today and I still do appreciate your efforts).

You benefit, in creating all the unsigned classes from the fact that java.lang.Number can be subclassed, but choose not to extend the power of subclassing in the OPCUA library.

I also contend that there will still be (even if I don't immediately have one) a use case for subclassing Nodes.

Server: Unable to write to node of type "Variant"

I just tried writing a String to a Variable Node of Type Variant, which fails with "Bad Type".

Debugging into "AttributeWriter.validateDataType" it comes up with a DataValue, which gets unboxed to Variant and then to String. But then the check tries to assign a String to the target Variant, which fails of course.

I would expect that it is possible to write "anything" to a node of type Variant.

Bad_NodeIdUnknown

Hello.
I'm trying to create a java opcua server based on your library. Since there is not much documentation I use the example from your previous project and try to add a SqrtMethod() to HelloWorld of Milo, so here is a modified addNodes() method of the HelloWorldNamespace.java

    private void addNodes(UaFolderNode folderNode) {
        for (Object[] os : STATIC_SCALAR_NODES) {
            String name = (String) os[0];
            NodeId typeId = (NodeId) os[1];
            Variant variant = (Variant) os[2];

        UaMethodNode methodNode = UaMethodNode.builder(server.getNodeManager())
        .setNodeId(new NodeId(namespaceIndex, "/Methods/sqrt(x)"))
        .setBrowseName(new QualifiedName(namespaceIndex, "sqrt(x)"))
        .setDisplayName(new LocalizedText(null, "sqrt(x)"))
        .setDescription(LocalizedText.english("Returns the correctly rounded positive square root of a double value."))
        .build();

        try {
            AnnotationBasedInvocationHandler invocationHandler=AnnotationBasedInvocationHandler.fromAnnotatedObject(server.getNodeManager(),new SqrtMethod());
            methodNode.setProperty(UaMethodNode.InputArguments,invocationHandler.getInputArguments());
            methodNode.setProperty(UaMethodNode.OutputArguments,invocationHandler.getOutputArguments());
            methodNode.setInvocationHandler(invocationHandler);            
            UaVariableNode node = new UaVariableNode.UaVariableNodeBuilder(server.getNodeManager())
                .setNodeId(new NodeId(namespaceIndex, "Methods/" + name))
                .setAccessLevel(ubyte(AccessLevel.getMask(AccessLevel.READ_WRITE)))
                .setBrowseName(new QualifiedName(namespaceIndex, name))
                .setDisplayName(LocalizedText.english(name))
                .setDataType(typeId)
                .setTypeDefinition(Identifiers.BaseDataVariableType)
                .build();

            node.setValue(new DataValue(variant));

            server.getNodeManager().addNode(node);
            server.getNodeManager().addNode(methodNode);
            folderNode.addOrganizes(node);
            folderNode.addOrganizes(methodNode);

            folderNode.addReference(new Reference(folderNode.getNodeId(),Identifiers.HasComponent,methodNode.getNodeId().expanded(),methodNode.getNodeClass(),true));
            } catch (Exception e) {
                logger.error("Error creating sqrt() method.",e);
            }
        }
    }

The class for SqrtMethod is:

public class SqrtMethod {

    private final Logger logger = LoggerFactory.getLogger(getClass());

    @UaMethod
    public void invoke(
            InvocationContext context,

            @UaInputArgument(
                    name = "x",
                    description = "A value.")
            Double x,

            @UaOutputArgument(
                    name = "x_sqrt",
                    description = "The positive square root of x. If the argument is NaN or less than zero, the result is NaN.")
            Out<Double> xSqrt) {

        System.out.println("sqrt(" + x.toString() + ")");
        logger.debug(String.format("Invoking sqrt() method of Object '%s'", context.getObjectNode().getBrowseName().getName()));

        xSqrt.set(Math.sqrt(x));
    }

}

To connect to the server I use Prosys OPC UA Java Client and when I try to call the appropriate method with this client I get:
Failed to call:Bad_NodeIdUnknown (0x80340000) "The node id refers to a node that does not exist in the server address space."

Since variables work correctly and I never had any issues with Prosys I assume something is wrong with your software. Can you please help to solve it? Thanks.

Read values of datatype 5

Hi,
i have a method to read different NodeIDs:

public DataValue readNode(NodeId nodeID) throws InterruptedException, ExecutionException {
    VariableNode node = client.getAddressSpace().createVariableNode(nodeID);
    DataValue value = node.readValue().get();
    return value;
}

My aim is to read the values as String or Integer. The most nodes are ok. But I have some nodes which have an other datatype e.g.:
System.out.println(ua.readNode("node").getValue());
-->Variant{value=[4]}
System.out.println(ua.readNode("node").getValue().getDataType().hashCode());
--> 5
System.out.println(ua.readNode("node").getValue().getValue().toString());
--> [Lorg.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;@6a2b953e

How can i read values of datatype 5 or rather values in [*] ?

OpenSecureChannelResponse: no decoder registered for encodingId=NodeId{ns=0, id=449}

When running the client library from a JAR in Ubuntu 16.04.1 within Oracle 1.8.0_101-b13 I get:

ERROR o.e.m.o.s.c.h.UaTcpClientMessageHandler - Error decoding OpenSecureChannelResponse: no decoder registered for encodingId=NodeId{ns=0, id=449}
org.eclipse.milo.opcua.stack.core.UaSerializationException: no decoder registered for encodingId=NodeId{ns=0, id=449}

This only occurs when running the library from the JAR, it does NOT occur if I run the library from the debugger (i.e. individually referencing the jars from the maven directory, it works).

Delving into the issue, it seems to relate to:
classPath.getTopLevelClasses("org.eclipse.milo.opcua.stack.core.types.structured");
in DelegateRegistry.

After a little more digging, I saw that the Guava ClassPath is annotated with @beta. I then went back to check the doco and found:

"It's worth noting that ClassPath is a best-effort utility. It only scans classes in jar files or under a file system directory. Neither can it scan classes managed by custom class loaders that aren't URLClassLoader. So don't use it for mission critical production tasks."

I am not using a custom class loader so decided to look into this class. Long story short, it seems quite brittle. So I did a little research and found https://github.com/ddopson/java-class-enumerator which is under a WTFPL license :-).

I have done a fix which I will commit and do a pull request. Let me know if you need any additional info.

NullPointerException in SessionManager

We have logs that report this exception for a while, but then seem to work correctly. I may be able to run the OPC UA client that generated this if the cause is not obvious.

Uncaught Throwable executing ServiceRequestHandler: org.eclipse.milo.opcua.stack.core.application.UaStackServer$$Lambda$39/7373020@19f53f1
java.lang.NullPointerException
at org.eclipse.milo.opcua.sdk.server.SessionManager.validatePolicyId(SessionManager.java:511)
at org.eclipse.milo.opcua.sdk.server.SessionManager.validateIdentityToken(SessionManager.java:490)
at org.eclipse.milo.opcua.sdk.server.SessionManager.onActivateSession(SessionManager.java:452)
at org.eclipse.milo.opcua.stack.server.tcp.UaTcpStackServer.receiveRequest(UaTcpStackServer.java:241)
at org.eclipse.milo.opcua.stack.server.handlers.UaTcpServerSymmetricHandler.lambda$null$3(UaTcpServerSymmetricHandler.java:188)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

XMLDecoder.decodeExpandedNodeId not implemented

Hi,
I tried to use the internal XmlEncoder/XmlDecoder function to serialize and unserialize ReferenceDescription objects. Not sure if there is a better way but my work around fails on
org.eclipse.milo.opcua.stack.core.serialization.xml.XmlDecoder.XmlDecoder.decodeExpandedNodeId which returns null.

    String sample =
        "<ReferenceDescription><ReferenceTypeId><Identifier>ns=0;i=46</Identifier></ReferenceTypeId><IsForward>true</IsForward><NodeId><Identifier>svr=0;i=2994</Identifier></NodeId><BrowseName><NamespaceIndex>0</NamespaceIndex><Name>Auditing</Name></BrowseName><DisplayName><Locale></Locale><Text>Auditing</Text></DisplayName><TypeDefinition><Identifier>svr=0;i=68</Identifier></TypeDefinition></ReferenceDescription>";
    XmlDecoder decoder = new XmlDecoder(new StringReader(sample));
    // skip root element
    decoder.decodeQualifiedName("<>");
    ReferenceDescription rd = ReferenceDescription.decode(decoder);

    assertNotNull(rd);
    assertNotNull(rd.getTypeId());
    assertEquals(Boolean.TRUE, rd.getIsForward());
    // not decoded
    assertNotNull(rd.getNodeId());

"sdk-server" exports "org.eclipse.milo.opcua.sdk.core"

As @JulianSchuette explained issue #59 the "sdk-server" project exports "org.eclipse.milo.opcua.sdk.core". While this doesn't matter in plain Java, it matters when using OSGi. Since each package should only be exported by one single bundle (aka JAR).

There two workarounds to this (like using bundle imports or going with fragments) however this seems overkill to me.

@kevinherron Could we either rename the package "org.eclipse.milo.opcua.sdk.core" or ".server" or move it into the "sdk-core" package.

Reconnect attempts stops already on the first try

I'm currently trying to handle the resubscribtion with either SessionActivityListener or SubscribtionListener but after my tests I noticed that the reconnction logic is not as reliable as I would expect it to be. I would expect the client would always retry to reconnect to the server, does not matter what kind of exception occurs.

Sometimes the reconnection works but most of the time it doesn't.

What I did:

  1. connected the client to the server
  2. created a subscribtion with monitored items
  3. restarted the opcua server
  4. getting the following message from the console:
Fein:   Scheduling reconnect for +0 seconds...
Information:   onSessionInActive
Fein:   0 seconds elapsed; reconnecting...
Fein:   Channel bootstrap failed: Connection refused: no further information: <Computer>/<ipaddress>4840
java.net.ConnectException: Connection refused: no further information: <Computer>/<ipaddress>4840
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:224)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:289)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:545)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:485)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:399)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:371)
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
	at java.lang.Thread.run(Thread.java:745)

Fein:   Reconnect failed: Connection refused: no further information: <Computer>/<ipaddress>4840
java.net.ConnectException: Connection refused: no further information: <Computer>/<ipaddress>4840
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:224)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:289)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:545)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:485)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:399)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:371)
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
	at java.lang.Thread.run(Thread.java:745)

Fein:   disconnect complete, state set to Idle
Fein:   Channel bootstrap failed: Connection refused: no further information: <Computer>/<ipaddress>4840
java.net.ConnectException: Connection refused: no further information: <Computer>/<ipaddress>4840
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:224)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:289)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:545)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:485)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:399)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:371)
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
	at java.lang.Thread.run(Thread.java:745)

Afterwards neither the SubscribtionListener or the SessionActivityListener get called.

I guess the issue could be caused by a dead lock. But I'm not sure whether the cause is the milo-sdk or my environment. The reason why I think it is a kind of dead lock is, I deployed my client to a javaee application server, when I noticed the dead lock behaviour I disabled the client and then the log printed out the session active and subscribtion transfer failed events.

Server startup can hang due to DNS

In the constructor of OpcUaServer the hostnames are evaluated by:

 for (String bindAddress : config.getBindAddresses()) {
            Set<String> hostnames = Sets.union(
                newHashSet(configuredHostname),
                getHostnames(bindAddress));

            for (String hostname : hostnames) {
…
            }
}

However the call to getHostnames(bindAddress)); can block for quite a while if the DNS resolution is slow.

Best practice to observe the connection state

What would be the best way to observe the state of the client connection ?
Or better, what would be the best way to notice whether a subscribtion transfer failed after reconnecting to the server and handle the re-subscription of items ?

I notice in my test, that the client retries to connect to the server after the connection gets lost, but fails to transfer the subscribtion because the subscribtion id is not valid anymore to the server (Beckhoff OpcUa Server).

I looked into the code but could not find a convenient way to listen to the connection state. The sdk provides the registration of service fault listener, session and subscribtion listener. I seems like I could use the session and subscribtion listener to build some kind of a state mashine and re-subscribe according to the state, but wanted to know whether the a more convenient way, which I missed to see ?

If there is not such a convenient way to listen to changes to the connection state I would like to suggest to integrate some kind of an connection state listener interface.

Maven issues

org.eclipse.milo sdk-client 0.1.0-SNAPSHOT

Cannot find the version described in your Readme...

Please Update Maven-Snapshots

Hello developers,
thank you for your work and publishing an open source version of OPC-UA in JAVA.
I started experimenting with milo today and had some troubles using the client examples. I set up a maven project and added all dependencies described on main page. But it came to errors using the client-examples classes because some methods are missing in the current snapshots. After pulling this repository and packaging it myself it worked. Could you please update the current snapshots or update the README.md .
Thank you :)
Best regards
Christian

Issue while running as a docker container

I am trying to dockerize OPC UA Server implementation
I have a OPC UA client running on a different host .

However, i am facing issues with the setBindAddresses.
When i am using 0.0.0.0 , following binding is taking place

Binding endpoint opc.tcp://66466b702420:12687 to 0.0.0.0 [None/None]
Binding endpoint opc.tcp://localhost:12687 to 0.0.0.0 [None/None]
Binding endpoint opc.tcp://172.18.0.4:12687 to 0.0.0.0 [None/None]
Binding endpoint opc.tcp://127.0.0.1:12687 to 0.0.0.0 [None/None]

172.18.0.4 is docker container ip (obviously not accessible outside host)

As you can see all binding ips are internal ips and not accessible outside host.
So OPC UA Client is not able to discover OPC UA Server.

Only way i get it working is pass container name (container host name) in the setBindAddresses
then the binding becomes
Binding endpoint opc.tcp://containername:12687 to containername [None/None] and on the host which is running OPC UA Client . i added a entry on /etc/hosts/
mapping containername to

I am hoping for a more cleaner solution?

Create CI job at HIPP instance

I do think it is time to create a Hudson (yes I know) job at your HIPP instance.

This would be a simple "Invoke Maven 3" job with clean install deploy. This would automatically push to the Nexus OSS repository, since you project is already set up for this.

If you like, I can help you setting this up, but you need to create the Hudson job.

Wiki Update

It would be really helpful if you can update wiki on how to use the library. I would also suggest you to add your example application to this repo as well. It would definitely be helpful to other developers.

NegativeArraySizeException decoding Variant

It seems some stacks are encoding a null array value inside a Variant by setting the array length flag and using a -1 array length rather than just encoding the variant as a null value by setting no flags at all. BinaryDecoder needs to handle this properly.

strictEndpointUrlsEnabled doesn't work anymore

It used to be that SocketServers.getServer(), in the case that there was just one server on a host, would return that server even if no path is specified, as long as strictEndpointUrlsEnabled was false. That behavior seems to have gone away, but the documentation on UaTcpStackServerConfig still seems to say it should work.

Let the SubscriptionListener provide empty default methods

I think it would be nice to either have the SubscriptionListener provide empty default methods or to have a DefaultSubscriptionListener which implements the interface with empty methods.

This makes is easier when you only need one method to be called.

How to determine the namespace of an given identifier

I'm trying to figure out, whether there is a convenient way to determine the namespace or better the NodeId of an data point (DataValue) if only the associated identifier is provided ?

For my use case those opc ua namespaces are more annoying instead of convenient :/

Another question: Is it actually specified that DataValue should not have the associated identifier/nodeId ?

NPE in OpcUaSubscriptionManager

There's a NPE occurring when the AvailableSequenceNumbers array in a PublishResponse is null rather than empty.

java.lang.NullPointerException: null
    at org.eclipse.milo.opcua.sdk.client.subscriptions.OpcUaSubscriptionManager.onPublishComplete(OpcUaSubscriptionManager.java:416)
    at org.eclipse.milo.opcua.sdk.client.subscriptions.OpcUaSubscriptionManager.lambda$null$12(OpcUaSubscriptionManager.java:350)
    at org.eclipse.milo.opcua.stack.core.util.ExecutionQueue$PollAndExecute.run(ExecutionQueue.java:107)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Receiving Bad_TooManyPublishRequests in the Logger

I get a lot of Bad_TooManyPublishRequests messages. I want to know what causes this issue ? Do I have to change settings in the milo client, i.e. the subscribtion settings, or do I have to configure the used opc ua server ? How do I avoid this issues or is it not that critical?

Implementation of equals/hashCode in DataValue class

I'm currently using Mockito in a project. My OPC client looks like this:

public class OpcClient {
    public StatusCode writeSync(NodeId nodeId, DataValue value) {
        // some logic
    }
}

The OpcClient is used in the following service:

public class MyService {
    private final OpcClient opcClient;
    public MyService(OpcClient opcClient) {
        this.opcClient = opcClient;
    }

    public StatusCode writeBoolean(NodeId nodeId, boolean value) {
        Variant variant = new Variant(new Boolean(value));
        DataValue value = new DataValue(variant, StatusCode.GOOD, new DateTime(0), new DateTime(0));
        return opcClient.writeSync(nodeId, value);
    }
}

My test method looks like this:

@Test
public void writeSync() {
    NodeId nodeId = new NodeId(3, 1234);
    Variant variant = new Variant(new Boolean(false));
    DataValue value = new DataValue(variant, StatusCode.GOOD, new DateTime(0), new DateTime(0));

    OpcClient opcClient = mock(OpcClient.class);
    when(opcClient.writeSync(nodeId, value)).thenReturn(StatusCode.GOOD);

    MyService service = new MyService(opcClient);
    StatusCode statusCode = service.writeBoolean(nodeId, false);

    assertEquals(StatusCode.GOOD, statusCode);
}

Unfortunately the class DataValue doesn't implement the methods equals() and hashCode() (they are used by Mockito to check equality of the passed parameters), so service.writeBoolean(nodeId, false) will return null because the values are not the "same".

Can you implement the methods equals() and hashCode() for this purpose?

Provide code formatter settings for automatic code formatting

Now I do know that you can argue about code formatting for ages ... Therefore I think it would be huge benefit to the project if there would be some completely automatic way of doing code formatting.

Eclipse JDT does provide a code formatter, but I also do know that it has some quirks. And then again if you did not have automatic code formatting up to now, there are several inconsistencies in the source code as well.

So there won't be a code formatter which does output exactly the same source code as without.

Support X509 Identities

Right now it's possible to use an X509IdentityToken by implementing your own IdentityProvider but the client SDK should provide this for the user.

Performance Test

Hi,

are there any performance tests for OPC UA in general (and for your implemantion of the opc ua stack)?

Greetings

BindAddress listening on wrong IP

In the OpcUaServerConfig you can set the bind address with:

(simplified as array instead of list)
.setBindAddresses([])

If I use setBindAddresses(["localhost"]) the server listens on:

[main] INFO org.domain.UaServer - startDiscoveryServer()
[main] INFO org.eclipse.milo.opcua.sdk.server.namespaces.OpcUaNamespace - Loaded nodes in 418ms.
[main] INFO org.eclipse.milo.opcua.sdk.server.NamespaceManager - added namespace index=0, uri=http://opcfoundation.org/UA/
[main] INFO org.eclipse.milo.opcua.sdk.server.NamespaceManager - registered and added namespace index=1, uri=urn:domain:opcua:discovery:server
[main] INFO org.eclipse.milo.opcua.sdk.server.OpcUaServer - Binding endpoint opc.tcp://my-host:4840 to localhost [None/None]
[main] INFO org.eclipse.milo.opcua.sdk.server.OpcUaServer - Binding endpoint opc.tcp://localhost:4840 to localhost [None/None]
[main] INFO org.eclipse.milo.opcua.sdk.server.OpcUaServer - Binding endpoint opc.tcp://127.0.0.1:4840 to localhost [None/None]
[main] INFO org.eclipse.milo.opcua.sdk.server.OpcUaServer - eclipse milo opc-ua stack version: dev
[main] INFO org.eclipse.milo.opcua.sdk.server.OpcUaServer - eclipse milo opc-ua sdk version: dev
[main] INFO org.eclipse.milo.opcua.sdk.server.NamespaceManager - registered and added namespace index=2, uri=urn:eclipse:milo:opcua:test-namespace
[main] INFO org.eclipse.milo.opcua.stack.server.tcp.UaTcpStackServer - opc.tcp://my-host:4840 bound to /127.0.0.1:4840 [None/None]
[main] INFO org.eclipse.milo.opcua.stack.server.tcp.UaTcpStackServer - opc.tcp://localhost:4840 bound to /127.0.0.1:4840 [None/None]
[main] INFO org.eclipse.milo.opcua.stack.server.tcp.UaTcpStackServer - opc.tcp://127.0.0.1:4840 bound to /127.0.0.1:4840 [None/None]

As you can see it also listens on opc.tcp://my-host:4840 but bound to 127.0.0.1:4840.

Imho this is a wrong behavior, because then the endpoint discovery URLs also contain this entry, but if then use a connect to this URL, it can't connect, because it doesn't take the loopback on linux, but eth0, and since it is bound to 127.0.0.1, it can't connect.

The correct way here would be to either do not add this entry (because the developer said that he only wants to listen to localhost) or bind it to 0.0.0.0:4840

The same happens if I use setBindAddresses(["my-host"]), here it should definitely also bind to 0.0.0.0:4840

What is the difference between setValueConsumer and setEventConsumer

I'm trying to understand what the difference is between the two mentioned method calls.

if I look at the consumer declaration of the setEventConsumer, it seems like there is no designated event structure, because the consumer will get an Variant[] array.

I guess the Variant[] array contains attribute values of the UaMonitoredItem, like sourcetimestamp, servertimestamp, writemask an so on ?

And the setValueConsumer does only listen to value changes of the UaMonitoredItem ?

Possible event loss on monitored item

I have to admit, I am not 100% sure if I am correct on this one.

The following code is in the class OpcUaSubscriptionManager

void onValueArrived(DataValue value) {
   BiConsumer<UaMonitoredItem, DataValue> c = valueConsumer;
   if (c != null) c.accept(this, value);
}

And items are subscribed using the following pattern (from OpcUaClientIT):

 List<UaMonitoredItem> items = subscription.createMonitoredItems(TimestampsToReturn.Both, newArrayList(request)).get();

// do something with the value updates
UaMonitoredItem item = items.get(0);

CompletableFuture<DataValue> f = new CompletableFuture<>();
item.setValueConsumer(f::complete);

Now this seems to me like a non-atomic two step approach. Between the call to "create" and setValueConsumer the valueConsumer would be null and thus onValueArrived would not fire.

It seems to me that this may cause the first event to be lost.

WeakReference<AttributeObserver>>

Is there some reason for using a WeakReference for AttributeObservers? I can think of a number of use-cases where there's a one-to-one relationship between a node and an AttributeObserver and no reason (other than the WeakReference) for any other instance to hold a reference.

How to convert ExpandedNodeId to NodeId ?

I'm trying to browse recursively the server address space using OpcUaClient.browse(). I cannot figure out what is the correct way to create a NodeId from ExpandedNodeId that is returned in BrowseResult.getReferences().

Things seem to work (with Kepware) when I use NodeId.parse() with suitable string created
from ExpandedNodeId values, but I think that is not the correct way to do it.

An example for browsing the server address space in client would be great.

Provide static instance for AnonymousIdentityValidator

What do you think about having a static instance for AnonymousIdentityValidator. As of now this class doesn't hold any state. So we could have

public static final IdentityValidator INSTANCE = new AnonymousIdentityValidator ();

And then use it as:

cfg.setIdentityValidator(AnonymousIdentityValidator.INSTANCE);

Always build source attachments

Currently the build only generates javadoc and source attachments when the "release" profile is active.

I would suggest to always generate the source and javadoc attachments so that it is possible to work with the source code in the case of -SNAPSHOT versions.

Write operation fails with the message Bad_WriteNotSupported

After a while I started again with the evaluation of this library. My previous issue seems to be resolved.
But now when I try to change a value on the Beckhoff-OPCUA-Server it fails with the message Bad_WriteNotSupported, even if the variable is set to readable and writable. I tried the Beckhoff OPCUA-Client and the write operation worked fine and I'm able to read the value of the variable with the milo opcua client (read-operation works fine, but not the write operation).

The Test-case in the milo project works fine too. So I'm not sure what could actually be the cause for this issue.

My Test-case looks as follows:

`Test
public void lowlevelTest() throws InterruptedException,
ExecutionException {

    final OpcUaClient opcUaclient = UaTcpStackClient.getEndpoints("opc.tcp://localhost:4840")
            .thenApply(endPoints -> {
                EndpointDescription endpoint = Arrays.stream(endPoints)
                        .filter(e -> e.getSecurityPolicyUri().equals(SecurityPolicy.None.getSecurityPolicyUri()))
                        .findFirst()
                        .orElseThrow(() -> new RuntimeException("no desired endpoints return from the opcua server!"));
                OpcUaClientConfig clientConfig = OpcUaClientConfig.builder()
                        .setApplicationName(LocalizedText.english("test opcua client"))
                        .setApplicationUri("urn:test:opcua:client")
                        .setEndpoint(endpoint)
                        .setRequestTimeout(uint(60000))
                        .setExecutor(Executors.newCachedThreadPool())
                        .build();
                return new OpcUaClient(clientConfig);
            })
            .get();
    final NodeId nodeId = new NodeId(7, "GlobalData.AirConditioning.Config.T_on");
    final DataValue before = opcUaclient.readValue(0, TimestampsToReturn.Both, nodeId)
            .get();
    System.out.println(MessageFormat.format("before write value: {0}", before));

    final StatusCode statusCode = opcUaclient.writeValue(nodeId, new DataValue(new Variant(32f))).get();

    Assert.assertTrue(statusCode.toString(), statusCode.isGood());

    final DataValue after = opcUaclient.readValue(0, TimestampsToReturn.Both, nodeId)
            .get();

    System.out.println(MessageFormat.format("after write value: {0}", after));

    Assert.assertThat(after.getValue().getValue(), not(is(before.getValue().getValue())));
}`

The assertion regarding the StatusCode fails.

java.lang.AssertionError: StatusCode{name=Bad_WriteNotSupported, value=0x80730000, quality=bad} at org.junit.Assert.fail(Assert.java:93) at org.junit.Assert.assertTrue(Assert.java:43) at com.milo.opcua.MiloOpcUaClientNGTest.lowlevelTest(MiloOpcUaClientNGTest.java:151)

I'm testing the most recent master branch.

Implement some way to "clone" builders

Setting up a builder like OpcUaClientConfigBuilder takes "a few" parameters and method calls.

It would be nice to have either a "clone" method or a "copy constructor" in the builder pattern so that there is no need to do it all over again when only one parameter needs to be changed but you want to keep a mutable instance.

Subscribtion fails if a ManagedExecutorService is provided

Hello,

I'm trying to get my opcua client to work in a JavaEE environment and want to provide a ManagedExecutorService instead of an simple JavaSE ExecutorService, to avoid a possible memory leak. It is recommanded to use ManagedExecutorServices in JavaEE environments, but the connection to the opcua server fails during the creation of a subscribtion with the following exception:

Caused by: UaException: status=Bad_Timeout, message=timed out waiting for secure channel at org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientMessageHandler.lambda$handlerAdded$2(UaTcpClientMessageHandler.java:140) at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:581) at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:655) at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:367) ... 1 more

Do you have an idea, what would cause this exception ?

If I use a JavaSE or don't provide any ExecutorService, everything works fine, but after undepolying my application I get warnings:

The web application [/web-app] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@9e7c533]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@5e58365]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

"java.lang.RuntimeException: Method code too large!" when building Eclipse Milo

It looks like jacoco is not happy with some fairly large classes in the codebase when trying to instrument them. This is not making the build fail but it makes for some "scary" traces in the build log :)

[main] INFO org.eclipse.milo.opcua.sdk.client.OpcUaClientIT - startClientAndServer()
java.lang.instrument.IllegalClassFormatException: Error while instrumenting class org/eclipse/milo/opcua/stack/core/Identifiers.
    at org.jacoco.agent.rt.internal_4236f75.CoverageTransformer.transform(CoverageTransformer.java:93)
    at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
    at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.eclipse.milo.opcua.stack.core.types.structured.UserTokenPolicy.<clinit>(UserTokenPolicy.java:28)
    at org.eclipse.milo.opcua.sdk.server.api.config.OpcUaServerConfig.<clinit>(OpcUaServerConfig.java:33)
    at org.eclipse.milo.opcua.sdk.client.OpcUaClientIT.startClientAndServer(OpcUaClientIT.java:104)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:514)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:215)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
    at org.testng.TestRunner.beforeRun(TestRunner.java:656)
    at org.testng.TestRunner.run(TestRunner.java:624)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
    at org.testng.SuiteRunner.run(SuiteRunner.java:268)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
    at org.testng.TestNG.run(TestNG.java:1064)
    at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:132)
    at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:112)
    at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99)
    at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:147)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.io.IOException: Error while instrumenting class org/eclipse/milo/opcua/stack/core/Identifiers.
    at org.jacoco.agent.rt.internal_4236f75.core.instr.Instrumenter.instrumentError(Instrumenter.java:152)
    at org.jacoco.agent.rt.internal_4236f75.core.instr.Instrumenter.instrument(Instrumenter.java:103)
    at org.jacoco.agent.rt.internal_4236f75.CoverageTransformer.transform(CoverageTransformer.java:91)
    ... 43 more
Caused by: java.lang.RuntimeException: Method code too large!
    at org.jacoco.agent.rt.internal_4236f75.asm.MethodWriter.getSize(MethodWriter.java:2036)
    at org.jacoco.agent.rt.internal_4236f75.asm.ClassWriter.toByteArray(ClassWriter.java:827)
    at org.jacoco.agent.rt.internal_4236f75.core.instr.Instrumenter.instrument(Instrumenter.java:84)
    at org.jacoco.agent.rt.internal_4236f75.core.instr.Instrumenter.instrument(Instrumenter.java:101)
    ... 44 more

Example for subscribing a node

Can you please add an example to how to create a subscription on a node? Or maybe update your wiki in how to use the sdk..

Thx!

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.