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

sp_Feed Topic RSS sp_TopicIcon
No way after 2 days ... help me
June 13, 2017
15:15, EEST
Avatar
martin.macik
Member
Members
Forum Posts: 7
Member Since:
June 13, 2017
sp_UserOfflineSmall Offline

there is log:
******************************************************************************************
Select the security mode to use.
(n=None,s=Sign,e=SignAndEncrypt)
n
Connecting to opc.tcp://172.18.14.82:4870
# – Name – Type – Product – Application
0 – Siemens OPC UA Server for WinCC Panel RT – Server – urn:Siemens:Automation:WinCC:PanelRT – urn:Siemens:Automation:WinCC:PanelRT
——————————————————-
– Enter client number to select that one
– Enter x to return to cancel
——————————————————-
0
Available endpoints:
# – URI – Security Mode – Security Policy – Transport Profile
0 – opc.tcp://172.18.14.82:4870 – None – Basic128Rsa15 – uatcp-uasc-uabinary
1 – opc.tcp://172.18.14.82:4870 – None – None – uatcp-uasc-uabinary
——————————————————-
– Enter endpoint number to select that one
– Enter x to return to cancel
——————————————————-
1
Using SecurityPolicy http://opcfoundation.org/UA/Se…..olicy#None
ServerState changed from Unknown to CommunicationFault
ServerStatus: null
Endpoint: EndpointDescription: EndpointDescription
EndpointUrl=opc.tcp://172.18.14.82:4870
Server=ApplicationDescription
ApplicationUri=urn:Siemens:Automation:WinCC:PanelRT
ProductUri=urn:Siemens:Automation:WinCC:PanelRT
ApplicationName=Siemens OPC UA Server for WinCC Panel RT
ApplicationType=ApplicationType
name=Server
ordinal=0
GatewayServerUri=null
DiscoveryProfileUri=null
DiscoveryUrls=class java.lang.String[1]
[0]=opc.tcp://HMI_Panel:4870
ServerCertificate=[793] 0x308203153082027ea0030201020204b64d0000300d06092a864886f70d0101050500306531133011060355040a160a5369656d656e73204147311f301d060355040b161657696e43432052756e74696d6520416476616e6365643112301006035504031609484d495f50616e656c31193017060a0992268993f22c6401191609484d495f50616e656c301e170d3039303130373231313032325a170d3139303130373231313032325a306531133011060355040a160a5369656d656e73204147311f301d060355040b161657696e43432052756e74696d6520416476616e6365643112301006035504031609484d495f50616e656c31193017060a0992268993f22c6401191609484d495f50616e656c30819f300d06092a864886f70d010101050003818d0030818902818100e803c7b245cf66368de50e7e3a8153a23152db6bf6d0e9578559f8601e1015eeac296306cd87324d0531806b7bcdf80329cf41757fb2ffa4c7b6e3031a3ebdc9a8c3ffa67afab920578d453cdec10c0e4d604e6ba399dfff561b4db2002128019e76bbc319b86c82b0197912f38f6a2777c08b412a1b48a8fabdfa877ab1cd750203010001a381d13081ce30280603551d23010100041e301c8014a8c6af1d80c93a2484ed8a09068a4c79c964dce48204b64d000030200603551d0e01010004160414a8c6af1d80c93a2484ed8a09068a4c79c964dce4300f0603551d130101ff04053003010100300e0603551d0f0101ff0404030201f630200603551d250101ff0416301406082b0601050507030206082b06010505070301303d0603551d11010100043330318209484d495f50616e656c862475726e3a5369656d656e733a4175746f6d6174696f6e3a57696e43433a50616e656c5254300d06092a864886f70d0101050500038181007ffcdb090a7e70d8df8aacb903f5ec0e5dba13fd6e5244281fa3ce1cc846e4b3b585b2bb8ca30b4b1f15b8b3f4dc7dd3d45b2aa80e50f08e7934964ec172be4af7e3c17d890d9cbc653dde4129a1ee914cddd0816dfea5a8e03732439d4e95cfe7fac326a303c88dc410be93c6bca563dbd9183c75d81dc9527ce3b3a5a4d96a
SecurityMode=MessageSecurityMode
name=None
ordinal=1
SecurityPolicyUri=http://opcfoundation.org/UA/SecurityPolicy#None
UserIdentityTokens=class org.opcfoundation.ua.core.UserTokenPolicy[2]
[0]=UserTokenPolicy
PolicyId=Anonymous
TokenType=UserTokenType
name=Anonymous
ordinal=0
IssuedTokenType=null
IssuerEndpointUrl=null
SecurityPolicyUri=http://opcfoundation.org/UA/SecurityPolicy#None
[1]=UserTokenPolicy
PolicyId=http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15
TokenType=UserTokenType
name=UserName
ordinal=1
IssuedTokenType=null
IssuerEndpointUrl=null
SecurityPolicyUri=http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15
TransportProfileUri=http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary
SecurityLevel=0

*** Connected to: opc.tcp://172.18.14.82:4870

com.prosysopc.ua.ServiceException: Bad_ServerNotConnected (code=0x800D0000, description=”The operation could not complete because the client is not connected to the server.”) ServiceResult=Bad_ServerNotConnected (0x800D0000) “The operation could not complete because the client is not connected to the server.”
Caused by: org.opcfoundation.ua.common.ServiceResultException: Bad_ServerNotConnected (code=0x800D0000, description=”The operation could not complete because the client is not connected to the server.”)
**********************************************

I dont know where is bad. I have not found resolution of this issue on whole internet 🙁

June 14, 2017
14:02, EEST
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

Thank you for the post. According to the explanation, it seems that you are connecting to the WinCC OPC UA Server with SampleConsoleClient application which is shipped as an example application in the Java SDK package.

The actual problem are the lines

ServerState changed from Unknown to CommunicationFault
ServerStatus: null

This means that the client is not able to read the server status correctly. The ServerStatus is a structure containing information about the application including the current state of the server. All this seems to be null in this case.

Are you able to connect to the mentioned OPC UA server with other OPC UA client applications? If you are, could you explain what is the value of the ServerStatus node? The ServerStatus can be found in the browse path Objects/Server/ServerStatus with NodeId i=2256.

June 15, 2017
10:02, EEST
Avatar
martin.macik
Member
Members
Forum Posts: 7
Member Since:
June 13, 2017
sp_UserOfflineSmall Offline

Thanks for reply.

When I use UaExpert, connection works fine. But when I use PROSYS UA OPC Client, this app writes ConnectionFault too as compiled Prosys UA OPC Java Client SDK (SampleConsoleClient).

From the UaExpert:
Node – Root/Objects/Server/ServerStatus with id 2256 and his child State has id 2259 (value: 0 (Running) ).

Please … Whats next?

June 15, 2017
10:04, EEST
Avatar
martin.macik
Member
Members
Forum Posts: 7
Member Since:
June 13, 2017
sp_UserOfflineSmall Offline

edited: Not ConnectionFault but CommunicationFault in the PROSYS UA OPC Client.exe

June 15, 2017
10:25, EEST
Avatar
martin.macik
Member
Members
Forum Posts: 7
Member Since:
June 13, 2017
sp_UserOfflineSmall Offline

I compiled original source code with only 3 changes:

in func initialize() – client = new UaClient(promptServerUri()); -> changed on -> client = new UaClient(serverUri); where serverUri is string of address
and in func discover() – discoveryClient.setUri(url); -> changed on -> discoveryClient.setUri(“opc.tcp://172.18.14.82:4870”); because with this doesnt throw exception about bad endpoints.
in func connect() – EndpointDescription[] endpoints = client.discoverEndpoints();
client.setEndpoint(endpoints[1]);
println(“Endpoint———-: ” + client.getEndpoint());
println(“name: “+client.getServerName());

why is the client.getServerName() null or empty? (because of communicationFault ?)

when I run this Sample:
**********************************
Select the security mode to use.
(n=None,s=Sign,e=SignAndEncrypt)
n
Connecting to opc.tcp://172.18.14.82:4870
* Prosys OPC UA Java SDK v2.3.2-781
* (c) Prosys PMS Ltd.

* Running in EVALUATION mode
* Connections will close after 120 minutes

log4j:WARN No appenders could be found for logger (com.prosysopc.ua.UaApplication).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Using SecurityPolicy http://opcfoundation.org/UA/SecurityPolicy#None
Endpoint———-: EndpointDescription: EndpointDescription
EndpointUrl=opc.tcp://172.18.14.82:4870
Server=ApplicationDescription
ApplicationUri=urn:Siemens:Automation:WinCC:PanelRT
ProductUri=urn:Siemens:Automation:WinCC:PanelRT
ApplicationName=Siemens OPC UA Server for WinCC Panel RT
ApplicationType=ApplicationType
name=Server
ordinal=0
GatewayServerUri=null
DiscoveryProfileUri=null
DiscoveryUrls=class java.lang.String[1]
[0]=opc.tcp://HMIasrtp:4870
ServerCertificate=[793] 0x308203153082027ea0030201020204b64d0000300d06092a864886f70d0101050500306531133011060355040a160a5369656d656e73204147311f301d060355040b161657696e43432052756e74696d6520416476616e6365643112301006035504031609484d495f50616e656c31193017060a0992268993f22c6401191609484d495f50616e656c301e170d3039303130373231313032325a170d3139303130373231313032325a306531133011060355040a160a5369656d656e73204147311f301d060355040b161657696e43432052756e74696d6520416476616e6365643112301006035504031609484d495f50616e656c31193017060a0992268993f22c6401191609484d495f50616e656c30819f300d06092a864886f70d010101050003818d0030818902818100e803c7b245cf66368de50e7e3a8153a23152db6bf6d0e9578559f8601e1015eeac296306cd87324d0531806b7bcdf80329cf41757fb2ffa4c7b6e3031a3ebdc9a8c3ffa67afab920578d453cdec10c0e4d604e6ba399dfff561b4db2002128019e76bbc319b86c82b0197912f38f6a2777c08b412a1b48a8fabdfa877ab1cd750203010001a381d13081ce30280603551d23010100041e301c8014a8c6af1d80c93a2484ed8a09068a4c79c964dce48204b64d000030200603551d0e01010004160414a8c6af1d80c93a2484ed8a09068a4c79c964dce4300f0603551d130101ff04053003010100300e0603551d0f0101ff0404030201f630200603551d250101ff0416301406082b0601050507030206082b06010505070301303d0603551d11010100043330318209484d495f50616e656c862475726e3a5369656d656e733a4175746f6d6174696f6e3a57696e43433a50616e656c5254300d06092a864886f70d0101050500038181007ffcdb090a7e70d8df8aacb903f5ec0e5dba13fd6e5244281fa3ce1cc846e4b3b585b2bb8ca30b4b1f15b8b3f4dc7dd3d45b2aa80e50f08e7934964ec172be4af7e3c17d890d9cbc653dde4129a1ee914cddd0816dfea5a8e03732439d4e95cfe7fac326a303c88dc410be93c6bca563dbd9183c75d81dc9527ce3b3a5a4d96a
SecurityMode=MessageSecurityMode
name=None
ordinal=1
SecurityPolicyUri=http://opcfoundation.org/UA/SecurityPolicy#None
UserIdentityTokens=class org.opcfoundation.ua.core.UserTokenPolicy[2]
[0]=UserTokenPolicy
PolicyId=Anonymous
TokenType=UserTokenType
name=Anonymous
ordinal=0
IssuedTokenType=null
IssuerEndpointUrl=null
SecurityPolicyUri=http://opcfoundation.org/UA/SecurityPolicy#None
[1]=UserTokenPolicy
PolicyId=http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15
TokenType=UserTokenType
name=UserName
ordinal=1
IssuedTokenType=null
IssuerEndpointUrl=null
SecurityPolicyUri=http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15
TransportProfileUri=http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary
SecurityLevel=0

name:
ServerState changed from Unknown to CommunicationFault
ServerStatus: null

*** NOT connected to: opc.tcp://172.18.14.82:4870
——————————————————-
– Enter x to close client
——————————————————-
– Enter 0 to start discovery –
– Enter 1 to connect to server –
– Enter 2 to disconnect from server –
– Enter 3 to browse the server address space –
– Enter 4 to read values –
– Enter 5 to write values –
– Enter 6 to register nodes –
– Enter 7 to unregister nodes –
– Enter 8 to create a subscription –
– Enter 9 to call a method –
– Enter 10 to read history –
——————————————————-

June 15, 2017
13:56, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Please, enable full logging for the SDK by changing the following line in log.properties of the SampleConsoleClient:

log4j.logger.com.prosysopc.ua=DEBUG
June 15, 2017
14:25, EEST
Avatar
martin.macik
Member
Members
Forum Posts: 7
Member Since:
June 13, 2017
sp_UserOfflineSmall Offline

Done, whats next now? In console no change … Is there any logfile? And what to do with this:

log4j:WARN No appenders could be found for logger (com.prosysopc.ua.UaApplication).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4…..l#noconfig for more info.

??

Im very demotivated :/ Im sure it is only one line wrong. Or wrong configured OPC UA server?

June 15, 2017
15:16, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 982
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

The samples use log4j (version 1), which migth cause this problem if run from a directory path that contains spaces, therefore please try run the samples from a place which absolute path does not contain spaces. I suppose we should slowly move to log4j2 for the samples, would probably avoid this issue..

Heikki asked what the value was in id 2256 (ServerStatus) , not id 2259 (State under ServerStatus, altrough that is also important to know). The reason is that in OPC UA usually for nodes which value is a Structure type, i.e. complex type that has additional types as fields, have their structure “exposed” in chilldnodes. The ServerStatus is such node, it has 6 fields which are exposed as childnodes. The server should keep the value in sync (or their backend might be same), however in practise this is not always done correctly.

The SDK does try to read the complete structure first. If this cannot be done (if the value is bad or null structure is received), then the SDK tries to read eahc child node (including 2259). Therefore it would be necessary to know the Value Attribute of the ServerStatus node. If for some reason the server status cannot be read either way, then the state goes into communicationfault.

– Bjarne

June 15, 2017
16:05, EEST
Avatar
martin.macik
Member
Members
Forum Posts: 7
Member Since:
June 13, 2017
sp_UserOfflineSmall Offline

Hi Bjarne,

now path is OK and loging runs 🙂
But the output text is so huge … output is here -> http://mck-pw.szm.com/log.txt

June 15, 2017
16:23, EEST
Avatar
martin.macik
Member
Members
Forum Posts: 7
Member Since:
June 13, 2017
sp_UserOfflineSmall Offline

and here ( http://mck-pw.szm.com/uaex.jpg ) is screenshot with browsed ServerStatus node … there is detailed structure on the right

June 16, 2017
11:39, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 982
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

At least some of the errors are “com.prosysopc.ua.ServiceException: Bad_EndOfStream (code=0x80B00000, description=”Buffer underflow”) ServiceResult=Bad_EndOfStream (0x80B00000) “Cannot move beyond end of the stream.” which are caused by the stack level
“Caused by: org.opcfoundation.ua.encoding.DecodingException: Bad_EndOfStream (code=0x80B00000, description=”Buffer underflow”)
at org.opcfoundation.ua.encoding.binary.BinaryDecoder.getDiagnosticInfoArray(Unknown Source)
at org.opcfoundation.ua.core.EncodeableSerializer$121.getEncodeable(Unknown Source)
at org.opcfoundation.ua.encoding.utils.AbstractSerializer.getEncodeable(Unknown Source)
at org.opcfoundation.ua.encoding.utils.SerializerComposition.getEncodeable(Unknown Source)
at org.opcfoundation.ua.encoding.binary.BinaryDecoder.getMessage(Unknown Source)”

Based on that It would seem this Siemens product has the same bug as in their Sinumerik servers. Please see https://forum.prosysopc.com/forum/opc-ua-java-sdk/bad_encodinglimitsexceeded-from-getdiagnosticinfoarray/. The error is not exactly same, but I would assume the underlying cause is the same. I would need to see wireshark logs in order to be sure what is the data received on byte level. If you wish to do so, look e.g. https://www.prosysopc.com/blog/opc-ua-wireshark/ and send the results to uajava-support@prosysopc.com.

There is not much that we can do for this unfortunately. You could contact Siemens to see if there are any updates to their products regarding this problem.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

ibrahim: 75

rocket science: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 709

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1465

Posts: 6252

Newest Members:

christi10l, ahamad1, Flores Frederick, ellenmoss, harriettscherer, shanonhumphreys, KupimotoblokfuB, tamhollander5, paulinafcf, bridgette18l

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 982, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 319, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1