Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

No permission to create posts
sp_Feed Topic RSS sp_TopicIcon
How to define User Access level in opc Ua server
October 5, 2016
16:03, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

It is really difficult to say, what is wrong with your server. Is it possible to provide it for testing – or provide a simplified version with which you can reproduce the error? If yes, please send it to our support by email.

March 11, 2020
18:07, EET
Avatar
pcunningham
Member
Members
Forum Posts: 4
Member Since:
March 11, 2020
sp_UserOfflineSmall Offline

Alok102 said
-Opc ua Sample code is working
-My Opc us client is able to connect with Simulation server

I am facing issue with opc ua server / My opc ua client is able to connect with opc ua server with anonymous authentication mode.

But when I have tried with user and password then geting error as below .

INFO [17:26:45 05-Oct-16 IST][com.tridium.opcUaServer.util.MyUserValidator] onV
lidationError: User validation failed: userToken=UserNameIdentityToken: UserNam
IdentityToken
UserName=opcua
Password=[256] 0x2135f563c5d274ec191749e0ca407d4c259db3fc69055424e4d53a6d60ba
d6ca853652e40bcbcd579e2bcf7d394f59315346acfd41d165b09b1a0c8141b608364334f561ee9
91d962a838823d3a36b720f17547230a85117c3bdb64cd499304bef5372b430a75d0c2ef2b1d38a
ca1a8192cd79e9e3241ac56b8824beab3ebe46329a44a534bfa97d5bbdb0b46e1bce05bcb62cc86
1d862921cfa82afddccf0d19a10876b0657c60c692aa77c56891a343adc13ea7830f334fd0dc3c1
bbae9958a4969c595522043501c8d02a1084f3a7caa0a78c085a79c4ad5f8c9245d2b6930ddcb43
da73079a14a68f8f57de66a0aa713be6fd2063149d89b77f8db
EncryptionAlgorithm=http://www.w3.org/2001/04/xmlenc#rsa-1_5
PolicyId=username_basic128
error=com.prosysopc.ua.SecureIdentityException: Failed to decrypt user passwor

FINE [17:26:45 05-Oct-16 IST][opcUaServer.server] onActivateSessionError Niagar
OpcUaClient Failed to decrypt user password
FINE [17:26:45 05-Oct-16 IST][opcUaServer.server] onCloseSession NiagaraOpcUaCl
ent true
com.prosysopc.ua.SessionActivationException: Failed to activate Session. Servic
Result=Bad_IdentityTokenInvalid (0x80200000) “The user identity token is not va
id.”
at com.prosysopc.ua.client.UaClient.j(Unknown Source)
at com.prosysopc.ua.client.UaClient.connect(Unknown Source)
at com.tridium.opcUaClient.BOpcUaDevice.lambda$doPing$1(BOpcUaDevice.ja
a:998)
at java.security.AccessController.doPrivileged(Native Method)
at com.tridium.opcUaClient.BOpcUaDevice.doPing(BOpcUaDevice.java:995)
at javax.baja.driver.ping.BPingMonitor.checkPing(BPingMonitor.java:365)
at javax.baja.driver.ping.BPingMonitor.run(BPingMonitor.java:346)
at java.lang.Thread.run(Thread.java:745)
Caused by: ServiceFault: Bad_IdentityTokenInvalid (0x80200000) “The user identi
y token is not valid.”
Diagnostic Info:
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.serviceReques
(Unknown Source)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.serviceReques
(Unknown Source)
at org.opcfoundation.ua.application.SessionChannel.serviceRequest(Unkno
n Source)
at org.opcfoundation.ua.transport.ChannelService.ActivateSession(Unknow
Source)
at org.opcfoundation.ua.application.SessionChannel.activate(Unknown Sou
ce)
… 8 more  

Looks like an old defect in Tridium’s code, and/or the user object named “opcua” doesn’t have the right authentication scheme in the Tridium configuration (it should be OpcUaAuthenticationScheme). I tried to reproduce it with the current code base, and when authentication scheme is wrong, it prints the more helpful message:

SEVERE [11:59:12 11-Mar-20 EDT][opcUaServer.userValidator] LOGIN_INTERFACE_NOT_SUPPORTED

Jouni, can I ask what’s the significance of the true/false state of b in com.prosysopc.ua.server.SessionManagerListener.onCloseSession(Session session, boolean b)?

March 12, 2020
13:33, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

From the javadocs:

onCloseSession

void onCloseSession(Session session,
boolean deleteSubscriptions)

Notification of session close.

Parameters:
session – the session being closed.
deleteSubscriptions – whether the client is requesting that all subscriptions related to the session are to be deleted as well.

No permission to create posts
Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 735

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1523

Posts: 6449

Newest Members:

rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1