Foros de discusión

Hooks uninstall themselves on Tomcat restart

Lee Chamberlain, modificado hace 7 años.

Hooks uninstall themselves on Tomcat restart

Junior Member Mensajes: 92 Fecha de incorporación: 5/05/16 Mensajes recientes
Whenever I restart Tomcat a couple of hooks I've added to Liferay uninstall themselves.

This hasn't been a problem, as I've just been able to recopy the hooks into the webapps folder manually and everything was fine.

It's now getting increasingly difficult to do this. I've tried copying them back across 5 times this morning, and they've not been picked up by Liferay.

Has anyone else had this problem and know a way around it?

Thanks
L
thumbnail
Olaf Kock, modificado hace 7 años.

RE: Hooks uninstall themselves on Tomcat restart

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
Lee Chamberlain:
Whenever I restart Tomcat a couple of hooks I've added to Liferay uninstall themselves.


What's the method you use to stop/start Tomcat? This shouldn't happen: While the logs might state that hooks are "uninstalled" from Liferay (not from tomcat) on shutdown, they should be reinstalled on startup. If they physically disappear from the webapps folder (assuming you're using 6.2), something else is wrong - maybe some system policy to always start with a known state, e.g. to fight erroneously installed webapps, assuming that they've been a security threat?

If you're on Linux, you might want to try to add a harden/soften option to the daemon's startup script like I've documented here (Ctrl-F "harden") so that tomcat can't write to the webapps folder at all, unless you explicitly "soften" the permissions (e.g. to install/upgrade a hook)
Lee Chamberlain, modificado hace 7 años.

RE: Hooks uninstall themselves on Tomcat restart

Junior Member Mensajes: 92 Fecha de incorporación: 5/05/16 Mensajes recientes
We use Apache Tomcat server on prod and Eclipse on dev. It happens both ways (though obviously not as big a problem on dev).

The hook folders stay in webapps folder, but for some reason they need to be redeployed either manually (in prod) or via eclipse (dev).
thumbnail
Matthieu Levesque, modificado hace 6 años.

RE: Hooks uninstall themselves on Tomcat restart

Junior Member Mensajes: 64 Fecha de incorporación: 13/02/09 Mensajes recientes
I know it's an old thread, but we're having the same issue with 6.2. The only hook that has that symptom is one that overwrites a delivered jsp.

The hook is present in the webapp folder but the jsp that render the output is the vanilla one from Liferay 6.2. A simple redeploy fix this but it's not the best option.

I'll try to post anything I find.
thumbnail
Olaf Kock, modificado hace 6 años.

RE: Hooks uninstall themselves on Tomcat restart

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
I lost track of this post back then - if you find steps to reproduce, they'd be interesting. I've never observed this behavior.