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
Error of using OPCUA Browser in Linux
August 21, 2024
15:02, EEST
Avatar
sapsan
Member
Members
Forum Posts: 3
Member Since:
August 21, 2024
sp_UserOfflineSmall Offline

Can`t use OPC UA Browser in AstraLinux OS. I have this error stack:
myuser@teststation:/opt/prosys-opc-ua-browser$ ./UaBrowser
Setting log4j.configurationFile system property to /home/vnc/.prosysopc/prosys-opc-ua-browser/log4j2.xml
08/21/2024 14:31:55.882 INFO [main] com.prosysopc.ua.app.uabrowser.UaBrowserLauncher [] – Starting UaBrowser version 5.0.0-173..
08/21/2024 14:31:55.883 INFO [main] com.prosysopc.ua.app.uabrowser.UaBrowserLauncher [] – Conf location: /home/vnc/.prosysopc/prosys-opc-ua-browser/conf.xml
авг. 21, 2024 2:31:55 PM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from ‘unnamed module @6e2829c7’

(java:12315): Gtk-WARNING **: 14:31:56.029: Theme parsing error: gtk.css:3877:13: Not using units is deprecated. Assuming ‘px’.
08/21/2024 14:31:56.578 INFO [main] com.prosysopc.fx.library.utility.managedservices.ManagedServiceManager [] – Services for start order S2_CONF_FILE_LOAD : [j [NEW]]
08/21/2024 14:31:56.584 INFO [main] com.prosysopc.fx.library.utility.managedservices.ManagedServiceManager [] – Services for start order S3_AFTER_CONF_FILE_LOAD : [b [NEW], a [NEW]]
08/21/2024 14:31:56.584 INFO [main] com.prosysopc.fx.library.utility.managedservices.ManagedServiceManager [] – Services for start order S5_UI_START : [i [NEW]]
08/21/2024 14:31:56.584 INFO [main] com.prosysopc.fx.library.utility.managedservices.ManagedServiceManager [] – Services for start order S6_MAIN : [a [NEW]]
08/21/2024 14:31:56.586 INFO [main] com.prosysopc.fx.library.utility.managedservices.ManagedServiceManager [] – Starting: {NEW=[j [NEW]]}
08/21/2024 14:31:56.647 INFO [main] com.prosysopc.fx.library.utility.managedservices.ManagedServiceManager [] – Starting: {NEW=[b [NEW], a [NEW]]}
08/21/2024 14:31:56.648 INFO [pool-5-thread-1] com.prosysopc.ua.app.uabrowser.core.a [] – Loading ApplicationInstanceCertificates
08/21/2024 14:31:56.650 INFO [main] com.prosysopc.fx.library.utility.managedservices.ManagedServiceManager [] – Starting: {NEW=[i [NEW]]}
08/21/2024 14:31:56.651 INFO [main] com.prosysopc.fx.library.utility.managedservices.ManagedServiceManager [] – Starting: {NEW=[a [NEW]]}
08/21/2024 14:31:56.683 INFO [JavaFX Application Thread] com.prosysopc.ua.app.uabrowser.i [] – Loaded font:Font[name=Roboto, family=Roboto, style=Regular, size=12.0]
08/21/2024 14:31:56.685 INFO [JavaFX Application Thread] com.prosysopc.ua.app.uabrowser.i [] – Loaded font:Font[name=Roboto Bold, family=Roboto, style=Bold, size=12.0]
08/21/2024 14:31:56.686 INFO [JavaFX Application Thread] com.prosysopc.ua.app.uabrowser.i [] – Loaded font:Font[name=Roboto Italic, family=Roboto, style=Italic, size=12.0]
08/21/2024 14:31:56.688 INFO [JavaFX Application Thread] com.prosysopc.ua.app.uabrowser.i [] – Loaded font:Font[name=Roboto Bold Italic, family=Roboto, style=Bold Italic, size=12.0]
08/21/2024 14:31:56.816 INFO [JavaFX Application Thread] com.prosysopc.ua.app.uabrowser.i [] – Showing main window
08/21/2024 14:31:56.868 ERROR [pool-5-thread-1] com.prosysopc.ua.app.uabrowser.core.a [] – Failed to load ApplicationInstanceCertificates
java.lang.IllegalArgumentException: ApplicationURI should not contain ‘localhost’.
at com.prosysopc.ua.g.a(SourceFile:317) ~[application-5.0.0-173.jar:5.0.0-173]
at com.prosysopc.ua.g.b(SourceFile:954) ~[application-5.0.0-173.jar:5.0.0-173]
at com.prosysopc.ua.g.a(SourceFile:709) ~[application-5.0.0-173.jar:5.0.0-173]
at com.prosysopc.ua.g.a(SourceFile:562) ~[application-5.0.0-173.jar:5.0.0-173]
at com.prosysopc.ua.app.uabrowser.core.a.lL(SourceFile:71) ~[application-5.0.0-173.jar:5.0.0-173]
at com.prosysopc.ua.app.uabrowser.core.a.lM(SourceFile:97) ~[application-5.0.0-173.jar:5.0.0-173]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.base/java.lang.Thread.run(Thread.java:833) [?:?]
08/21/2024 14:31:56.872 ERROR [pool-5-thread-1] com.prosysopc.ua.app.uabrowser.i [] – Could not load SingleClient
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: ApplicationURI should not contain ‘localhost’.
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:636) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162) ~[?:?]
at com.prosysopc.ua.app.uabrowser.core.a.lL(SourceFile:82) ~[application-5.0.0-173.jar:5.0.0-173]
at com.prosysopc.ua.app.uabrowser.core.a.lM(SourceFile:97) ~[application-5.0.0-173.jar:5.0.0-173]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.base/java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.IllegalArgumentException: ApplicationURI should not contain ‘localhost’.
at com.prosysopc.ua.g.a(SourceFile:317) ~[application-5.0.0-173.jar:5.0.0-173]
at com.prosysopc.ua.g.b(SourceFile:954) ~[application-5.0.0-173.jar:5.0.0-173]
at com.prosysopc.ua.g.a(SourceFile:709) ~[application-5.0.0-173.jar:5.0.0-173]
at com.prosysopc.ua.g.a(SourceFile:562) ~[application-5.0.0-173.jar:5.0.0-173]
at com.prosysopc.ua.app.uabrowser.core.a.lL(SourceFile:71) ~[application-5.0.0-173.jar:5.0.0-173]
… 4 more
The OPC UA Browse application window opens, but then the wheel with the inscription loading spins endlessly. It is impossible to work. There is nowhere to enter the address, the window is clean.

August 21, 2024
15:43, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

We cannot test every distribution, basically we officially support (and test) only Ubuntu, but it should run on equivalent distributions. Regarding the error please ensure your machine has a hostname/computername set (see e.g. what ‘hostname’ returns on the command line). The value ‘localhost’ is not a valid hostname regarding OPC UA for forming ApplicationURI as they must be unique within a network.

August 21, 2024
15:56, EEST
Avatar
sapsan
Member
Members
Forum Posts: 3
Member Since:
August 21, 2024
sp_UserOfflineSmall Offline

The application should not crash because “localhost” is being used somewhere internally. Of course, the computer has a normal name other than “localhost”.
I find conf.xml where was history quik links containts “localhost”. After removing them, prestarting did nothing. I comment “localhost” in hosts file, but is same result.
In log wrote – ApplicationURI should not contain ‘localhost’.What application can have an ApplicationURI containing “localhost”?

August 21, 2024
16:41, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Under normal conditions we do receive the hostname from Java itself. This is a somewhat complicated process as we try to resolve the canonical form of it (i.e. fully qualified version). That normally does a reverse-DNS on the localhost-hostname address. However, before that is even attempted, seems we do have some ‘localhost’-returning-fallback in a “magical case” if the InetAddress.getLocalHost() (https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/InetAddress.html#getLocalHost()) itself fails on a UnknownHostException (has not happened in any of the operating systems we have tested). IF you could edit the (user.home)/.prosysopc/prosysopc-opc-ua-browser/log4j2.xml and change there the “com.prosysopc.ua” to be WARN (or INFO) instead of ERROR, then something like “Cannot determine Hostname. Using ‘localhost'” should be observable if this is the case. IF this is the case, then it is something between Java and the operating system i.e. outside of our control.

conf.xml etc. ‘localhosts’ do not matter, they are connection address (and we prefil few common ones there), for that is it is ok, ApplicationURI has nothing to do with those, it is just a network-unique identifier for any OPC UA application (and they must be unique) and are also used for creating ApplicationInstanceCertificates.

August 21, 2024
17:07, EEST
Avatar
sapsan
Member
Members
Forum Posts: 3
Member Since:
August 21, 2024
sp_UserOfflineSmall Offline

That’s right. Advanced logging showed exactly what you wrote about. Let’s look at what we have with the OS settings.

August 21, 2024
17:49, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Based on the javadocs of InetAddress.getLocalHost() “UnknownHostException – if the local host name could not be resolved into an address.” so most likely Java was able to get the hostname, but the OS wouldn’t DNS resolve that then to the machine’s IP address (what exact to use here would vary, Windows typically gives the real IP, some linux distros might give 127.0.0.1 and some do give an interesting 127.0.1.1), for this application it probably doesn’t matter what exact one of these it would be, just that it needs to be able to resolve it to just something since the InetAddress does always have an IP address portion.

For example in Ubuntu the ‘hosts’ file does have a line that says
127.0.1.1 COMPUTER_NAME_HERE

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
56 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: 734

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1523

Posts: 6449

Newest Members:

christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16, edgardo3518

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

Administrators: admin: 1