03-29-2020 04:22 PM
I just set up a fresh Alfresco Community 6.2 on a VM of centos 7.
Problem is that, I have set alfresco.global.properties file to connect to PostgreSQL but in logs it shows that it is trying to connect with MySQL. I have copied the driver jar file postgresql-42.2.6.jar to the lib folder of tomcat as well as to the shared/lib folder inside tomcat home directory. I used the version postgresql-42.2.11.jar also but same error is thrown.
How can I make it connect to PostgresSQL. Am I missing something?
I have set following databse settings in alfresco.global.properties file
Following is the log of alfresco.log
03-30-2020 04:30 AM
Alfresco is not picking up your alfresco-global.properties file. How did you install Alfresco?
In an "old school" installation, tomcat bundle must be modified a bit to pick up you properties file from tipical shared/classes route. Check that you have properly set up catalina.properties file @ tomcat/conf, specify shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar.
Hope it helps
03-30-2020 04:30 AM
Alfresco is not picking up your alfresco-global.properties file. How did you install Alfresco?
In an "old school" installation, tomcat bundle must be modified a bit to pick up you properties file from tipical shared/classes route. Check that you have properly set up catalina.properties file @ tomcat/conf, specify shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar.
Hope it helps
03-30-2020 01:52 PM
Thanks @narkuss for the pointer. I had made this entry in the catalina.properties file already.
But that gave me a pointer to the actual problem. And the problem was in the environment variable.
I did echo to check the value of environment variable "CATALINA_BASE", and it was blank. And that is why, tomcat was not able to load the shared folder's alfresco-global.properties file. "shared.loader" property in catalina.properties file uses this env variable to build path to /shared/classes folder. Since it was blank so the path to /shared/classes was not getting completely build and therefore ultimately alfresco-global.properties file was not getting loaded.
In the file /etc/systemd/system/tomcat.service, I was setting environment ariables as follows:
Environment=CATALINA_HOME=/usr/local/tomcat-8_5_53
Environment=CATALINA_BASE=/usr/local/tomcat-8_5_53
Don't know why it didn't work.
I replaced it with following and it worked like a charm.
export CATALINA_HOME=/usr/local/tomcat-8_5_53
export CATALINA_BASE=/usr/local/tomcat-8_5_53
But yes remember to change things as tomcat user or if changing as root, then run command
chown -R tomcat:tomcat /usr/local/tomcat-8_5_53
otherwise access related issue would come up.
However, I see a repeated error in log file which I am further looking into.
ERROR [org.alfresco.repo.content.transform.LocalTransformServiceRegistry] [QuartzScheduler_Worker-2] 02300021 Failed to connect or to read the response from T-Engine on http://localhost:8093/transform/config
03-31-2020 09:23 AM
Hi @logicallimit,
Great that you've resolved your issue. Thanks also for your detailed explanation of the solution - helps others with a similar problem.
Cheers,
03-30-2020 04:32 AM
I guess your alfresco-global.properties is not being loaded.
Did you configure Tomcat to load the "shared/classes" folder? Usually this is done with the alfresco.xml file located in "tomcat/conf/Catalina/localhost" folder.
03-30-2020 07:14 AM
Minor correction to @angelborroy 's answer. The shared/classes folder is typically configured within tomcat/conf/catalina.properties - the tomcat/conf/Catalina/localhost/alfresco.xml file can be used to configure an external directory as an extension to the classpath of Alfresco, but that (in the past) typically mapped to <installRoot>/modules/platform.
Technically, it can be used to configure shared/classes as well, but that would be against common Tomcat conventions and might confuse people more familiar with Tomcat than Alfresco.
03-30-2020 01:54 PM
Thanks @afaust for the extra information. That was also pretty useful to track down to the root cause of my problem.
03-30-2020 01:53 PM
@angelborroyYes you are right. It was not getting loaded due to CATALINA_BASE being not set.
Explore our Alfresco products with the links below. Use labels to filter content by product module.