Back

Setting up a domain to use for Klaros

Toggle
Setting up a domain to use for Klaros
deployment domain virtualhost
Answer
5/25/19 11:29 AM
Good day.
I am using the community edition and trying to set up the tomcat installed with Klaros to use a domain instead of the default installation URL, which is something like http://192.168.1.19/klaros-web. The intend behind it is to access Klaros installation with through a public domain name, such as qa.example.com.

I have added the following to the conf/server.xml file:

12345678
<Host name="qa.example.com" debug="0" appBase="webapps/klaros-web"
        unpackWARs="false"
    xmlValidation="false" xmlNamespaceAware="false">

<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs"  prefix="qa.example.com\_log." suffix=".txt" timestamp="true"/>

</Host>

Also added the following to conf/Catalina/qa.example.com/ROOT.xml:
1234
<?xml version='1.0' encoding='utf-8'?>
<Context displayName="qa.example.com" docBase="" path=""
workDir="work/Catalina/qa.example.com/_">
</Context>
After the restart, when I type in the URL http://qa.example.com:18080/ in the browser, I get:

This qa.example.com page can’t be foundNo webpage was found for the web address: http://qa.example.com:18080/HTTP ERROR 404========================ANY HELP IS MUCH APPRECIATED.
Thank you.
0 (0 Votes)

RE: Setting up a domain to use for Klaros
Answer
5/22/19 2:30 PM as a reply to Musa Haidari.
Hi Musa,

welcome to the Klaros-Testmanagement community and thanks for your detailed description!

Could you send the log files from the /Klaros-Testmanagement/logs folder to support@verit.de? I would like to take a look at them, since a HTTP 404 error can have many different causes.

Regards,
Fabian
+1 (1 Vote)

RE: Setting up a domain to use for Klaros
Answer
5/22/19 9:02 PM as a reply to Musa Haidari.
Hello Musa,

please make sure that the following is working:

Any host running the web browser should resolve qa.example.com to 192.168.1.19 properly. You may check this by 'ping qa.example.com' and 'nslookup 192.168.1.19'.

I think that you have started the browser on the same host that you are running Klaros and youre DNS settings do only resolve 192.168.1.19 to the local name of your host (qams.npadevops.local).

Everything above is happening outside of scope of the application. You must fix your DNS settings.

Hope this helps,

Torsten
+1 (1 Vote)

RE: Setting up a domain to use for Klaros
Answer
5/25/19 11:48 AM as a reply to Musa Haidari.
Dear team,
Thank you for the quick response and the time you have dedicated for this issue to work, and sorry for the late reply as I was not in the office for 3 days.

For the first reply, I have attached the logs in the logs folder and made some request to the domain I was configuring, but this time, a log file for the domain was not created in the folder.

For the 2nd reply, I am not requesting from the same machine, we are on two different machines and I have added the record to point qa.example.com to 192.168.1.19 to both hosts files, from the machine I am sending request to and the machine Klaros is hosted on. The ping on both machines resolves to the correct IP address.

Please let me know if I can provide any more information.
0 (0 Votes)

RE: Setting up a domain to use for Klaros
Answer
5/25/19 7:50 PM as a reply to Musa Haidari.
Hello Musa,

thanks for supplying the logs files and the added information.

From the log files I see that the application is not starting up properly as apparently the default Derby database is opened twice, which is not supported by Derby in general:

Caused by: org.apache.derby.iapi.error.StandardException: Another instance of Derby may have already booted the database /root/.klaros/klarosDerby.

The above may happen, if two war instances are loaded at the same time. Please check if there are still other tomcat instances running.

But in this case I think this is due to the fact that two klaros web applications are active in the same container. Did you make any changes to the webapps folder?

If you intend to access klaros under the URL qa.example.com:18080/klaros-web only a klaros-web.war file and optionally the exploded klaros-web folder should be present. If you intend to access klaros under the URL qa.example.com:18080/ the war file should be renamed to ROOT.war and the klaros-web folder must be removed.

Hope this helps. You may also need to set a proper application base URL under Configure / System if you are using this setup.

On a side note: Please be aware that changes to the tomcat configuration will get overwritten with any update of the application. Dont forget a backup ...

We generally recommend a proxy web server (e.g. Apache with mod_proxy) for enabling HTTPS and changing hostname/port configurations.

Please let me know if this works for you.

Regards,

Torsten
+1 (1 Vote)

RE: Setting up a domain to use for Klaros
Answer
5/26/19 12:29 PM as a reply to Musa Haidari.
Thank you for the solution, I have been able to configure the domain by renaming klaros.war to ROOT.war
0 (0 Votes)