[Spacewalk-list] [SW 1.7 I nternal Error when asigning rpms to channel

Registros Web registros.web at gmail.com
Thu Aug 9 09:46:24 UTC 2012


I tried doing what you said, and this is what happened:

- I first tried selecting all packages shown in the page (25), and the
addition failed.
- Then i thought that maybe, among those 25 it was the 'duplicate'
one, so I started adding one by one until all went through.
- Then I decided to try my luck by selecting the whole lot, the 1700+
packages and, to my surprise, they all got added!

So I don't know, it seems there was likely a bug after all. Do you
thing we should fill in that bug report at bugzilla with the info I
have?.

Thanks for your help.
Cheers!
Fred.


“Free software” is a matter of liberty, not price. To understand the
concept, you should think of “free” as in “free speech”, not as in
“free beer”.

Free software is a matter of the users' freedom to run, copy,
distribute, study, change and improve the software.


On Thu, Aug 9, 2012 at 10:38 AM, Registros Web <registros.web at gmail.com> wrote:
> Hi Jan,
>
> After looking all log files, this is all I could find. From the little
> I understand there is a 'duplicate key value' somewhere?. As I said if
> I select just a few packages they get added just fine.
>
> - /var/log/tomcat6/catalina.out:
>
> 2012-08-09 10:10:06,418 [TP-Processor7] WARN
> org.apache.struts.action.RequestProcessor - Unhandled Exception
> thrown: class com.redhat.rhn.common.db.WrappedSQLException
> 2012-08-09 10:10:06,419 [TP-Processor7] ERROR
> com.redhat.rhn.frontend.servlets.SessionFilter - Error during
> transaction. Rolling back
> javax.servlet.ServletException:
> com.redhat.rhn.common.db.WrappedSQLException: ERROR: duplicate key
> value violates unique constraint "rhn_cnp_cid_nid_uq"
>   Where: SQL statement "insert into rhnChannelNewestPackage
> (channel_id, name_id, evr_id, package_id, package_arch_id) (select
> channel_id, name_id, evr_id, package_id, package_arch_id from
> rhnChannelNewestPackageView where channel_id =  $1  and ( $2  is null
> or name_id =  $2 ) )"
> PL/pgSQL function "refresh_newest_package" line 8 at SQL statement
>         at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:520)
>         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:427)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
>         at com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestProcessor.java:99)
>         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at com.redhat.rhn.frontend.servlets.AuthFilter.doFilter(AuthFilter.java:91)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
>         at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.doFilter(LocalizedEnvironmentFilter.java:67)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at com.redhat.rhn.frontend.servlets.EnvironmentFilter.doFilter(EnvironmentFilter.java:108)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at com.redhat.rhn.frontend.servlets.SessionFilter.doFilter(SessionFilter.java:55)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at com.redhat.rhn.frontend.servlets.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:97)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
>         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
>         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
>         at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
>         at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
>         at java.lang.Thread.run(Thread.java:679)
> Caused by: com.redhat.rhn.common.db.WrappedSQLException: ERROR:
> duplicate key value violates unique constraint "rhn_cnp_cid_nid_uq"
>   Where: SQL statement "insert into rhnChannelNewestPackage
> (channel_id, name_id, evr_id, package_id, package_arch_id) (select
> channel_id, name_id, evr_id, package_id, package_arch_id from
> rhnChannelNewestPackageView where channel_id =  $1  and ( $2  is null
> or name_id =  $2 ) )"
> PL/pgSQL function "refresh_newest_package" line 8 at SQL statement
>         at com.redhat.rhn.common.translation.SqlExceptionTranslator.postgreSqlException(SqlExceptionTranslator.java:54)
>         at com.redhat.rhn.common.translation.SqlExceptionTranslator.sqlException(SqlExceptionTranslator.java:44)
>         at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:118)
>         at com.redhat.rhn.common.db.datasource.CachedStatement.executeCallable(CachedStatement.java:511)
>         at com.redhat.rhn.common.db.datasource.CallableMode.execute(CallableMode.java:34)
>         at com.redhat.rhn.domain.channel.ChannelFactory.refreshNewestPackageCache(ChannelFactory.java:581)
>         at com.redhat.rhn.manager.channel.ChannelManager.refreshWithNewestPackages(ChannelManager.java:179)
>         at com.redhat.rhn.manager.channel.ChannelManager.refreshWithNewestPackages(ChannelManager.java:166)
>         at com.redhat.rhn.frontend.action.channel.manage.ChannelPackagesAddConfirmAction.addPackages(ChannelPackagesAddConfirmAction.java:129)
>         at com.redhat.rhn.frontend.action.channel.manage.ChannelPackagesAddConfirmAction.execute(ChannelPackagesAddConfirmAction.java:94)
>         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
>         ... 40 more
> Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key
> value violates unique constraint "rhn_cnp_cid_nid_uq"
>   Where: SQL statement "insert into rhnChannelNewestPackage
> (channel_id, name_id, evr_id, package_id, package_arch_id) (select
> channel_id, name_id, evr_id, package_id, package_arch_id from
> rhnChannelNewestPackageView where channel_id =  $1  and ( $2  is null
> or name_id =  $2 ) )"
> PL/pgSQL function "refresh_newest_package" line 8 at SQL statement
>         at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
>         at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
>         at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
>         at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
>         at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
>         at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:360)
>         at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.execute(NewProxyCallableStatement.java:2417)
>         at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:115)
>         ... 48 more
> 2012-08-09 10:10:06,523 [RHN Message Dispatcher] WARN
> com.redhat.rhn.frontend.events.TraceBackAction - TraceBackAction can't
> find localhost!
> 2012-08-09 10:10:06,523 [RHN Message Dispatcher] ERROR
> com.redhat.rhn.common.messaging.ActionExecutor -
> com.redhat.rhn.common.messaging.MessageExecuteException:
> TraceBackAction can't find localhost!
> com.redhat.rhn.common.messaging.MessageExecuteException:
> TraceBackAction can't find localhost!
>         at com.redhat.rhn.frontend.events.TraceBackAction.getSubject(TraceBackAction.java:51)
>         at com.redhat.rhn.frontend.events.BaseMailAction.execute(BaseMailAction.java:41)
>         at com.redhat.rhn.common.messaging.ActionExecutor.run(ActionExecutor.java:69)
>         at com.redhat.rhn.common.messaging.MessageDispatcher.run(MessageDispatcher.java:58)
>         at java.lang.Thread.run(Thread.java:679)
>
>
>
> - /var/log/tomcat6/localhost.2012-08-09.log:
>
> Aug 9, 2012 10:10:06 AM org.apache.catalina.core.StandardWrapperValve invoke
> SEVERE: Servlet.service() for servlet action threw exception
> org.postgresql.util.PSQLException: ERROR: duplicate key value violates
> unique constraint "rhn_cnp_cid_nid_uq"
>   Where: SQL statement "insert into rhnChannelNewestPackage
> (channel_id, name_id, evr_id, package_id, package_arch_id) (select
> channel_id, name_id, evr_id, package_id, package_arch_id from
> rhnChannelNewestPackageView where channel_id =  $1  and ( $2  is null
> or name_id =  $2 ) )"
> PL/pgSQL function "refresh_newest_package" line 8 at SQL statement
>         at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
>         at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
>         at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
>         at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
>         at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
>         at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:360)
>         at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.execute(NewProxyCallableStatement.java:2417)
>         at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:115)
>         at com.redhat.rhn.common.db.datasource.CachedStatement.executeCallable(CachedStatement.java:511)
>         at com.redhat.rhn.common.db.datasource.CallableMode.execute(CallableMode.java:34)
>         at com.redhat.rhn.domain.channel.ChannelFactory.refreshNewestPackageCache(ChannelFactory.java:581)
>         at com.redhat.rhn.manager.channel.ChannelManager.refreshWithNewestPackages(ChannelManager.java:179)
>         at com.redhat.rhn.manager.channel.ChannelManager.refreshWithNewestPackages(ChannelManager.java:166)
>         at com.redhat.rhn.frontend.action.channel.manage.ChannelPackagesAddConfirmAction.addPackages(ChannelPackagesAddConfirmAction.java:129)
>         at com.redhat.rhn.frontend.action.channel.manage.ChannelPackagesAddConfirmAction.execute(ChannelPackagesAddConfirmAction.java:94)
>         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
>         at com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestProcessor.java:99)
>         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>         at javax.servlet.http.HttpServl
>
>
>
>
>
>
>
>
>
>
> “Free software” is a matter of liberty, not price. To understand the
> concept, you should think of “free” as in “free speech”, not as in
> “free beer”.
>
> Free software is a matter of the users' freedom to run, copy,
> distribute, study, change and improve the software.
>
>
> On Thu, Aug 9, 2012 at 8:56 AM, Jan Hutař <jhutar at redhat.com> wrote:
>> On Wed, 8 Aug 2012 17:17:48 +0200 Registros Web
>> <registros.web at gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> First of all i'd like to say hello to everyone in the list,
>>> since I'm new around here.
>>>
>>> I'm testing spacewalk 1.7 on Centos 6 and everything has gone
>>> smoothly in the installation process, thanks to the guides in
>>> the Spacewalk and Centos wikis.
>>>
>>> But right now I am getting an 'Internal Server Error' when
>>> trying to add some rpms (uploaded via rpmpush) to a Software
>>> Channel. I have over 1500 unassigned packages and the error
>>> occurs when I do a 'Select All', then 'Confirm Addition' and
>>> finally press 'Add packages'. If I try adding just a few of
>>> them it works fine. if I select to display 25 packages in the
>>> page and select all of them visible in the page, they are
>>> added just fine. Same happens If I select to display 50
>>> packages, but fails when I select 100.
>>>
>>> Am I doing something wrong or is this some kind of bug?
>>>
>>> Cheers,
>>> Fred.
>>
>> Hello,
>> this sounds more like a bug. Could you please post your logs:
>>
>> https://fedorahosted.org/spacewalk/wiki/SpacewalkFaq#IgotInternalServerError.Pleasehelp
>>
>> Thanks,
>> Jan
>>
>>
>>
>> --
>> Jan Hutar     Systems Management QA
>> jhutar at redhat.com     Red Hat, Inc.




More information about the Spacewalk-list mailing list