You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is now an Epic (and is also related to epic 1611)(MB 11/6/23: related, but not part of, epic 1611. Was related because original intent was to check site properties directory was writeable. That has been completed)
As a metacat admin, I do NOT want metacat to start up in a semi-functional mode if it's misconfigured and/or doesn't have access to critical resources. Instead, I want startup to be aborted, with clear and helpful log messages showing why, so I know how to fix the problem.
NOTE: be careful what we add here! Sometimes, we want to allow Metacat to start with
incomplete dependencies, since these are configured later through the admin interface --
e.g. database connection & solr for non-k8s deployments
Metacat startup is aborted if metacat-site.properties is not found AND /var/metacat is not writeable by the metacat user (details below).
Logs contain clear messaging about what caused the aborted startup
Logs contain clear information to help the reader fix the problem
============================================
Details:
On startup, metacat tries to load the site properties from the default location (/var/metacat/config/metacat-site.properties)
If it doesn't exist, metacat tries to create a new, empty file at this same location. If it succeeds, all is well
However, there’s an edge case where that doesn't work (because /var/ isn't writeable, for example). If this happens, there are clear errors in the logs:
(catalina.out):
metacat 20230524-18:51:16: [ERROR]: PropertiesWrapper.initSitePropertiesFilePath():
a general I/O error occurred while trying to create directory hierarchy or actual
file for site properties at: /var/metacat/config/metacat-site.properties; see
exception message for details [edu.ucsb.nceas.metacat.properties.PropertiesWrapper:logAndThrow:482]
java.nio.file.AccessDeniedException: /var/metacat
(+ stack trace…)
(and localhost..log):
javax.servlet.ServletException: Service problem while intializing MetaCat Servlet:
PropertiesWrapper.initSitePropertiesFilePath(): a general I/O error occurred while
trying to create directory hierarchy or actual file for site properties at:
/var/metacat/config/metacat-site.properties; see exception message for details : /var/metacat
(+ stack trace…)
…but the metacat app continues to limp along and throw NullPointerExceptions whenever something makes a call to PropertyService.
artntek
changed the title
Abort Metacat Startup if Misconfigured and/or Critical Resources are Inaccessible
EPIC: Abort Metacat Startup if Misconfigured and/or Critical Resources are Inaccessible
Dec 6, 2023
This is now an Epic
(and is also related to epic 1611)(MB 11/6/23: related, but not part of, epic 1611. Was related because original intent was to check site properties directory was writeable. That has been completed)As a metacat admin, I do NOT want metacat to start up in a semi-functional mode if it's misconfigured and/or doesn't have access to critical resources. Instead, I want startup to be aborted, with clear and helpful log messages showing why, so I know how to fix the problem.
Issues Related to this Epic:
Abort Metacat Startup ifmetacat-site.properties
is not found and can't be created #1669NOTE: be careful what we add here! Sometimes, we want to allow Metacat to start with
incomplete dependencies, since these are configured later through the admin interface --
e.g. database connection & solr for non-k8s deployments
============================================
ALL DONE IN PR #1633
Acceptance Criteria
Metacat startup is aborted ifmetacat-site.properties
is not found AND/var/metacat
is not writeable by the metacat user (details below).Logs contain clear messaging about what caused the aborted startupLogs contain clear information to help the reader fix the problem============================================
Details:
/var/metacat/config/metacat-site.properties
)(catalina.out):
(and localhost..log):
…but the metacat app continues to limp along and throw
NullPointerException
s whenever something makes a call to PropertyService.also see google doc
The text was updated successfully, but these errors were encountered: