Internal Server Error in Overview and Systems pages within SUSE Manager Server web-UI
This document (000020385) is provided subject to the disclaimer at the end of this document.
Environment
Situation
- Home/Overview
- Systems
Rest of the pages are displayed correctly. Following error message appears in rhn_web_ui.log
...
2021-09-01 15:09:01,455 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-19] INFO org.directwebremoting.log.accessLog - Method execution failed:
com.redhat.rhn.common.db.WrappedSQLException: ERROR: more than one row returned by a subquery used as an expression
at com.redhat.rhn.common.translation.SqlExceptionTranslator.postgreSqlException(SqlExceptionTranslator.java:50)
at com.redhat.rhn.common.translation.SqlExceptionTranslator.sqlException(SqlExceptionTranslator.java:40)
at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:143)
at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:494)
at com.redhat.rhn.common.db.datasource.CachedStatement.lambda$executeChecking$1(CachedStatement.java:451)
at org.hibernate.jdbc.WorkExecutor.executeReturningWork(WorkExecutor.java:55)
...
and postgresql.log reports:
... 2021-09-01 16:57:09.075 CEST susemanager susemanager [5232]ERROR: current transaction is aborted, commands ignored until end of transaction block 2021-09-01 16:57:09.075 CEST susemanager susemanager [5232]STATEMENT: select 'c3p0 ping' from dual 2021-09-01 16:57:09.173 CEST susemanager susemanager [5231]ERROR: more than one row returned by a subquery used as an expression 2021-09-01 16:57:09.173 CEST susemanager susemanager [5231]STATEMENT: SELECT S.id, S.NAME, S.info, S.created, (SELECT 1 FROM rhnServerFeaturesView SFV WHERE SFV.server_id = S.id AND SFV.label = 'ftr_system_grouping') AS selectable, (select C.name from rhnChannel C inner join rhnServerChannel SC on SC.channel_id = C.id where SC.server_id = S.id and C.parent_channel IS NULL) AS CHANNEL_LABELS, (SELECT wc.login FROM web_contact wc WHERE wc.id = s.creator_id) as creator_name FROM rhnServer S WHERE S.org_id = $1 AND EXISTS (SELECT 1 FROM rhnUserServerPerms USP WHERE USP.user_id = $2 AND USP.server_id = S.id) AND S.created > current_timestamp - numtodsinterval($3 * 86400, 'second') ORDER BY S.created DESC 2021-09-01 16:57:09.174 CEST susemanager susemanager [5231]ERROR: current transaction is aborted, commands ignored until end of transaction block 2021-09-01 16:57:09.174 CEST susemanager susemanager [5231]STATEMENT: select 'c3p0 ping' from dual 2021-09-01 16:57:30.393 CEST susemanager susemanager [5233]ERROR: more than one row returned by a subquery used as an expression 2021-09-01 16:57:30.393 CEST susemanager susemanager [5233]STATEMENT: SELECT SERVER_ID AS ID, OUTDATED_PACKAGES, SERVER_NAME, security_errata, bug_errata, enhancement_errata, SERVER_ADMINS, GROUP_COUNT, MODIFIED, CHANNEL_LABELS, CHANNEL_ID, HISTORY_COUNT, unique_crash_count, total_crash_count, LAST_CHECKIN_DAYS_AGO, PENDING_UPDATES, OS, RELEASE, SERVER_ARCH_NAME, LAST_CHECKIN, LOCKED, PROXY_ID AS IS_RHN_PROXY FROM rhnServerOverview WHERE server_id IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25) ORDER BY UPPER(COALESCE(SERVER_NAME, '(none)')), SERVER_ID ...
Resolution
echo "select s.id serverid, C.id channelid, C.name, C.label, C.parent_channel from rhnserver s, rhnChannel C, rhnServerChannel SC where SC.server_id = s.id and SC.channel_id = C.id and C.parent_channel IS NULL order by s.id;" | spacewalk-sql --select-mode -
Any server ID that has more than one entry in that output should be causing the issue. Such server IDs needs to be removed from SUSE Manager Server by running:
spacecmd system_delete system_ID
Cause
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000020385
- Creation Date: 09-Sep-2021
- Modified Date:13-Sep-2021
-
- SUSE Manager Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com