Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing environment variables TOMCAT_HOME #330

Closed
Fikili opened this issue Apr 23, 2022 · 8 comments · Fixed by #331
Closed

Missing environment variables TOMCAT_HOME #330

Fikili opened this issue Apr 23, 2022 · 8 comments · Fixed by #331
Labels
bug Something isn't working as expected tracked Issue is being tracked internally

Comments

@Fikili
Copy link
Contributor

Fikili commented Apr 23, 2022

Bug description

After resolving issues in #328 and not handling errors reported in #329, I can see that Alfresco cannot startup because of missing environment variables.

If I start Alfresco repository by sudo systemctl start alfresco-content.service, I get error message visible using journalctl -xe:

Apr 23 11:46:40 tomcat.sh[31057]: /bin/bash: /bin/catalina.sh: No such file or directory
Apr 23 11:46:40 systemd[1]: alfresco-content.service: Control process exited, code=exited status=127
Apr 23 11:46:40 systemd[1]: alfresco-content.service: Failed with result 'exit-code'.

The same error message can be seen if I run startup command directly by alfresco user:

$ /opt/alfresco/tomcat.sh start
/bin/bash: /bin/catalina.sh: No such file or directory

The problem is caused by missing environment variables. If I run part of tomcat.sh manually, I can see that value for "CATALINA_HOME" is empty:

$ . /etc/opt/alfresco/setenv.sh
$ export CATALINA_HOME=${TOMCAT_HOME}
$ env | grep CATA
CATALINA_HOME=

The problem here is caused already by missing "TOMCAT_HOME"

Target OS

RHEL 8.3

Ansible error

The error is not visible during Ansible deploy but after that once Alfresco repository is started.

Ansible context

Same as #328

@alxgomz
Copy link
Contributor

alxgomz commented Apr 23, 2022

Hi @Fikili ,

This is most likely something we introduced recently in master. @gionn told me about the exact same thing on friday and according to him this is something linked with idempotency. So most likely, everything works ok if the playbook works on the first try. But in some cases it may fail after a second/third run...
Do you remember if you had to restart the playbook and if so at what stage it did fail?

@alxgomz alxgomz added the bug Something isn't working as expected label Apr 23, 2022
@alxgomz
Copy link
Contributor

alxgomz commented Apr 23, 2022

Bug confirmed & introduced by: d5decf4#diff-ac0f65d3b426670bcb415da9b458d4236af17cb17d3e9bb01e86106b13e2828eL55

Now tracked in OPSEXP-1424

@Fikili
Copy link
Contributor Author

Fikili commented Apr 25, 2022

Hi @alxgomz,

At the moment, I am not able to run the playbook without issues so it is very likely that issue is related to idempotency. Thanks for tracking that as a new bug.

@alxgomz
Copy link
Contributor

alxgomz commented Apr 25, 2022

Hi @Fikili ,

Can you give https://github.com/Alfresco/alfresco-ansible-deployment/commits/opsexp-1424 a try?
I was hoping to test and merge to master but libreoffice download seem to fail miserably since this morning and tests cannot complete.

@Fikili
Copy link
Contributor Author

Fikili commented Apr 25, 2022

Let me try

@Fikili
Copy link
Contributor Author

Fikili commented Apr 25, 2022

@alxgomz I have the same issue as you, LibreOffice installer is not available.
http://downloadarchive.documentfoundation.org/libreoffice/old/7.0.6.2/rpm/x86_64//LibreOffice_7.0.6.2_Linux_x86-64_rpm.tar.gz

I will try to find that rpm somewhere and use it.

@alxgomz
Copy link
Contributor

alxgomz commented Apr 25, 2022

Ah yes ofc, triggering the cleanup procedure wil force downloading artifacts again.
On my side I've restarted the tests as the download seems a bit healthier right now 🤞

@Fikili
Copy link
Contributor Author

Fikili commented Apr 25, 2022

Hi @alxgomz,

I can confirm that issue is not visible anymore. Thanks for help.

@gionn gionn added the tracked Issue is being tracked internally label Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected tracked Issue is being tracked internally
Projects
None yet
3 participants