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
Prosys OPC UA simulation server not running in my local machine
October 8, 2021
14:18, EEST
Avatar
murugan1991info
Member
Members
Forum Posts: 7
Member Since:
October 1, 2021
sp_UserOfflineSmall Offline

Hi Team,

I have installed free version of Opc UA simulation server in my machine(windows 10) and it was able to run early. But now after restarting my machine It’s not running,

In a “Server Status” it’s showing “ERROR: Failed to initialize server endpoint: opc.tcp:” . Please guide me to solve this.Cry

October 8, 2021
15:30, EEST
Avatar
Markus Johansson
Moderator
Members

Moderators
Forum Posts: 41
Member Since:
August 6, 2019
sp_UserOfflineSmall Offline

Hi,

You can try to resolve this by removing the file “serverSettings.xml” at C:\Users\[USERNAME]\.prosysopc\prosys-opc-ua-simulation-server and then restart the application.

August 1, 2022
19:15, EEST
Avatar
IanL
New Member
Members
Forum Posts: 1
Member Since:
August 1, 2022
sp_UserOfflineSmall Offline

I have just encountered the same problem (In “Server Status” it’s showing “ERROR: Failed to initialize server endpoint: opc.tcp…:” )

I’ve been using the Prosys OPC UA Simulation Server free edition for an online learning course for some months, so wonder if my license might have expired?

I was able to use the Simulation Server earlier today, but when I stopped and restarted it the error appeared.

I tried reinstalling, and removing the file “serverSettings.xml” , but that did not help.

I notice in the log that the bind is failing (see below).

Can you help recover use of Prosys OPC UA Simulation Server?

08/01/2022 17:04:03.411 ERROR [b STARTING] com.prosysopc.ua.stack.transport.tcp.nio.f [] – Failed to bind address /0:0:0:0:0:0:0:0:53530
java.net.BindException: Address already in use: bind
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.1.2-358.jar:5.1.2-358]
at com.prosysopc.ua.stack.utils.asyncsocket.c.a(SourceFile:130) ~[app-5.1.2-358.jar:5.1.2-358]
at com.prosysopc.ua.stack.transport.tcp.nio.f.a(SourceFile:397) [app-5.1.2-358.jar:5.1.2-358]
at com.prosysopc.ua.stack.a.e.a(SourceFile:228) [app-5.1.2-358.jar:5.1.2-358]
at com.prosysopc.ua.server.aq.cn(SourceFile:2189) [app-5.1.2-358.jar:5.1.2-358]
at com.prosysopc.ua.server.aq.Ao(SourceFile:2236) [app-5.1.2-358.jar:5.1.2-358]
at com.prosysopc.ua.server.aq.start(SourceFile:2097) [app-5.1.2-358.jar:5.1.2-358]
at com.prosysopc.ua.app.simserver.server.d.start(SourceFile:186) [app-5.1.2-358.jar:5.1.2-358]
at com.prosysopc.ua.app.simserver.server.d$b.startUp(SourceFile:96) [app-5.1.2-358.jar:5.1.2-358]
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) [?:?]
08/01/2022 17:04:03.424 INFO [b STARTING] com.prosysopc.ua.stack.transport.tcp.nio.f [] – null closed

UPDATE: I changed the OCP/TCP port in serverSettings.xml, and the Simulation Server started OK.
52520

I haven’t found why it started having problems with the default port 53530, which doesn’t seem to be in use by anything else.

August 2, 2022
11:56, EEST
Avatar
Markus Johansson
Moderator
Members

Moderators
Forum Posts: 41
Member Since:
August 6, 2019
sp_UserOfflineSmall Offline

Hi,

Good to hear that you got it working. The issue does indeed point to the port not being available. Are you possibly using Docker in Windows? You can also check for any port exclusion ranges with the command “netsh interface ipv4 show excludedportrange protocol=tcp”. Ports inside the exclusion ranges are also unavailable for applications and these ranges can change between system restarts.

August 10, 2022
12:41, EEST
Avatar
in-fke
Member
Members
Forum Posts: 26
Member Since:
June 8, 2016
sp_UserOfflineSmall Offline

The auto-discovery of endpoints should be excluding the host “host.docker.internal” automatically, which it doesn’t.
@Prosys this is a feauture request to you guys.

Apparently the Servers tries to bind to the same port twice which let’s the whole start fail.

08/10/2022 10:59:00.661 ERROR [SimulationServer] 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.exe4j.runtime.WinLauncher.main(WinLauncher.java:94) ~[i4jruntime.jar:?]
at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:25) ~[i4jruntime.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://host.docker.internal: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) ~[?:?]

Deleting serverSettings.xml would not help.
It got generated with.

I tried
false
and it would not help.
I tried

127.0.0.1

and it would not help.

I tried

localhost

and it would not help.

I tried pausing Docker Desktop and it would not help.
I tried quitting Docker Desktop and it would not help.
(always the exception with trying to bind to host.docker.internal)

I noticed this section in my hosts file:
# Added by Docker Desktop
10.254.81.31 host.docker.internal
10.254.81.31 gateway.docker.internal
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal

commenting these out, I still get
ERROR: Failed to initialize server endpoint: opc.tcp://:53530/OPCUA/SimulationServer

I gues workaround should be limiting the auto-discovery, but I don’t know how to configure it properly. Please advise.

I am willing to set up a Remote Call, feel free to get in touch with me.
I also have some code I could borrow, that I use for my own OPC UA Server (stuff in conjunction with NetworkInterface.getNetworkInterfaces()).

August 10, 2022
13:04, EEST
Avatar
in-fke
Member
Members
Forum Posts: 26
Member Since:
June 8, 2016
sp_UserOfflineSmall Offline

Sorry for the bad formatting of the previous post. Some XML tags got gobbled because the forum does not like that markup? Is there a way to escape preformatted text in this forum?

August 10, 2022
13:58, EEST
Avatar
Markus Johansson
Moderator
Members

Moderators
Forum Posts: 41
Member Since:
August 6, 2019
sp_UserOfflineSmall Offline

You can try adding “opcTcpAddress” tag with the IP value you wish to use inside “opcTcpAddresses” along with setting “useAllIPAddresses” to false in serverSettings.xml.

Thanks for reporting the issue and we will see if we can get some improvements in future releases. And yes the forum does not like XML.

August 10, 2022
14:07, EEST
Avatar
in-fke
Member
Members
Forum Posts: 26
Member Since:
June 8, 2016
sp_UserOfflineSmall Offline

Thank you for the quick reply Markus, I tried fiddeling with serverSettings.xml but could not get it to work.
My offer stands that we make an online session (GMT+1) you should have my contact data.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 267

Currently Online: felisharedden25
11 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 120

pramanj: 86

ibrahim: 74

rocket science: 65

kapsl: 57

gjevremovic: 49

Sabari: 44

Xavier: 42

fred: 41

TimK: 41

Member Stats:

Guest Posters: 0

Members: 3124

Moderators: 17

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1277

Posts: 5457

Newest Members:

felisharedden25, valentinanoblet, XNXXguini, RobertTop, baileyuup3516, Richardlacle, inezwb11, clarissabeasley, raulakhtar528, claritanisbett4

Moderators: Jouni Aro: 942, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 801, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 25, Teppo Uimonen: 21, Markus Johansson: 41, Niklas Nurminen: 0, Matti Siponen: 209, Lusetti: 0

Administrators: admin: 1