I have a Java application (JMRI JMRI: A Java Model Railroad Interface ) that provides a service to Android clients. I have problems getting the application to advertise its service. Messages from the console are included at the bottom of this post. The Norwegian part of it means “Name or service unknown”.
This part of JMRI used to work when i had Ubuntu on my machine, so I assume that there is a problem with my OpenSuse installation. According to yast the two services avahi-deamon and avahi-dnsconfd are running. Can anyone help with this?
Regards,
Bjorn
17269 zeroconf.ZeroConfService WARN - Unable to create JmDNS with error: linux-ytc9.site: linux-ytc9.site: Navn eller tjeneste ukjent [Thread-18]
17270 ptionhandler.UncaughtExceptionHandler ERROR - Unhandled Exception: java.lang.NullPointerException [Thread-18]
java.lang.NullPointerException
at jmri.util.zeroconf.ZeroConfService.publish(ZeroConfService.java:206)
at jmri.jmrit.withrottle.UserInterface.listen(UserInterface.java:267)
at jmri.jmrit.withrottle.ServerThread.run(UserInterface.java:428)
If I were to guess (and there’s plenty of guessing based on the little you posted)
As the error suggests, the code is expecting a namespace, and more specifically a hardcoded external URL provided by DNS or a Hosts file.
The URL (if I’m guessing right) is unresolved.
Conceivably, if the namespace isn’t “external” provided by DNS or Hosts file, then you have an internal coding problem or a missing reference/dependency.
Thanks TSU,
linux-ytc9.site is the host name of my machine. To me it looks like the java application cannot find the IP-address of my machine.
Shouldn’t I be able to ping my own machine by its hostname? here is what I get: