Ah, thanks. That's yielded this message: uyuni01:~ # echo "select delete_channel(102);" | spacewalk-sql --select-mode-direct - psql:<stdin>:1: ERROR: update or delete on table "rhnchannel" violates foreign key constraint "rhn_channel_parent_ch_fk" on table "rhnchannel" DETAIL: Key (id)=(102) is still referenced from table "rhnchannel". CONTEXT: SQL statement "delete from rhnChannel where id = channel_id_in" PL/pgSQL function delete_channel(numeric) line 13 at SQL statement uyuni01:~ # Allen B. -- Allen Beddingfield Systems Engineer Office of Information Technology The University of Alabama Office 205-348-2251 allen@ua.edu ________________________________________ From: Abid Mehmood <amehmood@suse.de> Sent: Friday, February 24, 2023 10:06 AM To: users@lists.uyuni-project.org Subject: Re: [EXTERNAL] Re: "Internal Server Error" when displaying channels on 2023.01 ah my mistake, this should work echo "select delete_channel(102);" | spacewalk-sql --select-mode-direct - Best regards, Abid On 24.02.23 17:05, Allen Beddingfield wrote:
Abid, Thanks for the suggestion. When I try that, it yields this error:
uyuni01:~ # echo "delete_channel(102);" | spacewalk-sql --select-mode-direct - psql:<stdin>:1: ERROR: syntax error at or near "delete_channel" LINE 1: delete_channel(102);
I tried single quotes as well. Also, I'm wondering if there is a way to determine the numerical ID for a channel? If I knew that, maybe I could try the spacewalk-remove-channel command on it? Allen B.
-- Allen Beddingfield Systems Engineer Office of Information Technology The University of Alabama Office 205-348-2251 allen@ua.edu
________________________________________ From: Abid Mehmood <amehmood@suse.de> Sent: Friday, February 24, 2023 9:49 AM To: users@lists.uyuni-project.org Subject: Re: [EXTERNAL] Re: "Internal Server Error" when displaying channels on 2023.01
Hi Allen,
Not sure, how you get into this situation. But before starting from scratch, just try removing the channel with id 102 from the sever.
You can execute the following command to do that, be aware this is not recommended but can be used as last resort
$ echo "delete_channel(102);" | spacewalk-sql --select-mode-direct -
Best regards,
Abid
On 24.02.23 16:29, Allen Beddingfield wrote:
Anyone have any ideas on how to get out of this mess? If I can't get this running soon, I'm going to have to just start over from scratch with a new Uyuni server, and I don't want to have to do that. Allen B.
-- Allen Beddingfield Systems Engineer Office of Information Technology The University of Alabama Office 205-348-2251 allen@ua.edu<mailto:allen@ua.edu>
________________________________________ From: Allen Beddingfield <allen@ua.edu><mailto:allen@ua.edu> Sent: Thursday, February 23, 2023 9:41 AM To: General discussion related to the openSUSE Uyuni project Subject: Re: [EXTERNAL] Re: "Internal Server Error" when displaying channels on 2023.01
Yes, this error occurs over and over in that log file:
2023-02-23 08:57:48,297 [ajp-nio-127.0.0.1-8009-exec-1] ERROR com.redhat.rhn.frontend.servlets.SessionFilter - Error during transaction. Rolling back javax.servlet.ServletException: org.hibernate.HibernateException: More than one row with the given identifier was found: 102, for class: com.redhat.rhn.domain.channel.Channel at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) ~[struts.jar:1.2.9] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) ~[struts.jar:1.2.9] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:237) ~[struts.jar:1.2.9] at com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestProcessor.java:104) ~[rhn.jar:?] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) ~[struts.jar:1.2.9] at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) ~[struts.jar:1.2.9] at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) ~[tomcat-servlet-4.0-api.jar:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-servlet-4.0-api.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[catalina.jar:9.0.36] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.36] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-websocket.jar:9.0.36] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.36] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.36] at com.redhat.rhn.frontend.servlets.AuthFilter.doFilter(AuthFilter.java:99) ~[rhn.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.36] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.36] at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:142) ~[sitemesh.jar:?] at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58) ~[sitemesh.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.36] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.36] at com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.doFilter(LocalizedEnvironmentFilter.java:71) ~[rhn.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.36] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.36] at com.redhat.rhn.frontend.servlets.EnvironmentFilter.doFilter(EnvironmentFilter.java:102) ~[rhn.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.36] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.36] at com.redhat.rhn.frontend.servlets.SessionFilter.doFilter(SessionFilter.java:59) [rhn.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.36] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.36] at com.redhat.rhn.frontend.servlets.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:98) [rhn.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.36] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.36] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [catalina.jar:9.0.36] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:9.0.36] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [catalina.jar:9.0.36] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [catalina.jar:9.0.36] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.36] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) [catalina.jar:9.0.36] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [catalina.jar:9.0.36] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.36] at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:432) [tomcat-coyote.jar:9.0.36] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote.jar:9.0.36] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote.jar:9.0.36] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1591) [tomcat-coyote.jar:9.0.36] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.36] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.36] at java.lang.Thread.run(Thread.java:829) [?:?] Caused by: org.hibernate.HibernateException: More than one row with the given identifier was found: 102, for class: com.redhat.rhn.domain.channel.Channel at org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.extractEntityResult(AbstractLoadPlanBasedEntityLoader.java:254) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.load(AbstractLoadPlanBasedEntityLoader.java:198) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:4290) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:604) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:572) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:226) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:350) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.event.internal.DefaultLoadEventListener.doOnLoad(DefaultLoadEventListener.java:127) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:93) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.internal.SessionImpl.fireLoadNoChecks(SessionImpl.java:1277) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1265) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.internal.SessionImpl.access$2000(SessionImpl.java:208) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.doLoad(SessionImpl.java:2901) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2875) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at org.hibernate.internal.SessionImpl.get(SessionImpl.java:1097) ~[hibernate5_hibernate-core.jar:5.3.25.Final] at com.redhat.rhn.domain.channel.ChannelFactory.lookupById(ChannelFactory.java:85) ~[rhn.jar:?] at com.redhat.rhn.frontend.dto.ChannelTreeNode.compareTo(ChannelTreeNode.java:395) ~[rhn.jar:?] at com.redhat.rhn.frontend.dto.ChannelTreeNode.compareTo(ChannelTreeNode.java:33) ~[rhn.jar:?] at java.util.ComparableTimSort.binarySort(ComparableTimSort.java:262) ~[?:?] at java.util.ComparableTimSort.sort(ComparableTimSort.java:207) ~[?:?] at java.util.Arrays.sort(Arrays.java:1315) ~[?:?] at java.util.Arrays.sort(Arrays.java:1509) ~[?:?] at java.util.ArrayList.sort(ArrayList.java:1750) ~[?:?] at java.util.Collections.sort(Collections.java:145) ~[?:?] at com.redhat.rhn.frontend.filter.TreeFilter.handleOrphans(TreeFilter.java:197) ~[rhn.jar:?] at com.redhat.rhn.frontend.filter.TreeFilter.filterData(TreeFilter.java:93) ~[rhn.jar:?] at com.redhat.rhn.frontend.listview.ListControl.filterData(ListControl.java:167) ~[rhn.jar:?] at com.redhat.rhn.manager.BaseManager.processListControl(BaseManager.java:184) ~[rhn.jar:?] at com.redhat.rhn.manager.BaseManager.makeDataResult(BaseManager.java:94) ~[rhn.jar:?] at com.redhat.rhn.manager.channel.ChannelManager.myChannelTree(ChannelManager.java:269) ~[rhn.jar:?] at com.redhat.rhn.frontend.action.channel.MyChannelTreeAction.getDataResult(MyChannelTreeAction.java:34) ~[rhn.jar:?] at com.redhat.rhn.frontend.action.channel.BaseChannelTreeAction.execute(BaseChannelTreeAction.java:55) ~[rhn.jar:?] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) ~[struts.jar:1.2.9]
-- Allen Beddingfield Systems Engineer Office of Information Technology The University of Alabama Office 205-348-2251 allen@ua.edu<mailto:allen@ua.edu>
________________________________________ From: Cedric Bosdonnat via Uyuni Users <users@lists.uyuni-project.org><mailto:users@lists.uyuni-project.org> Sent: Thursday, February 23, 2023 8:57 AM To: users@lists.uyuni-project.org<mailto:users@lists.uyuni-project.org> Cc: Cedric Bosdonnat Subject: [EXTERNAL] Re: "Internal Server Error" when displaying channels on 2023.01
Hi Allen,
You can check in the /var/log/rhn/rhn_web_ui.log file if there is any stack trace that could be related to the issue. This would help us help you.
-- Cedric
On Thu, 2023-02-23 at 14:44 +0000, Allen Beddingfield wrote:
I'm getting an "Internal Server Error" message when trying to access "All" or "My Channels" under Software/Channel List. The server was recently updated to 2023.01, but that was working after the update. The only change I can think of that I have made is to do try to add the Leap 15.4 channels again, as they were display but not syncing. I did that with similar commands to this for the channels: spacewalk-common-channels -a x86_64 opensuse_leap15_4 Any help in troubleshooting this would be appreciated! Thanks. Allen B.
-- Allen Beddingfield Systems Engineer Office of Information Technology The University of Alabama Office 205-348-2251 allen@ua.edu<mailto:allen@ua.edu>