Facing issues with custom deployment (war file)

41 views
Skip to first unread message

Dhruv Vinayak

unread,
Sep 11, 2020, 4:14:17 AM9/11/20
to OpenOlat
Hi Guys,

I was successfully able to deploy war file available in downloads section and start OpenOlat. However, I had to make certain changes so I downloaded the source code and create a new war file.

I tried deploying this war file in the same way, followed the steps mentioned in wiki : https://www.openolat.com/fileadmin/adminwiki/_START_.html . However, I am seeing some issues related to db:

2020-09-11 09:56:03.669 [localhost-startStop-1] ERROR  DatabaseUpgradeManager ^%^ I-J16 ^%^ org.olat.upgrade.DatabaseUpgradeManager ^%^  ^%^  ^%^  ^%^  ^%^ Could not upgrade your database! Please do it manually and add org.postgresql.util.PSQLException: Connection to localhost:3306 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.       at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:303)

Queries:
1. Do I need to take care of any extra steps while deploying a custom war file?
2. If yes, are these steps documented somewhere or can someone please share them with me.
3. I am using postgresql . However, as per above error connection via port 3306 is being tried which I guess is the default port for mysql and not postgresql. Am I missing something in case of db? I am able to access db manually. Any inputs here would be helpful. 

Please find attached logs (i have kept them short and precise)

Looking forward to hearing from you.

Regards,
Dhruv Vinayak
olat.log

Urs Hensler

unread,
Sep 11, 2020, 4:39:13 AM9/11/20
to 'Christian Schweizer' via OpenOlat
Hi

You have to change the port to 5432.

If your have set the database provider in olat.local.propertes:
db.host.port=5432

Or, if you set the JNDI Resource in Tomcat server.xml:
<Resource auth="Container" driverClassName="org.postgresql.Driver"  url="jdbc:postgresql://localhost:5432/openolat” … “/>

Regards,
Urs



--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOlat".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOlat - infinite learning - http://www.openolat.org
---
You received this message because you are subscribed to the Google Groups "OpenOlat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openolat/96bc3e6b-d9fa-41f6-92a3-d2d16d031d59n%40googlegroups.com.
<olat.log>

Dhruv Vinayak

unread,
Sep 11, 2020, 4:56:36 AM9/11/20
to OpenOlat
Hi,

Thanks for your quick reply.

I am setting jndi resource setting in lib/olat.local.properties like this:
db.source=jndi
db.jndi=java:comp/env/jdbc/OpenOLATDS
db.vendor=postgresql
.
.

Also, my ROOT.xml (conf/Catalina/localhost/ROOT.xml) looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<Context path="" docBase="/home/dhruvvinayak/webapp" debug="0" reloadable="false" allowLinking="true">
  <Resource name="jdbc/OpenOLATDS" auth="Container" type="javax.sql.DataSource"
     maxTotal="16" maxIdle="4" maxWaitMillis="60000"
     username="openolat" password="openolat"
     driverClassName="org.postgresql.Driver"
     validationQuery="SELECT 1" 
     validationQueryTimeout="-1" 
     testOnBorrow="true" 
     testOnReturn="false"
     url="jdbc:postgresql://localhost:5432/openolat"/>
</Context>

I followed your steps too, but no luck. Is there anything I am missing here?

Regards,
Dhruv Vinayak

Dhruv Vinayak

unread,
Sep 11, 2020, 8:44:11 AM9/11/20
to open...@googlegroups.com
Hi Guys,

Another question, just out of curiosity:
Is there any difference between the war file from the downloads section and the one that gets created by mvn package command on raw code cloned from git repo?

Regards,
Dhruv Vinayak

You received this message because you are subscribed to a topic in the Google Groups "OpenOlat" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openolat/8Css6gzu2zM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openolat+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openolat/b453de7b-89ac-4877-a023-484b8318db00n%40googlegroups.com.

Urs Hensler

unread,
Sep 11, 2020, 9:57:53 AM9/11/20
to 'Christian Schweizer' via OpenOlat
Hi

Your database configs look good to me. I currently have no further idea what the problem might be.

If you create the war file with Maven, the code will reflect the current state of development. This code contains some new features that have not yet been thoroughly tested. The war file from the web site corresponds to a release (tag in the GIT repository). All functions are tested in this release. There should be no bugs.

Regards,
Urs


Florian Gnägi

unread,
Sep 11, 2020, 10:17:25 AM9/11/20
to open...@googlegroups.com
Did you check your database connection manually? On the console, can you connect?

psql -p 5432 -h localhost --user openolat openolat


Cheers
Florian


--------------------------------------------------------------------
professional services for the e-learning system OpenOlat
hosting - operating - support - development - mobile - consulting
--------------------------------------------------------------------
frentix  GmbH
Florian Gnägi, Geschäftsführer
Okenstrasse 6
CH-8037 Zürich, Switzerland


Find me on wire skype twitter xing linkedin 
--------------------------------------------------------------------

Dhruv Vinayak

unread,
Sep 13, 2020, 12:34:45 PM9/13/20
to open...@googlegroups.com
Hi Florian,
I checked my db connection manually, and it was working fine.

I couldn't find the root cause. Since I had changed code at various places and tried various things , I created a new setup altogether from scratch which is working fine now.

Anyways, thanks for your help.

Regards,
Dhruv Vinayak

Reply all
Reply to author
Forward
0 new messages