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
Server Endpoint
July 26, 2022
13:12, EEST
Avatar
pradnyak
Member
Members
Forum Posts: 7
Member Since:
July 19, 2022
sp_UserOfflineSmall Offline

Hello,
Can I know the default endpoint URL for the simulation server? (opc.tcp//)
I am asking since the endpoint URL keeps changing system to system. If I want to serve it on a port using a script, how would I do it?
How can the program be invoked and served from an ubuntu terminal to a port?

Thanks

July 26, 2022
16:12, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1032
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Few notes first:
– It is currently summer holiday season here in Finland
– I personally have not done much about this application in a long while
Thus it is possible that some of this is outdated and a better answer can be made later

So, in short this application probably doesn’t work exactly as you think or would want. It should be noted that on the DL page it does mention: “The application requires a GUI (Linux Desktop Environment) in order to run.”. This is to say, in it’s current state it is not designed to be run in a console environment. Starting the application will open up the UI (and is also the app itself, i.e. it is not a “web application”) which is then used to do everything.

Thus, may I ask a bit more specifically on what you would like to do?

Anyway that being said, some things should be doable without the UI, but that is only once you have made configurations with the UI (or the very least started and shut down the application once). Then you could use ‘-h’ flag to start it without an UI (or in the past some generic “fake monitor” tricks on linux have worked as well). I’m not 100% sure is that yet how official of a feature, but it should work (you might need to ctrl-c to stop it though).

Technically once the app has been shut down once the configuration files do exist (in (user.home)/.prosysopc/prosys-opc-ua-simulation-server/), but per se they are only designed to be edited with the application (but technically some are xml files). They are also not designed per se to be transferable to other systems, but that might work. Note at least the following if you try:
– Not move log4j2.xml, the app will generate one on first start (and it contains path specific to the user.home folder)
– Do not try to move things in the PKI/CA/private folders, the application will generate a certificate on first startup as well, and that is tied to the hostname of the system, this hostname is also the same on which the license for the pro features of the application will be tied to

The port is in serverSettings.xml

As for the “default endpoint”, that is a topic basically of equal length, as there is sort of (at least the way we see it, others might differently) difference of the “endpoint” to the “actual connection address”. Basically the endpoint url is just a “marker uri” and while it is one of the connection addresses, typically depending on the bound IPs of the server you should be able to use any of them or ‘localhost’ as well if on the same machine.

So, the default endpoint is:

opc.tcp://HOSTNAME:53530/OPCUA/SimulationServer

(this would be visible on the ‘Status’ tab of the UI)
Where the ‘HOSTNAME’ is the hostname/computername where it runs. The hostname is also used to make the unique ApplicationURI OPC UA Applications must have and also used in the certificates.

But assuming the settings on bind IPs has not been changed the by default listens on all interfaces (basically 0.0.0.0) thus any IP or ‘localhost’ in place of the HOSTNAME should work in any normal OPC UA Client. You might see a warning log or equivalent if it is not equal to the endpoint url though, but in general this situation would be equal to where the server is behind a NAT and is not itself aware of the fact. Typically OPC UA Servers just make a single “Endpoint” like this (some might do one per IP and hostname).

July 28, 2022
12:29, EEST
Avatar
pradnyak
Member
Members
Forum Posts: 7
Member Since:
July 19, 2022
sp_UserOfflineSmall Offline

Hello,

Thanks for your time and input.
I tried out the suggestions you gave me, however when I am running the simulation server from the terminal with the -h flag, I’m getting the following warnings and errors…

Setting log4j.configurationFile system property to /root/.prosysopc/prosys-opc-ua-simulation-server/log4j2.xml
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/local/prosys-opc-ua-simulation-server/lib/guice-4.2.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use –illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
09:21:14.421 [b STARTING] ERROR com.prosysopc.ua.stack.transport.tcp.nio.f – Failed to bind address /0:0:0:0:0:0:0:0:53530
java.net.SocketException: Protocol family unavailable
at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
at sun.nio.ch.Net.bind(Net.java:461) ~[?:?]
at sun.nio.ch.Net.bind(Net.java:453) ~[?:?]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227) ~[?:?]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:80) ~[?:?]
at com.prosysopc.ua.stack.utils.asyncsocket.g.b(SourceFile:130) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.stack.utils.asyncsocket.c.a(SourceFile:130) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.stack.transport.tcp.nio.f.a(SourceFile:397) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.stack.a.e.a(SourceFile:228) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.server.aq.cq(SourceFile:2207) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.server.aq.AO(SourceFile:2254) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.server.aq.start(SourceFile:2115) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.app.simserver.server.d.start(SourceFile:186) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.app.simserver.server.d$b.startUp(SourceFile:96) ~[app-5.2.2-9.jar:5.2.2-9]
at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:61) ~[guava-29.0-jre.jar:?]
at com.google.common.util.concurrent.Callables$4.run(Callables.java:119) ~[guava-29.0-jre.jar:?]
at java.lang.Thread.run(Thread.java:834) ~[?:?]
09:21:14.444 [SimulationServer] ERROR com.prosysopc.ua.app.simserver.i – Could not start the application.
java.lang.IllegalStateException: Expected the service f [FAILED] to be RUNNING, but the service has FAILED
at com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:379) ~[guava-29.0-jre.jar:?]
at com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:303) ~[guava-29.0-jre.jar:?]
at com.google.common.util.concurrent.AbstractIdleService.awaitRunning(AbstractIdleService.java:164) ~[guava-29.0-jre.jar:?]
at com.prosysopc.ua.app.simserver.i.b(SourceFile:94) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.app.simserver.SimulationServer.main(SourceFile:32) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.app.Main.main(Main.java:13) ~[prosys-opc-ua-simulation-server-5.2.2-9.jar:5.2.2-9]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84) ~[i4jruntime.jar:?]
at com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:69) ~[i4jruntime.jar:?]
at install4j.com.prosysopc.ua.app.Main.main(Unknown Source) ~[launcher278c8ec0.jar:?]
Caused by: java.lang.IllegalStateException: Expected to be healthy after starting. The following services are not running: {FAILED=[b [FAILED]]}
at com.google.common.util.concurrent.ServiceManager$ServiceManagerState.checkHealthy(ServiceManager.java:782) ~[guava-29.0-jre.jar:?]
at com.google.common.util.concurrent.ServiceManager$ServiceManagerState.awaitHealthy(ServiceManager.java:594) ~[guava-29.0-jre.jar:?]
at com.google.common.util.concurrent.ServiceManager.awaitHealthy(ServiceManager.java:322) ~[guava-29.0-jre.jar:?]
at com.prosysopc.ua.app.simserver.services.f.startUp(SourceFile:77) ~[app-5.2.2-9.jar:5.2.2-9]
at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:61) ~[guava-29.0-jre.jar:?]
at com.google.common.util.concurrent.Callables$4.run(Callables.java:119) ~[guava-29.0-jre.jar:?]
at java.lang.Thread.run(Thread.java:834) ~[?:?]
Suppressed: com.google.common.util.concurrent.ServiceManager$FailedService: b [FAILED]
Caused by: com.prosysopc.ua.server.ar: Failed to initialize server endpoint: opc.tcp://7afa3f3df8ac:53530/OPCUA/SimulationServer
at com.prosysopc.ua.server.aq.cq(SourceFile:2239) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.server.aq.AO(SourceFile:2254) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.server.aq.start(SourceFile:2115) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.app.simserver.server.d.start(SourceFile:186) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.app.simserver.server.d$b.startUp(SourceFile:96) ~[app-5.2.2-9.jar:5.2.2-9]
at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:61) ~[guava-29.0-jre.jar:?]
at com.google.common.util.concurrent.Callables$4.run(Callables.java:119) ~[guava-29.0-jre.jar:?]
at java.lang.Thread.run(Thread.java:834) ~[?:?]
Caused by: com.prosysopc.ua.stack.c.h: Bad_InternalError (code=0x80020000, description=”2147614720, Protocol family unavailable”)
at com.prosysopc.ua.stack.transport.tcp.nio.f.a(SourceFile:420) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.stack.a.e.a(SourceFile:228) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.server.aq.cq(SourceFile:2207) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.server.aq.AO(SourceFile:2254) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.server.aq.start(SourceFile:2115) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.app.simserver.server.d.start(SourceFile:186) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.app.simserver.server.d$b.startUp(SourceFile:96) ~[app-5.2.2-9.jar:5.2.2-9]
at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:61) ~[guava-29.0-jre.jar:?]
at com.google.common.util.concurrent.Callables$4.run(Callables.java:119) ~[guava-29.0-jre.jar:?]
at java.lang.Thread.run(Thread.java:834) ~[?:?]
Caused by: java.net.SocketException: Protocol family unavailable
at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
at sun.nio.ch.Net.bind(Net.java:461) ~[?:?]
at sun.nio.ch.Net.bind(Net.java:453) ~[?:?]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227) ~[?:?]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:80) ~[?:?]
at com.prosysopc.ua.stack.utils.asyncsocket.g.b(SourceFile:130) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.stack.utils.asyncsocket.c.a(SourceFile:130) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.stack.transport.tcp.nio.f.a(SourceFile:397) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.stack.a.e.a(SourceFile:228) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.server.aq.cq(SourceFile:2207) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.server.aq.AO(SourceFile:2254) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.server.aq.start(SourceFile:2115) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.app.simserver.server.d.start(SourceFile:186) ~[app-5.2.2-9.jar:5.2.2-9]
at com.prosysopc.ua.app.simserver.server.d$b.startUp(SourceFile:96) ~[app-5.2.2-9.jar:5.2.2-9]
at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:61) ~[guava-29.0-jre.jar:?]
at com.google.common.util.concurrent.Callables$4.run(Callables.java:119) ~[guava-29.0-jre.jar:?]
at java.lang.Thread.run(Thread.java:834) ~[?:?]

So, for the “java.net.SocketException: Protocol family unavailable” somehow I have troubleshooted it with using the line
JAVA_OPTS=”-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true” , inside my code.

Is there any way to avoid the warnings I get in the starting, saying “Illegal reflective access” ?

Thank you!

July 28, 2022
14:04, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1032
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

So are you trying to make a docker image? Based on the question of before and the fact that docker doesn’t have IPv6 networking, which will result in the error you did see.

In the application UI on the Endpoints tab (seen once Options->Switch to Expert Mode) there is a toggle for IPv6 networking (“Enable IPv6”). It is by default enabled as most operating systems prefer IPv6 addresses when resolving hostnames and also most have at least a IPv6 loopback address.

Given on the nature of Docker images I do want to note that the license terms for the application do not allow you redistributing it, thus you can make a local image for yourself, but you are not allowed to upload it to e.g. docker hub. This is to say, each user should go though https://www.prosysopc.com/products/opc-ua-simulation-server/evaluate/. If you would need redistribution rights or use the application as part of a larger software please talk to sales@prosysopc.com.

Anyway, then for the “WARNING: An illegal reflective access operation has occurred”, might sound odd, buy can you be more specific as to why they are a problem? Or well, it depends on how familiar you are on java development, but basically stuff broke in Java 9 and since then there is sort of a split-world of before and after Java 9. The application uses Java 17 (the installer embeds a runtime). Basically that warning states that on some future java version things might break, as they use things that worked in the Java 8 world. The library here is Guice, one dependency of the app, which also works in Java 8. I’m not sure is it possible to make it work in both without the warning and it is basically outside of our control. Regardless, it is “just a warning”, it shouldn’t matter yet. Anyway, there might be some java flags to disable it, “–add-opens=java.base/java.lang=ALL-UNNAMED” might help, but this is sort of outside the scope of our support I would say.

July 29, 2022
11:44, EEST
Avatar
pradnyak
Member
Members
Forum Posts: 7
Member Since:
July 19, 2022
sp_UserOfflineSmall Offline

Hey,

Thank you for your support… To clarify, I am exploring this server personally and trying to run it on a Ubuntu system through the terminal (using a docker container)
Anyway, so does it mean that even if those warnings appear the server is running?
Because when I try testing the connection using the client it is showing me “bad connection”
I had also tried using the –add-opens flag but the warnings are still displayed.

Thanks

July 29, 2022
13:17, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1032
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Ok. Anyway my personal experience on Docker is rather limited still. However, have you published the port where the server starts in the docker commands when you start the container? If not it would only be visible within the container. If possible, I would recommend to first try without docker in e.g. a VM etc, then you would know if things/problems are docker-specific or not.

As for the ‘WARNING: An illegal reflective access operation has occurred’, those should not matter. Also it seems they will no longer happen in our internal beta on the next version (release might happen during August), as we have moved to use a newer version of Guice that seems to fix it.

Any other warning/error than the ‘illegal reflective’ could be an issue, e.g. the port binding “Failed to bind address” would have been as such.

July 29, 2022
20:11, EEST
Avatar
pradnyak
Member
Members
Forum Posts: 7
Member Since:
July 19, 2022
sp_UserOfflineSmall Offline

Okay, thank you for your support again…
Looking forward to explore your new version of OPC UA server simulator

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
52 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_gallery

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

Administrators: admin: 1