2017-04-10 24 views
0

node-opcua 패키지를 사용하여 몇 개의 nodeIds에 대한 설정 모니터링이 있습니다. 잠시 동안 제대로 작동하지만 시간 초과 메시지가 인쇄되기 시작했습니다.node-opcua "트랜잭션 시간 초과"

여기 내 서비스의 journalctl 출력입니다 :

Apr 07 08:02:02 test-machine myservice[559]: Timeout .... waiting for response for ReadRequest { /*RequestHeader*/ 
Apr 07 08:02:02 test-machine myservice[559]: authenticationToken   /* NodeId       */: ns=0;i=50 
Apr 07 08:02:02 test-machine myservice[559]: timeStamp      /* UtcTime       */: 2017-04-07T15:01:02.501Z 
Apr 07 08:02:02 test-machine myservice[559]: requestHandle     /* IntegerId      */: 334    0x14e 
Apr 07 08:02:02 test-machine myservice[559]: returnDiagnostics    /* UInt32       */: 0    0x0 
Apr 07 08:02:02 test-machine myservice[559]: auditEntryId     /* UAString       */: 
Apr 07 08:02:02 test-machine myservice[559]: timeoutHint     /* UInt32       */: 0    0x0 
Apr 07 08:02:02 test-machine myservice[559]: additionalHeader    /* ExtensionObject     */: null 
Apr 07 08:02:02 test-machine myservice[559]: }; 
Apr 07 08:02:02 test-machine myservice[559]: warning : Transaction has timed out 
Apr 07 08:02:15 test-machine myservice[559]: Timeout .... waiting for response for ReadRequest { /*RequestHeader*/ 
Apr 07 08:02:15 test-machine myservice[559]: authenticationToken   /* NodeId       */: ns=0;i=50 
Apr 07 08:02:15 test-machine myservice[559]: timeStamp      /* UtcTime       */: 2017-04-07T15:01:15.835Z 
Apr 07 08:02:15 test-machine myservice[559]: requestHandle     /* IntegerId      */: 335    0x14f 
Apr 07 08:02:15 test-machine myservice[559]: returnDiagnostics    /* UInt32       */: 0    0x0 
Apr 07 08:02:15 test-machine myservice[559]: auditEntryId     /* UAString       */: 
Apr 07 08:02:15 test-machine myservice[559]: timeoutHint     /* UInt32       */: 0    0x0 
Apr 07 08:02:15 test-machine myservice[559]: additionalHeader    /* ExtensionObject     */: null 
Apr 07 08:02:15 test-machine myservice[559]: }; 
Apr 07 08:02:15 test-machine myservice[559]: warning : Transaction has timed out 
Apr 07 08:02:29 test-machine myservice[559]: Timeout .... waiting for response for ReadRequest { /*RequestHeader*/ 
Apr 07 08:02:29 test-machine myservice[559]: authenticationToken   /* NodeId       */: ns=0;i=50 
Apr 07 08:02:29 test-machine myservice[559]: timeStamp      /* UtcTime       */: 2017-04-07T15:01:29.169Z 
Apr 07 08:02:29 test-machine myservice[559]: requestHandle     /* IntegerId      */: 336    0x150 
Apr 07 08:02:29 test-machine myservice[559]: returnDiagnostics    /* UInt32       */: 0    0x0 
Apr 07 08:02:29 test-machine myservice[559]: auditEntryId     /* UAString       */: 
Apr 07 08:02:29 test-machine myservice[559]: timeoutHint     /* UInt32       */: 0    0x0 
Apr 07 08:02:29 test-machine myservice[559]: additionalHeader    /* ExtensionObject     */: null 
Apr 07 08:02:29 test-machine myservice[559]: }; 
Apr 07 08:02:29 test-machine myservice[559]: warning : Transaction has timed out 
Apr 07 08:03:01 test-machine myservice[559]: Timeout .... waiting for response for OpenSecureChannelRequest { /*RequestHeader*/ 
Apr 07 08:03:01 test-machine myservice[559]: authenticationToken   /* NodeId       */: ns=0;i=0 
Apr 07 08:03:01 test-machine myservice[559]: timeStamp      /* UtcTime       */: 2017-04-07T15:02:01.928Z 
Apr 07 08:03:01 test-machine myservice[559]: requestHandle     /* IntegerId      */: 337    0x151 
Apr 07 08:03:01 test-machine myservice[559]: returnDiagnostics    /* UInt32       */: 0    0x0 
Apr 07 08:03:01 test-machine myservice[559]: auditEntryId     /* UAString       */: null 
Apr 07 08:03:01 test-machine myservice[559]: timeoutHint     /* UInt32       */: 0    0x0 
Apr 07 08:03:01 test-machine myservice[559]: additionalHeader    /* ExtensionObject     */: null 
Apr 07 08:03:01 test-machine myservice[559]: }; 
Apr 07 08:03:01 test-machine myservice[559]: Warning: securityToken hasn't been renewed 

은 기본적으로 영원히가는 모니터링을 유지하고는 15 분마다 발행 싶어. 누군가가 저를위한 매개 변수를 도울 수 있다면 정말 좋을 것입니다.

답변

0

서버에 액세스 할 수있는 사람은 post입니다. 그들은 당신이 당신의 클라이언트를 설정할 때 그 국가 포스트에서

requestedLifetimeCount * requestedPublishingInterval은 적어도 PublishRequest.RequestHeader.timeoutHint로 설정되어야한다

var options = { 
 
    requestedPublishingInterval: 1000, // check on server 
 
    requestedMaxKeepAliveCount: 2, 
 
    requestedLifetimeCount: 100, // check on server 
 
    maxNotificationsPerPublish: 10, 
 
    publishingEnabled: true, 
 
    priority: 10, 
 
} 
 

 
var subscription = new opcua.ClientSubscription(opcSession, options);