> Sent: Tuesday, April 05, 2011 5:11 AM > On Fri, Mar 25, 2011 at 05:46:01PM -0400, Flaherty, Patrick wrote: > > After switching over to the postgres backend, I'm occasionally > getting > > the following traceback when attempting to change a single host's > > channel assignment. The browser hangs and finally returns a 500. The > > system shows iowaits in the 40s to 90s before I get the 500, and then > > the iowaits return to normal when the 500 comes back. > > > > So, since it says: > > IntegrityError: duplicate key value violates unique constraint > > "rhn_sp_snep_uq" > > > > Should I be investigating the iowaits, or the unique constraints > error? > > Can you be more specific about the actions that you do? You say > "attempting to change a single host's channel assignment" but the > traceback is from the server handler of registration code which is > no longer used by the latest RHN client tools / yum-rhn-plugin. > > Is the attempt to change channel some rhnreg_ks with activation key, > or what exactly do you (knowingly) call? Is the list of the packages > in /var/log/up2date? You might need to bump up the debug option in > /etc/sysconfig/rhn/up2date to see the packages listed there.
This install of spacewalk has been around for a couple years. We started with one of the early 0. releases (maybe 0.5?), and have been upgrading in place whenever a new release comes out since then. Could there be cruft and code / database entries that need to be purged? Steps to reproduce: * Open browser, navigate to spacewalk web interface * Login * Click systems * Click host * Click "Alter Subscriptions" * Receive 500 and a traceback. The traceback I received today when doing those step was *not* the one with the uniq_key_restraint error. It could be that I had older spacewalk clients checking in/registering around the same time as I got the 500 last time and mixed up the tracebacks. I've included today's traceback. There are also a few systems that cause rhn tracebacks when they check in, I'll send in a separate email / thread for those. Patrick The following exception occurred while executing this request: GET /rhn/systems/details/SystemChannels.do Date:4/5/11 11:18:46 AM EDT Headers: host: local_spacewalk_server user-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 CentOS/3.6-2.el5.centos Firefox/3.6.13 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-language: en-us,en;q=0.5 accept-encoding: gzip,deflate accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 connection: keep-alive referer: https://local_spacewalk_server/rhn/systems/details/Overview.do?sid=10000 10000 cookie: JSESSIONID=4FA3972BCE4B6CB4CDCF49B87E18CD97; pxt-session-cookie=8257x99c65ebedd7dcce6710f76ef73994a72 Request: Local Name = local_spacewalk_server Server Name = local_spacewalk_server Requested Session Id came from Cookie Requested Session Valid = true Session = org.apache.catalina.session.StandardSessionFacade@17620cf[session=Standa rdSession[4FA3972BCE4B6CB4CDCF49B87E18CD97]] Protocol = https Request Locale = en_US Request Character Encoding = UTF-8 Attribute Names = rhnActiveLang, javax.servlet.jsp.jstl.fmt.timeZone.request, systemChannelsForm, avail_child_channels, javax.servlet.request.key_size, requestedUri, javax.servlet.request.ssl_session, org.apache.struts.action.MESSAGE, system, session, __sitemesh__filterapplied, javax.servlet.request.cipher_suite, org.apache.struts.action.mapping.instance, org.apache.struts.action.MODULE, User Information: User spacewalkadmin (id 1, org_id 1) Exception: javax.servlet.ServletException: ERROR: syntax error at or near "c" at org.apache.struts.action.RequestProcessor.processException(RequestProces sor.java:535) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:433) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 237) at com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestPro cessor.java:82) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:188) at com.redhat.rhn.frontend.servlets.AuthFilter.doFilter(AuthFilter.java:101 ) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter. java:142) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.j ava:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:188) at com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.doFilter(Loc alizedEnvironmentFilter.java:67) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:188) at com.redhat.rhn.frontend.servlets.EnvironmentFilter.doFilter(EnvironmentF ilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:188) at com.redhat.rhn.frontend.servlets.SessionFilter.doFilter(SessionFilter.ja va:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:188) at com.redhat.rhn.frontend.servlets.SetCharacterEncodingFilter.doFilter(Set CharacterEncodingFilter.java:97) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 51) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:775) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: 704) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket. java:897) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:685) at java.lang.Thread.run(Thread.java:636) Caused by: com.redhat.rhn.common.db.WrappedSQLException: ERROR: syntax error at or near "c" at com.redhat.rhn.common.translation.SqlExceptionTranslator.postgreSqlExcep tion(SqlExceptionTranslator.java:56) at com.redhat.rhn.common.translation.SqlExceptionTranslator.sqlException(Sq lExceptionTranslator.java:45) at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedSta tement.java:141) at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatem ent.java:453) at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatem ent.java:430) at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatem ent.java:336) at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatem ent.java:341) at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatem ent.java:281) at com.redhat.rhn.common.db.datasource.SelectMode.execute(SelectMode.java:1 09) at com.redhat.rhn.manager.BaseManager.makeDataResult(BaseManager.java:57) at com.redhat.rhn.manager.channel.ChannelManager.listBaseEusChannelsByVersi onReleaseAndServerArch(ChannelManager.java:2222) at com.redhat.rhn.manager.channel.ChannelManager.listBaseChannelsForSystem( ChannelManager.java:1997) at com.redhat.rhn.frontend.action.systems.sdc.SystemChannelsAction.unspecif ied(SystemChannelsAction.java:124) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j ava:249) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187 ) at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct ion.java:150) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:431) ... 40 more Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "c" at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecu torImpl.java:1525) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImp l.java:1309) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java: 188) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stateme nt.java:452) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdb c2Statement.java:354) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stateme nt.java:347) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPrepa redStatement.java:651) at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedSta tement.java:138) ... 54 more _______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list
