I ran into a funny situation today and that cost me a lot of time. Maybe this post helps other users to avoid the issue.
This has nothing to do with extending RTC, but it shows that the devil is in the details, so I wanted to share it.
Do you know which characters you can use in host names? I obviously didn’t and that cost me 2 hours.
While trying to finalize a workshop, I was blocked by an odd error message during the setup. I have never seen this error before and I installed the same version last week – several times. The error said: “An unspecified server error has occurred”.
When I continued to the next page of the wizard, no public URI was visible. I was very confused. I looked into the jts log file and there was an exception that complained about an illegal host name. The host name I used was prod_a. I am relatively sure that I had used the same name in the past, without issues. It was still in my hosts file on my machine.
So I blamed auto update, new Java versions and all other potential root causes for it. Trying to find a potential reason and work around I installed and set up RTC over and over. I tried different versions of RTC. To no avail. I even tried localhost – but the old name was in the configuration somewhere, so this did not fly either. Finally I did a full new install with localhost and that worked.
Since I had also changed the hosts file, I blamed myself for some issue with editing, tidied that up a bit and tried the original name prod_a again. Same result as before.
I finally gave in and looked at the Wikipedia entry on host names. Only a-z, 0-9 and – (hyphen) are allowed in host names. I was not aware of that fact and others might not be as well.
The disturbing issue is that browser(s) I used do not have any problem with the host name. They use it, Tomcat works with it too. It is only in the JTS server, when the name is validated, that an exception is thrown. This has nothing to do with a defect in the programming. Basic Java classes for managing URI’s throw the exception. The only thing that could be done in the application would be a better error message – and a hint to Wikipedia.
My Learning, what could I have done different?
- Trust the error messages and log files and evaluate into that direction
- Read available information on the internet, even if you think you already know all the facts
- Regardless how often you did a task, you still can run into trouble
I hope this was at least interesting to read and helps others that run into into something similar and are so smart to look into the internet for solutions.