4:56, EEST
April 7, 2020
Good morning.
First of all, sorry but I am a novice in all that relates to OPC servers and connections.
I’m trying to connect to Matrikon OPC Server that I have installed and running in a virtual machine, and the same try to connect from the Java SDK against Matrikon server, but i can not.
The next example code (seemingly simple), returns next error on line “client.connect()”: “Failed to retrieve endpoints The server is not available. Opc.tcp: // localhost: 4841 ServiceResult = Bad_ConnectionRejected (0x80AC0000)” Could not Establish a network connection to remote server. “
Could you help to establish the connection via OPC-UA? On the other hand, is it possible other type of connection to a server using OPC UA, like HTTP SOAP requests, insted “opc.tcp”?
Thank you.
14:29, EEST
April 3, 2012
Hi,
That statuscode Bad_ConnectionRejected (0x80AC0000) means nothing did answer at the other end, i.e. no-one is listening the socket address that would be what opc.tcp://localhost:4841 would resolve into. The server is not running or you have wrong address or something blocks the connection.
If you have the server within a VM, unless you were connecting to the server from within the VM itself, ‘localhost’ obiviously wont work, since it should point to the host and not the guest OS of the VM. Thus use an IP address or hostname that points to the VM.
Since this forum category is for the https://www.prosysopc.com/products/opc-ua-historian/ I would assume your question to have something to do with it, but based on the text it is for our OPC UA SDK for Java instead, so the answer is assuming that was the case (for the SDK https://forum.prosysopc.com/forum/opc-ua-java-sdk/ would be better place for questions).
Generally speaking you must have (or learn) basic understanding of things in order to use the SDK.
Some early versions of the OPC UA Specification had a SOAP/HTTP option, but that has been long deprecated and removed (basically in practice no-one supported that).
In theory there is opc.https, but that is just the same data as with opc.tcp but using the https for encryption (i.e. it is not “web-https”) instead of the securechannel mechanism (of opc.tcp). Generally speaking pretty much no servers support that either (or do not do that properly). Also in practice there is zero benefit to using it anyway. There are few close-to-absurdness-edge-cases where it might be needed, but unless you know you need it better to ignore it.
Generally use https://www.prosysopc.com/products/opc-ua-simulation-server/, https://www.prosysopc.com/products/opc-ua-browser/, https://www.unified-automation.com/products/development-tools/uaexpert.html to learn and test.
Most Users Ever Online: 1919
Currently Online:
39 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: 726
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_galleryModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1