Issue
Below error observed in logs and UI(internal serve error) while logging in to the portal:
2022-11-22 10:41:23.108 ERROR[http-nio-8080-exec-16][JDBCExceptionReporter:234]ERROR: cannot execute SELECT FOR UPDATE in a read-only transaction
andhttps://***.**.**/web/****/login?p_p_id=com_liferay_login_web_portlet_LoginPortlet&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&_com_liferay_login_web_portlet_LoginPortlet_javax.portlet.action=/login/login&_com_liferay_login_web_portlet_LoginPortlet_mvcRenderCommandName=/login/login
Environment
- Liferay 7.4 DXP Update 1
- Postgres DB
Resolution
- This error might be caused because the PostgreSQL server is in recovery(read-only) or standby mode and in order to resolve the issue make sure to remove the PostgreSQL server from recovery mode.