Avatar
Please consider registering
guest
sp_LogInOut Log Insp_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 RSSsp_TopicIcon
Source of com.prosysopc.ua.stack.common.ServiceResultException: Bad_InternalError (code=0x80020000, description="2147614720, Unsupported address type")
June 3, 2025
17:40, EEST
Avatar
Bt14
New Member
Members
Forum Posts: 2
Member Since:
June 3, 2025
sp_UserOfflineSmall Offline

Hi,
I am using the server SDK from ProSys (latest version as of June 2025), running under Java 17. I have created an OPC.UA Server (based on the demo code), and inside IntelliJ, it all works fine.
When I try to run it outside of Intellij, I get an exception like this:
com.prosysopc.ua.server.UaServerException: Failed to initialize server endpoint: opc.tcp://AAAA.BBBB.org:52520/OPCUA/MyServer
at com.prosysopc.ua.server.UaServer.t(SourceFile:2403)
at com.prosysopc.ua.server.UaServer.csy(SourceFile:2418)
at com.prosysopc.ua.server.UaServer.start(SourceFile:2272)
….(some line removed that are not relevant)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: com.prosysopc.ua.stack.common.ServiceResultException: Bad_InternalError (code=0x80020000, description=”2147614720, Unsupported address type”)
at com.prosysopc.ua.stack.transport.tcp.nio.OpcTcpServer.bind(SourceFile:513)
at com.prosysopc.ua.stack.application.Server.bind(SourceFile:232)
at com.prosysopc.ua.server.UaServer.t(SourceFile:2372)
… 14 more
Caused by: java.net.SocketException: Unsupported address type
at java.base/sun.nio.ch.Net.translateToSocketException(Unknown Source)
at java.base/sun.nio.ch.Net.translateException(Unknown Source)
at java.base/sun.nio.ch.Net.translateException(Unknown Source)
at java.base/sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at com.prosysopc.ua.stack.utils.asyncsocket.ListenableServerSocketChannel.bind(SourceFile:139)
at com.prosysopc.ua.stack.utils.asyncsocket.AsyncServerSocket.bind(SourceFile:130)
at com.prosysopc.ua.stack.transport.tcp.nio.OpcTcpServer.bind(SourceFile:490)

I am running outside of IntelliJ using shadowjar (id “com.github.johnrengelman.shadow” version “7.1.2”), gradleVersion = ‘7.3.3’, but I have excluded ProSys jars and jars it depends on from the shadowjar. The classpath is fine, the same classes are available inside Intellj as outside.
If anyone has a clue what is going wrong please give me a hint.

June 4, 2025
10:02, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1052
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Can you try starting an unmodified sampleconsoleserver example and does it create the same exception? If not then there is some difference vs. your code that you can try to find.

Did you mean on the same machine or different one?

Depending on UaServer.setEnableIPv6(boolean) (default true) we either try to bind to the IPv6 ([::], this also listens on IPv4) or IPv4 wildcard (0.0.0.0) which does listen to all interfaces. If UaServer.setBindAddresses(..) is set (default null) then then those addresses are instead used for binding.

A typical scenario would be if the machine wouldn’t support IPv6 networking, but I think the exception should have different text then in the “Caused by: java.net.SocketException: Unsupported address type” (but that is from java itself, not us).

June 4, 2025
13:07, EEST
Avatar
Bt14
New Member
Members
Forum Posts: 2
Member Since:
June 3, 2025
sp_UserOfflineSmall Offline

Thanks!
Adding UaServer.setEnableIPv6(false) fixed the problem, it works fine when running from a shadowjar.
I did put the sampleconsoleserver into a shadowjar (was my first experiment after I bought ProSys), and it worked fine without UaServer.setEnableIPv6(false), so it is confusing that my main application seems to need it, but only when running in a shadowjar. I ran my main application using all individual jars added to my classpath, and that also worked fine without UaServer.setEnableIPv6(false).

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 24
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 99
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 769
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1556
Posts: 6563
Newest Members:
odellflournoy9, Robertlom, kimhastings59, fentuy, KBrendel, GarryTerse, Shawnreify, Albertfug, madisonkilburn0, renafitchett0
Moderators: Jouni Aro: 1039, Pyry: 1, Petri: 1, Bjarne Boström: 1052, Jimmy Ni: 26, Matti Siponen: 359, Lusetti: 0
Administrators: admin: 1