OPC UA Client - SecurityMode = UsmNone

Boa tarde,

estou com dificuldades para configurar a conexão com um servidor OPC_UA onde só tem implementado SecurityMode = UsmNone e SecurityPolicy = UspNone, A conexão não fica ativa conforme logs do servidor.
Então realizei testes usando o Kepware, onde somente consegui realizar a conexão utilizando SecurityMode = UsmSign e SecurityPolicy = UspBasic256

seguem os logs dos testes com Kepware:

Utilizando: SecurityMode = UsmNone e SecurityPolicy = UspNone
1855 2018-08-08 17:00:50.954 0x1478 0x1844 E3 ‘“D:\AppSW\Elipse Software\Elipse E3\Bin\E3UaClient.exe” -Embedding’ E3 4.8.336 Session2/WinSta0/Default 17
1857 2018-08-08 17:00:50.957 0x1478 0x162C UACLIENTHOST (020902A0)-------------------- UA Client Host CREATED 14
1860 2018-08-08 17:00:51.062 0x1478 0x1644 UACLIENTSESSION Could not close the session! status(800D0000) ‘The operation could not complete because the client is not connected to the server.’ 14
1859 2018-08-08 17:00:51.062 0x1478 0x1644 UACLIENTSESSION ActivateSession failed! status(80070000) ‘Decoding halted because of invalid data in the stream.’ 14
1858 2018-08-08 17:00:51.062 0x1478 0x1644 UACLIENTSESSION Connected to ‘opc.tcp://127.0.0.1:49319’ 14
1861 2018-08-08 17:00:51.064 0x1478 0x1644 UACLIENTSESSION QueuePublish failed! status(80AB0000) ‘One or more arguments are invalid.’ 14
1864 2018-08-08 17:00:53.071 0x1478 0x1644 UACLIENTSESSION Could not close the session! status(800D0000) ‘The operation could not complete because the client is not connected to the server.’ 14
1863 2018-08-08 17:00:53.071 0x1478 0x1644 UACLIENTSESSION ActivateSession failed! status(80070000) ‘Decoding halted because of invalid data in the stream.’ 14
1862 2018-08-08 17:00:53.071 0x1478 0x1644 UACLIENTSESSION Connected to ‘opc.tcp://127.0.0.1:49319’ 14
1867 2018-08-08 17:00:56.083 0x1478 0x1644 UACLIENTSESSION Could not close the session! status(800D0000) ‘The operation could not complete because the client is not connected to the server.’ 14
1866 2018-08-08 17:00:56.083 0x1478 0x1644 UACLIENTSESSION ActivateSession failed! status(80070000) ‘Decoding halted because of invalid data in the stream.’ 14
1865 2018-08-08 17:00:56.083 0x1478 0x1644 UACLIENTSESSION Connected to ‘opc.tcp://127.0.0.1:49319’ 14
1868 2018-08-08 17:00:56.298 0x17F0 0x14D4 SYSTEM ProcessInfo.E3ADMIN: CPU=0.00% PVT=6088KB VTL=145368KB WKS=18188KB HDL=278 GDI=76 USR=23 TRD=6 PGF=5284 PPL=275KB NPP=20KB UNM=‘Administrator’ RUN=5:31:03.902 UTM=0.046 KTM=0.156 INF=’’ 15
1871 2018-08-08 17:00:59.099 0x1478 0x1644 UACLIENTSESSION Could not close the session! status(800D0000) ‘The operation could not complete because the client is not connected to the server.’ 14
1870 2018-08-08 17:00:59.099 0x1478 0x1644 UACLIENTSESSION ActivateSession failed! status(80070000) ‘Decoding halted because of invalid data in the stream.’ 14
1869 2018-08-08 17:00:59.099 0x1478 0x1644 UACLIENTSESSION Connected to ‘opc.tcp://127.0.0.1:49319’ 14
1872 2018-08-08 17:01:00.027 0x900 0xC4C E3SERVER ProcessInfo: E3Server(1)=10796KB(27260) 0.13% Studio(1)=15820KB(181560) 1.19% E3Admin(1)=6088KB(18188) 0.00% E3UaClient(1)=6676KB(13480) 1.71% DriveC=52181.53MB CPU=5.49% MemoryLoad=16% PageFaults=1699785 Handles=32214 Processes=81 Threads=1046 15

Utilizando: SecurityMode = UsmSign e SecurityPolicy = UspBasic256
1968 2018-08-08 17:03:52.325 0x2B0 0x1094 E3 ‘“D:\AppSW\Elipse Software\Elipse E3\Bin\E3UaClient.exe” -Embedding’ E3 4.8.336 Session2/WinSta0/Default 17
1970 2018-08-08 17:03:52.331 0x2B0 0xF14 UACLIENTHOST (020202A0)-------------------- UA Client Host CREATED 14
1971 2018-08-08 17:03:52.624 0x2B0 0x1430 UACLIENTSESSION Connected to ‘opc.tcp://127.0.0.1:49319’ 14
1972 2018-08-08 17:03:52.654 0x2B0 0x1430 UACLIENTSESSION Session activated on ‘opc.tcp://127.0.0.1:49319’ 14
1973 2018-08-08 17:03:56.295 0x17F0 0x14D4 SYSTEM ProcessInfo.E3ADMIN: CPU=0.00% PVT=6088KB VTL=145368KB WKS=18188KB HDL=276 GDI=76 USR=23 TRD=6 PGF=5291 PPL=275KB NPP=20KB UNM=‘Administrator’ RUN=5:34:03.899 UTM=0.046 KTM=0.156 INF=’’ 15
1974 2018-08-08 17:04:00.583 0x900 0xC4C E3SERVER ProcessInfo: E3Server(1)=11088KB(27364) 0.08% Studio(1)=16300KB(182100) 0.49% E3Admin(1)=6088KB(18188) 0.00% E3UaClient(1)=6940KB(13900) 0.00% DriveC=52181.15MB CPU=6.80% MemoryLoad=16% PageFaults=1771373 Handles=32654 Processes=82 Threads=1065 15

Log com o outro servidor:

908 2018-08-08 16:33:41.390 0x1924 0xE74 E3 ‘“D:\AppSW\Elipse Software\Elipse E3\Bin\E3UaClient.exe” -Embedding’ E3 4.8.336 Session2/WinSta0/Default 17
910 2018-08-08 16:33:41.392 0x1924 0x6E0 UACLIENTHOST (022902A0)-------------------- UA Client Host CREATED 14
911 2018-08-08 16:33:42.909 0x1924 0xDCC UACLIENTSESSION Connected to ‘opc.tcp://10.247.234.211:4840’ 14
912 2018-08-08 16:33:43.109 0x1924 0xDCC UACLIENTSESSION Session activated on ‘opc.tcp://10.247.234.211:4840’ 14
914 2018-08-08 16:33:43.309 0x1924 0xDCC UACONNECTION Reading NamespaceArray failed! error(80004005) 14
913 2018-08-08 16:33:43.309 0x1924 0xDCC UACLIENTSESSION SyncReadValue failed! status(0) / result(80250000) ‘The session id is not valid.’ 14
915 2018-08-08 16:33:43.509 0x1924 0xDCC UACLIENTSESSION CreateSubscription failed! status(0) / result(80250000) ‘The session id is not valid.’ 14
917 2018-08-08 16:33:43.709 0x1924 0xDCC E3UASUBSCRIPTION Connect: CreateSubscription failed Id=1 - error(80004005) 14
916 2018-08-08 16:33:43.709 0x1924 0xDCC UACLIENTSESSION CreateSubscription failed! status(0) / result(80250000) ‘The session id is not valid.’ 14
918 2018-08-08 16:33:43.909 0x1924 0x18C8 UACALLBACK Subscription(0): Publish failed! status(0) / result(80250000) ‘The session id is not valid.’ 14
919 2018-08-08 16:33:51.712 0x1924 0xDCC UACLIENTSESSION Browse failed! status(0) / result(80250000) ‘The session id is not valid.’ 14

@Felipe.Grativol, bom dia.

Para entender melhor:
Esta URL opc.tcp://127.0.0.1:49319 é do OPC UA Server da Kepware?
Esta URL opc.tcp://10.247.234.211:4840 é de qual OPC UA Server?

O Kepware está devidamente configurado para aceitar conexões com esta política de segurança?

Ok.

Tentou acessar com o OPC UA Client da Kepware? Funcionou?

Se possível, enviar os logs completos para: fernando@elipse.com.br.

Sds.

boa tarde @Fernando

Esta URL opc.tcp://127.0.0.1:49319 é do OPC UA Server da Kepware?
sim
Esta URL opc.tcp://10.247.234.211:4840 é de qual OPC UA Server?
de um opc ua implementado em um sistema de nível 2 que tem somente a política “None” e conecta normalmente utilizando um cliente OPC UA de teste e até mesmo o Kepware OPC UA Client.

O Kepware está devidamente configurado para aceitar conexões com esta política de segurança?
sim, ele esta configurado para os 3 tipos de política e devidamente testado e conectado utilizando outro cliente OPC UA.

@Felipe.Grativol, bom dia.

Poderia realizar um teste, por favor? Mesmo com as propriedades SecurityMode e SecurityPolice em None, informa o usuário (na propriedade UserName) e senha (propriedade Password) e tenta importar as tags do Kepware.

Quanto ao outro, parece que está ocorrendo uma demora na conexão da sessão. Quais as configurações que inseriu nas propriedades do OPC UA Client?

Sds.

Poderia realizar um teste, por favor? Mesmo com as propriedades SecurityMode e SecurityPolice em None, informa o usuário (na propriedade UserName) e senha (propriedade Password) e tenta importar as tags do Kepware.

Passando o usuário e senha com SecurityMode e SecurityPolice em None, conectou normalmente.
segue o log.

Teste propriedades SecurityMode e SecurityPolice em None e usuário e senha
18915 2018-08-10 10:57:27.286 0x1764 0xE50 E3 ‘“D:\AppSW\Elipse Software\Elipse E3\Bin\E3UaClient.exe” -Embedding’ E3 4.8.336 Session2/WinSta0/Default 17
18916 2018-08-10 10:57:27.286 0x1764 0xE50 SYSTEM ProcessInfo.E3UACLIENT: CPU=0.00% PVT=4996KB VTL=109544KB WKS=9964KB HDL=152 GDI=20 USR=4 TRD=2 PGF=2590 PPL=199KB NPP=13KB UNM=‘Administrator’ RUN=0.069 UTM=0.015 KTM=0.046 INF=’’ STARTED 15
18917 2018-08-10 10:57:27.288 0x1764 0x890 UACLIENTHOST (021802A0)-------------------- UA Client Host CREATED 14
18918 2018-08-10 10:57:27.399 0x1764 0xEC8 UACLIENTSESSION Connected to ‘opc.tcp://127.0.0.1:49319’ 14
18919 2018-08-10 10:57:27.497 0x1764 0xEC8 UACLIENTSESSION Session activated on ‘opc.tcp://127.0.0.1:49319’ 14
18920 2018-08-10 10:57:29.386 0x1AB8 0xFB0 SYSTEM ProcessInfo.E3DBENGINE: CPU=0.00% PVT=6644KB VTL=120036KB WKS=17372KB HDL=307 GDI=20 USR=13 TRD=7 PGF=5378 PPL=222KB NPP=21KB UNM=‘Administrator’ RUN=1:17:00.047 UTM=0.265 KTM=0.093 INF=‘DB_N1.N1FRN’ 15
18921 2018-08-10 10:57:29.386 0x1AB8 0xFB0 SYSTEM PoolJob(AsyncRowset): Jobs=2 Duration=34.8s 15
18922 2018-08-10 10:57:29.386 0x1AB8 0xFB0 SYSTEM PoolJob(SyncRowset): Jobs=2 Duration=34.8s 15
18923 2018-08-10 10:57:29.386 0x1AB8 0xFB0 SYSTEM PoolJob(TOTAL): Jobs=4 Duration=69.5s ThreadsCreated=2 ThreadsFinished=2 ThreadsActive=0 15
18924 2018-08-10 10:57:30.096 0x1AB8 0xD50 SYSTEM Threads: E3DBEngine.WatchDog.18C4: CPU=0.00% Occupancy=0.00% Calls=0 E3DBEngine.DBExec.03B4: CPU=0.00% Occupancy=0.00% Calls=121 E3DBEngine.DBCallback.14BC: CPU=0.00% Occupancy=0.00% Calls=60 E3DBEngine.DBEngineHost.03B0: CPU=0.00% Occupancy=0.00% Calls=60 15
18925 2018-08-10 10:57:33.451 0x1764 0xEFC UACALLBACK Publish failed! status(80790000) ‘There is no subscription available for this session.’ 14
18926 2018-08-10 10:57:33.451 0x1764 0xEFC UACALLBACK Publish failed! status(80790000) ‘There is no subscription available for this session.’ 14
18927 2018-08-10 10:57:33.451 0x1764 0xEFC UACALLBACK Publish failed! status(80790000) ‘There is no subscription available for this session.’ 14
18928 2018-08-10 10:57:33.451 0x1764 0xEFC UACALLBACK Publish failed! status(80790000) ‘There is no subscription available for this session.’ 14
18929 2018-08-10 10:57:33.451 0x1764 0xEFC UACALLBACK Publish failed! status(80790000) ‘There is no subscription available for this session.’ 14
18930 2018-08-10 10:57:33.451 0x1764 0xEC8 UACLIENTSESSION Disconnected from ‘opc.tcp://127.0.0.1:49319’ 14
18931 2018-08-10 10:57:33.453 0x1764 0x890 UACLIENTHOST (021802A0)-------------------- UA Client Host DESTROYED 14
18932 2018-08-10 10:57:33.454 0x1764 0xE50 SYSTEM ProcessInfo.E3UACLIENT: CPU=2.79% PVT=6516KB VTL=112332KB WKS=13720KB HDL=205 GDI=20 USR=6 TRD=6 PGF=39439 PPL=196KB NPP=15KB UNM=‘Administrator’ RUN=6.239 UTM=0.109 KTM=0.125 INF=‘Kepware’ STOPPED 15
18933 2018-08-10 10:57:33.458 0x1640 0x4C4 IODRV UaQueue: Queued=2 Handled=2 Deleted=0 Pending=0 15
18934 2018-08-10 10:57:38.322 0x1AB8 0x3B4 DB DBServer[DB_N1.N1FRN].Execute: AsyncExecuted=0 AsyncFailed=12 SyncExecuted=1 SyncFailed=2 SyncDropped=0 15
18935 2018-08-10 10:57:38.893 0x1640 0x11E0 SYSTEM ProcessInfo.STUDIO: CPU=1.02% PVT=268016KB VTL=739884KB WKS=425956KB HDL=730 GDI=1035 USR=524 TRD=15 PGF=9748493 PPL=931KB NPP=62KB UNM=‘Administrator’ RUN=42:46:00.072 UTM=40.515 KTM=1:11.484 INF=’’ 15
18936 2018-08-10 10:57:42.694 0x17F0 0xD40 SYSTEM Threads: E3Admin.RECClient(1).0558: CPU=0.00% Occupancy=0.00% Calls=24 E3Admin.E3Admin.17F4: CPU=0.00% Occupancy=0.14% Calls=60 15
18937 2018-08-10 10:57:47.124 0x1640 0xC3C SYSTEM RECClient(1): Studio connected to LTQF12 Sent=53147(1276402B) Recv=23319(685866B) Pending=0(0B) Elapsed=42:46:08.156 REC=v2.150 Remote=v4.8.336 15
18938 2018-08-10 10:57:47.124 0x900 0x1200 SYSTEM RECServer(3): Studio connected from 127.0.0.1(LTQF12) Sent=23319(685866B) Recv=53147(1276402B) Pending=0(0B) Elapsed=42:46:08.156 REC=v2.150 Remote=v4.8.336 15
18939 2018-08-10 10:57:56.292 0x17F0 0x14D4 SYSTEM ProcessInfo.E3ADMIN: CPU=0.00% PVT=6100KB VTL=145368KB WKS=19088KB HDL=278 GDI=95 USR=30 TRD=6 PGF=7507 PPL=276KB NPP=20KB UNM=‘Administrator’ RUN=47:28:03.896 UTM=0.218 KTM=0.312 INF=’’ 15
18940 2018-08-10 10:58:00.289 0x900 0xC4C E3SERVER ProcessInfo: E3Server(1)=15840KB(33656) 0.08% Studio(1)=268016KB(425956) 0.65% E3Admin(1)=6100KB(19088) 0.00% E3DBEngine(1)=6644KB(17372) 0.00% DriveC=51602.40MB CPU=28.12% MemoryLoad=44% PageFaults=10071857 Handles=31814 Processes=81 Threads=1041 15
18941 2018-08-10 10:58:02.083 0x900 0xC64 SYSTEM Threads: E3Server.RECServer(1).0770: CPU=0.00% Occupancy=0.00% Calls=24 E3Server.RECServer.064C: CPU=0.00% Occupancy=0.00% Calls=153 E3Server.RECServer.11E8: CPU=0.00% Occupancy=0.00% Calls=120 E3Server.LicenseManager.0C54: CPU=0.08% Occupancy=1.24% Calls=30 E3Server.ServerControl.112C: CPU=0.00% Occupancy=0.03% Calls=60 E3Server.RECServer(3).1200: CPU=0.00% Occupancy=0.00% Calls=143 E3Server.DomainManager.0E28: CPU=0.00% Occupancy=0.01% Calls=1188 E3Server.E3Server.0C4C: CPU=0.00% Occupancy=0.02% Calls=60 15
18942 2018-08-10 10:58:09.103 0x1640 0x4C4 IODRV UaQueue: Queued=0 Handled=0 Deleted=0 Pending=0 15

Repetindo Teste: propriedades SecurityMode e SecurityPolice em None sem usuário e senha

18943 2018-08-10 10:58:09.169 0x1320 0x920 E3 ‘“D:\AppSW\Elipse Software\Elipse E3\Bin\E3UaClient.exe” -Embedding’ E3 4.8.336 Session2/WinSta0/Default 17
18944 2018-08-10 10:58:09.169 0x1320 0x920 SYSTEM ProcessInfo.E3UACLIENT: CPU=0.00% PVT=4764KB VTL=109416KB WKS=10044KB HDL=152 GDI=20 USR=4 TRD=2 PGF=2611 PPL=199KB NPP=13KB UNM=‘Administrator’ RUN=0.062 UTM=0.031 KTM=0.046 INF=’’ STARTED 15
18945 2018-08-10 10:58:09.171 0x1320 0x110C UACLIENTHOST (020C02A0)-------------------- UA Client Host CREATED 14
18946 2018-08-10 10:58:09.280 0x1320 0x6C UACLIENTSESSION Connected to ‘opc.tcp://127.0.0.1:49319’ 14
18947 2018-08-10 10:58:09.280 0x1320 0x6C UACLIENTSESSION ActivateSession failed! status(80070000) ‘Decoding halted because of invalid data in the stream.’ 14
18948 2018-08-10 10:58:09.280 0x1320 0x6C UACLIENTSESSION Could not close the session! status(800D0000) ‘The operation could not complete because the client is not connected to the server.’ 14
18949 2018-08-10 10:58:09.286 0x1320 0x6C UACLIENTSESSION QueuePublish failed! status(80AB0000) ‘One or more arguments are invalid.’ 14
18950 2018-08-10 10:58:11.293 0x1320 0x6C UACLIENTSESSION Connected to ‘opc.tcp://127.0.0.1:49319’ 14
18951 2018-08-10 10:58:11.294 0x1320 0x6C UACLIENTSESSION ActivateSession failed! status(80070000) ‘Decoding halted because of invalid data in the stream.’ 14
18952 2018-08-10 10:58:11.294 0x1320 0x6C UACLIENTSESSION Could not close the session! status(800D0000) ‘The operation could not complete because the client is not connected to the server.’ 14
18953 2018-08-10 10:58:12.945 0x1320 0x110C UACLIENTHOST (020C02A0)-------------------- UA Client Host DESTROYED 14
18954 2018-08-10 10:58:12.945 0x1320 0x920 SYSTEM ProcessInfo.E3UACLIENT: CPU=3.31% PVT=6268KB VTL=112204KB WKS=13512KB HDL=206 GDI=20 USR=7 TRD=6 PGF=20739 PPL=197KB NPP=15KB UNM=‘Administrator’ RUN=3.840 UTM=0.078 KTM=0.125 INF=‘Kepware’ STOPPED 15
18955 2018-08-10 10:58:12.950 0x1640 0x4C4 IODRV UaQueue: Queued=0 Handled=0 Deleted=0 Pending=0 15
18956 2018-08-10 10:58:15.097 0x900 0xC0C SYSTEM ProcessInfo.E3SERVER: CPU=0.08% PVT=15840KB VTL=134964KB WKS=33656KB HDL=344 GDI=20 USR=12 TRD=20 PGF=310479 PPL=220KB NPP=26KB UNM=‘SYSTEM’ RUN=47:29:03.663 UTM=2:57.625 KTM=7.703 INF=’’ 15
18957 2018-08-10 10:58:15.566 0x1640 0x101C SYSTEM Threads: Studio.Studio.04C4: CPU=1.15% Occupancy=1.89% Calls=558 Studio.RECClient(1).0C3C: CPU=0.00% Occupancy=0.00% Calls=141 Studio.DBCallbackManager.15FC: CPU=0.00% Occupancy=0.00% Calls=0 15

Quanto ao outro, parece que está ocorrendo uma demora na conexão da sessão.
No outro aparece resposta de conexão bem rápida no log, porém o elipse devolve para ele “Invalid Session ID” e desconecta, depois fica conectando e desconectando gerando o mesmo erro.

Quais as configurações que inseriu nas propriedades do OPC UA Client?
Sem usuário e Senha.
SecurityMode e SecurityPolice =None

Digo em relação aos Timeouts.

Me envia os logs completos por e-mail ou compartilha um link por aqui, por favor.

Sds.

Enviei o log por e-mail, os parâmetros do outro OPC UA Client de Timeout são:

General.BrowseTimeout = 10000 ms
General.CallTimeout = 10000 ms
General.ConnectTimeout = 10000 ms
General.DiscoveryTimeout = 10000 ms
General.InternalServiceCallTimeout = 5000 ms
General.PublishTimeout = 60000 ms
General.SessionTimeout = 1200000

Desde já agradeço.