Async20Access running fail after ~ 20 minutes

177 views
Skip to first unread message

Dmitry Egorov

unread,
Sep 3, 2015, 11:28:17 AM9/3/15
to openSCADA
Hi all!

We plan to use Utgard for our project.
To test async functional run follow sample: 
public class UtgardTutorial1 {

  public static void main( String[] args )
      throws Exception {
    // create connection information
    final ConnectionInformation ci = new ConnectionInformation();
    ci.setHost( "localhost" );
    // ci.setDomain( "localhost" );
    ci.setUser( "opc" );
    ci.setPassword( "1" );
    // ci.setProgId( "Graybox.Simulator" );
    ci.setClsid( "2C2E36B7-FE45-4A29-BF89-9BFBA6A40857" ); // if ProgId is not working, try it using the Clsid
    // instead
    final String itemId = "numeric.sin.float";
    // create a new server
    final Server server = new Server( ci, Executors.newSingleThreadScheduledExecutor() );

    try {
      // connect to server
      server.connect();
      // add sync access, poll every 500 ms
      final AccessBase access = new Async20Access( server, 1000, false );
      access.addItem( itemId, new DataCallback() {

        @Override
        public void changed( Item item, ItemState state ) {
          System.out.println( item.getId() + " = " + state.getValue().toString() );
        }
      } );
      // start reading
      access.bind();
      // wait a little bit
      Thread.sleep( Long.MAX_VALUE );
     
      // stop reading
      access.unbind();
    }
    catch( final JIException e ) {
      System.out.println( String.format( "%08X: %s", e.getErrorCode(), server.getErrorMessage( e.getErrorCode() ) ) );
    }
  }
}
 but after 20 minutes i get get exception and method DataCallback::change stop calling
Exception:
19:12:46.266 [jI_RemUnknown[00000000-0000-0000-c000-000000000046 , L(56296):R(56297)]] WARN  o.j.dcom.core.JIComOxidRuntimeHelper - JIComOxidRuntimeHelper RemUnknownThread (not listener)jI_RemUnknown[00000000-0000-0000-c000-000000000046 , L(56296):R(56297)] is purposefully closed by interruption.
java.nio.channels.ClosedByInterruptException: null
at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202) ~[na:1.8.0_25]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:406) ~[na:1.8.0_25]
at sun.nio.ch.SocketAdaptor$SocketInputStream.read(SocketAdaptor.java:192) ~[na:1.8.0_25]
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103) ~[na:1.8.0_25]
at org.jinterop.dcom.transport.JIComRuntimeTransport.receive(Unknown Source) ~[org.openscada.jinterop.core_2.0.8.201303051454.jar:na]
at rpc.DefaultConnection.receiveFragment(Unknown Source) ~[org.openscada.jinterop.deps_1.0.0.201303051454.jar:na]
at rpc.DefaultConnection.receive(Unknown Source) ~[org.openscada.jinterop.deps_1.0.0.201303051454.jar:na]
at rpc.ConnectionOrientedEndpoint.receive(Unknown Source) ~[org.openscada.jinterop.deps_1.0.0.201303051454.jar:na]
at org.jinterop.dcom.transport.JIComRuntimeEndpoint.processRequests(Unknown Source) ~[org.openscada.jinterop.core_2.0.8.201303051454.jar:na]
at org.jinterop.dcom.core.JIComOxidRuntimeHelper$2$1.run(Unknown Source) [org.openscada.jinterop.core_2.0.8.201303051454.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25]
19:12:46.269 [jI_RemUnknownListener[00000000-0000-0000-c000-000000000046 , 56296]] INFO  o.j.dcom.core.JIComOxidRuntimeHelper - JIComOxidRuntimeHelper RemUnknownListenerjI_RemUnknownListener[00000000-0000-0000-c000-000000000046 , 56296] is purposefully closed by interruption.
java.nio.channels.ClosedByInterruptException: null
at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202) ~[na:1.8.0_25]
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:248) ~[na:1.8.0_25]
at sun.nio.ch.ServerSocketAdaptor.accept(ServerSocketAdaptor.java:100) ~[na:1.8.0_25]
at org.jinterop.dcom.core.JIComOxidRuntimeHelper$2.run(Unknown Source) [org.openscada.jinterop.core_2.0.8.201303051454.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25]
Any idea?
Thanks in advice!
   Sincerely Dmitry Egorov/

Jens Reimann

unread,
Sep 3, 2015, 11:36:25 AM9/3/15
to openSCADA

Hi,

This means that the connection (TCP) got closed.

In general, async using DCOM is not a good idea. I would suggest to use sync instead.

Jens

--
You received this message because you are subscribed to the Google Groups "openSCADA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openscada+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dmitry Egorov

unread,
Sep 3, 2015, 11:43:53 AM9/3/15
to openSCADA
Thanks for answer, Jens.
We use both sync and async fuctionality.
No question for Utgard sync (we use it in last project), but now we need sync & async both
Is async fuctional is not ready for real life projects?

четверг, 3 сентября 2015 г., 18:36:25 UTC+3 пользователь Jens Reimann написал:

Dmitry Egorov

unread,
Sep 3, 2015, 11:56:14 AM9/3/15
to openSCADA
We in previous project use commecial solution (JOPCClient) and have no problem on async access

четверг, 3 сентября 2015 г., 18:43:53 UTC+3 пользователь Dmitry Egorov написал:

이상부

unread,
Oct 20, 2015, 1:53:25 PM10/20/15
to openSCADA
I have the same error occurs . Are there any solutions ?

2015년 9월 4일 금요일 오전 12시 56분 14초 UTC+9, Dmitry Egorov 님의 말:

이상부

unread,
Oct 20, 2015, 1:54:14 PM10/20/15
to openSCADA
my error is....

[2015-10-21 02:52:41] [AGENT] [WARN] [JIComOxidRuntimeHelper] [92] Oxid Resolver Thread/run 
java.io.IOException: Socket Closed
at rpc.DefaultConnection.receiveFragment(DefaultConnection.java:393)
at rpc.DefaultConnection.receive(DefaultConnection.java:87)
at rpc.ConnectionOrientedEndpoint.receive(ConnectionOrientedEndpoint.java:250)
at org.jinterop.dcom.transport.JIComRuntimeEndpoint.processRequests(JIComRuntimeEndpoint.java:94)
at org.jinterop.dcom.core.JIComOxidRuntimeHelper$1.run(JIComOxidRuntimeHelper.java:88)
at java.lang.Thread.run(Thread.java:745)


[2015-10-21 02:39:09] [AGENT] [WARN] [JIComOxidRuntimeHelper] [164] JIComOxidRuntimeHelper RemUnknownThread (not listener)jI_RemUnknown[00000000-0000-0000-c000-000000000046 , L(23926):R(23927)] is purposefully closed by interruption. 
java.nio.channels.ClosedByInterruptException
at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:412)
at sun.nio.ch.SocketAdaptor$SocketInputStream.read(SocketAdaptor.java:203)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103)
at org.jinterop.dcom.transport.JIComRuntimeTransport.receive(JIComRuntimeTransport.java:147)
at rpc.DefaultConnection.receiveFragment(DefaultConnection.java:215)
at rpc.DefaultConnection.receive(DefaultConnection.java:87)
at rpc.ConnectionOrientedEndpoint.receive(ConnectionOrientedEndpoint.java:250)
at org.jinterop.dcom.transport.JIComRuntimeEndpoint.processRequests(JIComRuntimeEndpoint.java:94)
at org.jinterop.dcom.core.JIComOxidRuntimeHelper$2$1.run(JIComOxidRuntimeHelper.java:150)
at java.lang.Thread.run(Thread.java:745)

2015년 10월 21일 수요일 오전 2시 53분 25초 UTC+9, 이상부 님의 말:

Dmitry Egorov

unread,
Oct 20, 2015, 2:12:06 PM10/20/15
to openSCADA
We cancel to use openSCADA and choose JEasyOPC.

вторник, 20 октября 2015 г., 20:54:14 UTC+3 пользователь 이상부 написал:
Reply all
Reply to author
Forward
0 new messages