Upgrade to katello 2.2 failed

Hi,

I am trying to upgrade katello from 2.1 to 2.2, I followed the instruction,
but when I run command katello-installer --upgrade, it prompt me these
errors:

katello ODW [/home/sxin] 1001# katello-installer --upgrade
Upgrading…
Upgrade Step: stop_services…
Upgrade Step: start_mongo…
Upgrade Step: migrate_pulp…
Upgrade Step: migrate_candlepin…
Upgrade step migrate_candlepin failed. Check logs for more information.
/usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in error': wrong number of arguments (21 for 1) (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:insend'
from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in
dump_buffer' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:ineach'
from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in
dump_buffer' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:103:ineach'
from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:103:in
dump_buffer' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:94:indump_errors'
from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:99:in
dump_errors' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/exit_handler.rb:26:inexit'
from
/usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:124:in
exit' from /usr/share/katello-installer/hooks/pre/30-upgrade.rb:53:infail_and_exit'
from /usr/share/katello-installer/hooks/pre/30-upgrade.rb:47:in
upgrade_step' from /usr/share/katello-installer/hooks/pre/30-upgrade.rb:66:inload'
from
/usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hook_context.rb:13:in
instance_exec' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hook_context.rb:13:inexecute'
from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hooking.rb:48:in
execute' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hooking.rb:47:ineach_pair'
from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hooking.rb:47:in
execute' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:304:inrun_installation'
from
/usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:111:in
execute' from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:inrun'
from
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:126:in run' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:118:inrun'
from /usr/sbin/katello-installer:46

by checking the log, I found:

[ERROR 2015-05-18 18:46:56 main]
########## ERROR ############
Error running command: liquibase --driver=org.postgresql.Driver
–classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/
–changeLogFile=db/changelog/changelog-update.xml
–url=jdbc:postgresql:candlepin --username=candlepin
–password=LyWExzKrbtdfbqAtpnnpJr8We2unGojr migrate -Dcommunity=False
Status code: 65280
Command output: Liquibase update Failed: Migration failed for change set
db/changelog/20150211111319-add-last-guest-update-table.xml::20150211111319-2::dgoodwin:
Reason: liquibase.exception.DatabaseException: Error executing SQL
INSERT INTO cp_guest_ids_checkin(id, consumer_id, created, updated)
SELECT DISTINCT cp_consumer.id, cp_consumer.id,
cp_consumer_guests.created, cp_consumer_guests.updated FROM cp_consumer
INNER JOIN cp_consumer_guests ON cp_consumer.id =
cp_consumer_guests.consumer_id: 错误: 重复键违反唯一约束"cp_guest_ids_checkin_pkey"

Migrating candlepin database
Traceback (most recent call last):
File "/usr/share/candlepin/cpdb", line 245, in <module>
dbsetup.update()
File "/usr/share/candlepin/cpdb", line 69, in update
self._run_liquibase("db/changelog/changelog-update.xml")
File "/usr/share/candlepin/cpdb", line 92, in _run_liquibase
self.community))
File "/usr/share/candlepin/cpdb", line 38, in run_command
error_out(command, status, output)
File "/usr/share/candlepin/cpdb", line 46, in error_out
raise Exception("Error running command")
Exception: Error running command

[ERROR 2015-05-18 18:46:56 main] Upgrade step migrate_candlepin failed.
Check logs for more information.
[DEBUG 2015-05-18 18:46:56 main] Exit with status code: 1 (signal was 1)
[ERROR 2015-05-18 18:46:56 main] Repeating errors encountered during run:
[ERROR 2015-05-18 18:46:56 main] <NilClass> nil

Can anyone please advise how to fix this.

Thanks

What version of java is the system using?

Eric

··· On May 18, 2015 6:49 AM, "sinux shen" wrote:

Hi,

I am trying to upgrade katello from 2.1 to 2.2, I followed the
instruction, but when I run command katello-installer --upgrade, it prompt
me these errors:

katello ODW [/home/sxin] 1001# katello-installer --upgrade
Upgrading…
Upgrade Step: stop_services…
Upgrade Step: start_mongo…
Upgrade Step: migrate_pulp…
Upgrade Step: migrate_candlepin…
Upgrade step migrate_candlepin failed. Check logs for more information.
/usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in error': wrong number of arguments (21 for 1) (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:insend’
from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in
dump_buffer' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:ineach’
from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in
dump_buffer' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:103:ineach’
from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:103:in
dump_buffer' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:94:indump_errors’
from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:99:in
dump_errors' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/exit_handler.rb:26:inexit’
from
/usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:124:in
exit' from /usr/share/katello-installer/hooks/pre/30-upgrade.rb:53:infail_and_exit’
from /usr/share/katello-installer/hooks/pre/30-upgrade.rb:47:in
upgrade_step' from /usr/share/katello-installer/hooks/pre/30-upgrade.rb:66:inload’
from
/usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hook_context.rb:13:in
instance_exec' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hook_context.rb:13:inexecute’
from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hooking.rb:48:in
execute' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hooking.rb:47:ineach_pair’
from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hooking.rb:47:in
execute' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:304:inrun_installation’
from
/usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:111:in
execute' from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:inrun’
from
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:126:in run' from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:118:inrun’
from /usr/sbin/katello-installer:46

by checking the log, I found:

[ERROR 2015-05-18 18:46:56 main]
########## ERROR ############
Error running command: liquibase --driver=org.postgresql.Driver
–classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/
–changeLogFile=db/changelog/changelog-update.xml
–url=jdbc:postgresql:candlepin --username=candlepin
–password=LyWExzKrbtdfbqAtpnnpJr8We2unGojr migrate -Dcommunity=False
Status code: 65280
Command output: Liquibase update Failed: Migration failed for change set
db/changelog/20150211111319-add-last-guest-update-table.xml::20150211111319-2::dgoodwin:
Reason: liquibase.exception.DatabaseException: Error executing SQL
INSERT INTO cp_guest_ids_checkin(id, consumer_id, created, updated)
SELECT DISTINCT cp_consumer.id, cp_consumer.id,
cp_consumer_guests.created, cp_consumer_guests.updated FROM cp_consumer
INNER JOIN cp_consumer_guests ON cp_consumer.id =
cp_consumer_guests.consumer_id: 错误: 重复键违反唯一约束"cp_guest_ids_checkin_pkey"

Migrating candlepin database
Traceback (most recent call last):
File “/usr/share/candlepin/cpdb”, line 245, in
dbsetup.update()
File “/usr/share/candlepin/cpdb”, line 69, in update
self._run_liquibase(“db/changelog/changelog-update.xml”)
File “/usr/share/candlepin/cpdb”, line 92, in _run_liquibase
self.community))
File “/usr/share/candlepin/cpdb”, line 38, in run_command
error_out(command, status, output)
File “/usr/share/candlepin/cpdb”, line 46, in error_out
raise Exception(“Error running command”)
Exception: Error running command

[ERROR 2015-05-18 18:46:56 main] Upgrade step migrate_candlepin failed.
Check logs for more information.
[DEBUG 2015-05-18 18:46:56 main] Exit with status code: 1 (signal was 1)
[ERROR 2015-05-18 18:46:56 main] Repeating errors encountered during run:
[ERROR 2015-05-18 18:46:56 main] nil

Can anyone please advise how to fix this.

Thanks


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

This is our java version

[sxin@katello ODW] $ java -version
java version "1.7.0_75"
OpenJDK Runtime Environment (rhel-2.5.4.0.el6_6-x86_64 u75-b13)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

··· On Monday, May 18, 2015 at 7:46:00 PM UTC+8, Eric Helms wrote: > > What version of java is the system using? > > Eric > On May 18, 2015 6:49 AM, "sinux shen" <sinux...@gmail.com > > wrote: > >> Hi, >> >> I am trying to upgrade katello from 2.1 to 2.2, I followed the >> instruction, but when I run command katello-installer --upgrade, it prompt >> me these errors: >> >> katello ODW [/home/sxin] 1001# katello-installer --upgrade >> Upgrading... >> Upgrade Step: stop_services... >> Upgrade Step: start_mongo... >> Upgrade Step: migrate_pulp... >> Upgrade Step: migrate_candlepin... >> Upgrade step migrate_candlepin failed. Check logs for more information. >> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in `error': >> wrong number of arguments (21 for 1) (ArgumentError) >> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in >> `send' >> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in >> `dump_buffer' >> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in >> `each' >> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in >> `dump_buffer' >> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:103:in >> `each' >> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:103:in >> `dump_buffer' >> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:94:in >> `dump_errors' >> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:99:in >> `dump_errors' >> from >> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/exit_handler.rb:26:in `exit' >> from >> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:124:in >> `exit' >> from /usr/share/katello-installer/hooks/pre/30-upgrade.rb:53:in >> `fail_and_exit' >> from /usr/share/katello-installer/hooks/pre/30-upgrade.rb:47:in >> `upgrade_step' >> from /usr/share/katello-installer/hooks/pre/30-upgrade.rb:66:in `load' >> from >> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hook_context.rb:13:in >> `instance_exec' >> from >> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hook_context.rb:13:in >> `execute' >> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hooking.rb:48:in >> `execute' >> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hooking.rb:47:in >> `each_pair' >> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hooking.rb:47:in >> `execute' >> from >> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:304:in >> `run_installation' >> from >> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:111:in >> `execute' >> from >> /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:in `run' >> from >> /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:126:in `run' >> from >> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:118:in >> `run' >> from /usr/sbin/katello-installer:46 >> >> by checking the log, I found: >> >> [ERROR 2015-05-18 18:46:56 main] >> ########## ERROR ############ >> Error running command: liquibase --driver=org.postgresql.Driver >> --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/ >> --changeLogFile=db/changelog/changelog-update.xml >> --url=jdbc:postgresql:candlepin --username=candlepin >> --password=LyWExzKrbtdfbqAtpnnpJr8We2unGojr migrate -Dcommunity=False >> Status code: 65280 >> Command output: Liquibase update Failed: Migration failed for change set >> db/changelog/20150211111319-add-last-guest-update-table.xml::20150211111319-2::dgoodwin: >> Reason: liquibase.exception.DatabaseException: Error executing SQL >> INSERT INTO cp_guest_ids_checkin(id, consumer_id, created, updated) >> SELECT DISTINCT cp_consumer.id, cp_consumer.id, >> cp_consumer_guests.created, cp_consumer_guests.updated FROM cp_consumer >> INNER JOIN cp_consumer_guests ON cp_consumer.id = >> cp_consumer_guests.consumer_id: 错误: 重复键违反唯一约束"cp_guest_ids_checkin_pkey" >> >> Migrating candlepin database >> Traceback (most recent call last): >> File "/usr/share/candlepin/cpdb", line 245, in >> dbsetup.update() >> File "/usr/share/candlepin/cpdb", line 69, in update >> self._run_liquibase("db/changelog/changelog-update.xml") >> File "/usr/share/candlepin/cpdb", line 92, in _run_liquibase >> self.community)) >> File "/usr/share/candlepin/cpdb", line 38, in run_command >> error_out(command, status, output) >> File "/usr/share/candlepin/cpdb", line 46, in error_out >> raise Exception("Error running command") >> Exception: Error running command >> >> [ERROR 2015-05-18 18:46:56 main] Upgrade step migrate_candlepin failed. >> Check logs for more information. >> [DEBUG 2015-05-18 18:46:56 main] Exit with status code: 1 (signal was 1) >> [ERROR 2015-05-18 18:46:56 main] Repeating errors encountered during run: >> [ERROR 2015-05-18 18:46:56 main] nil >> >> >> Can anyone please advise how to fix this. >> >> Thanks >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/d/optout. >> >

Hi Eric,

Is there any more info I need to supply?

··· On Tuesday, May 19, 2015 at 10:14:27 AM UTC+8, sinux shen wrote: > > This is our java version > > [sxin@katello ODW] $ java -version > java version "1.7.0_75" > OpenJDK Runtime Environment (rhel-2.5.4.0.el6_6-x86_64 u75-b13) > OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode) > > > On Monday, May 18, 2015 at 7:46:00 PM UTC+8, Eric Helms wrote: >> >> What version of java is the system using? >> >> Eric >> On May 18, 2015 6:49 AM, "sinux shen" wrote: >> >>> Hi, >>> >>> I am trying to upgrade katello from 2.1 to 2.2, I followed the >>> instruction, but when I run command katello-installer --upgrade, it prompt >>> me these errors: >>> >>> katello ODW [/home/sxin] 1001# katello-installer --upgrade >>> Upgrading... >>> Upgrade Step: stop_services... >>> Upgrade Step: start_mongo... >>> Upgrade Step: migrate_pulp... >>> Upgrade Step: migrate_candlepin... >>> Upgrade step migrate_candlepin failed. Check logs for more information. >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in >>> `error': wrong number of arguments (21 for 1) (ArgumentError) >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in `send' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in >>> `dump_buffer' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in `each' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:104:in >>> `dump_buffer' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:103:in `each' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:103:in >>> `dump_buffer' >>> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:94:in >>> `dump_errors' >>> from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/logger.rb:99:in >>> `dump_errors' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/exit_handler.rb:26:in `exit' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:124:in >>> `exit' >>> from /usr/share/katello-installer/hooks/pre/30-upgrade.rb:53:in >>> `fail_and_exit' >>> from /usr/share/katello-installer/hooks/pre/30-upgrade.rb:47:in >>> `upgrade_step' >>> from /usr/share/katello-installer/hooks/pre/30-upgrade.rb:66:in >>> `load' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hook_context.rb:13:in >>> `instance_exec' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hook_context.rb:13:in >>> `execute' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hooking.rb:48:in `execute' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hooking.rb:47:in `each_pair' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/hooking.rb:47:in `execute' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:304:in >>> `run_installation' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:111:in >>> `execute' >>> from >>> /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:in `run' >>> from >>> /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:126:in `run' >>> from >>> /usr/lib/ruby/gems/1.8/gems/kafo-0.6.6/lib/kafo/kafo_configure.rb:118:in >>> `run' >>> from /usr/sbin/katello-installer:46 >>> >>> by checking the log, I found: >>> >>> [ERROR 2015-05-18 18:46:56 main] >>> ########## ERROR ############ >>> Error running command: liquibase --driver=org.postgresql.Driver >>> --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/ >>> --changeLogFile=db/changelog/changelog-update.xml >>> --url=jdbc:postgresql:candlepin --username=candlepin >>> --password=LyWExzKrbtdfbqAtpnnpJr8We2unGojr migrate -Dcommunity=False >>> Status code: 65280 >>> Command output: Liquibase update Failed: Migration failed for change set >>> db/changelog/20150211111319-add-last-guest-update-table.xml::20150211111319-2::dgoodwin: >>> Reason: liquibase.exception.DatabaseException: Error executing SQL >>> INSERT INTO cp_guest_ids_checkin(id, consumer_id, created, updated) >>> SELECT DISTINCT cp_consumer.id, cp_consumer.id, >>> cp_consumer_guests.created, cp_consumer_guests.updated FROM cp_consumer >>> INNER JOIN cp_consumer_guests ON cp_consumer.id = >>> cp_consumer_guests.consumer_id: 错误: 重复键违反唯一约束"cp_guest_ids_checkin_pkey" >>> >>> Migrating candlepin database >>> Traceback (most recent call last): >>> File "/usr/share/candlepin/cpdb", line 245, in >>> dbsetup.update() >>> File "/usr/share/candlepin/cpdb", line 69, in update >>> self._run_liquibase("db/changelog/changelog-update.xml") >>> File "/usr/share/candlepin/cpdb", line 92, in _run_liquibase >>> self.community)) >>> File "/usr/share/candlepin/cpdb", line 38, in run_command >>> error_out(command, status, output) >>> File "/usr/share/candlepin/cpdb", line 46, in error_out >>> raise Exception("Error running command") >>> Exception: Error running command >>> >>> [ERROR 2015-05-18 18:46:56 main] Upgrade step migrate_candlepin failed. >>> Check logs for more information. >>> [DEBUG 2015-05-18 18:46:56 main] Exit with status code: 1 (signal was 1) >>> [ERROR 2015-05-18 18:46:56 main] Repeating errors encountered during run: >>> [ERROR 2015-05-18 18:46:56 main] nil >>> >>> >>> Can anyone please advise how to fix this. >>> >>> Thanks >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Foreman users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to foreman-user...@googlegroups.com. >>> To post to this group, send email to forema...@googlegroups.com. >>> Visit this group at http://groups.google.com/group/foreman-users. >>> For more options, visit https://groups.google.com/d/optout. >>> >>

I get the same error as above:

[ INFO 2015-05-28 11:11:23 main] Upgrade Step: migrate_candlepin…
[ERROR 2015-05-28 11:11:30 main]
########## ERROR ############
Error running command: liquibase --driver=org.postgresql.Driver
–classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/
–changeLogFile=db/changelog/changelog-update.xml
–url=jdbc:postgresql:candlepin --username=candlepin --password= migrate
-Dcommunity=False
Status code: 65280
Command output: Liquibase update Failed: Migration failed for change set
db/changelog/20150211111319-add-last-guest-update-table.xml::20150211111319-2::dgoodwin:
Reason: liquibase.exception.DatabaseException: Error executing SQL
INSERT INTO cp_guest_ids_checkin(id, consumer_id, created, updated)
SELECT DISTINCT cp_consumer.id, cp_consumer.id,
cp_consumer_guests.created, cp_consumer_guests.updated FROM cp_consumer
INNER JOIN cp_consumer_guests ON cp_consumer.id =
cp_consumer_guests.consumer_id: ERROR: duplicate key value violates unique
constraint "cp_guest_ids_checkin_pkey"

Migrating candlepin database
Traceback (most recent call last):
File "/usr/share/candlepin/cpdb", line 245, in <module>
dbsetup.update()
File "/usr/share/candlepin/cpdb", line 69, in update
self._run_liquibase("db/changelog/changelog-update.xml")
File "/usr/share/candlepin/cpdb", line 92, in _run_liquibase
self.community))
File "/usr/share/candlepin/cpdb", line 38, in run_command
error_out(command, status, output)
File "/usr/share/candlepin/cpdb", line 46, in error_out
raise Exception("Error running command")
Exception: Error running command

[ERROR 2015-05-28 11:11:30 main] Upgrade step migrate_candlepin failed.
Check logs for more information.
[DEBUG 2015-05-28 11:11:30 main] Exit with status code: 1 (signal was 1)
[ERROR 2015-05-28 11:11:30 main] Repeating errors encountered during run:
[ERROR 2015-05-28 11:11:30 main] mongod is stopped

[ERROR 2015-05-28 11:11:30 main] <NilClass> nil

After some consultation with the Candlepin team, this will require us to
release a slightly newer version of Candlepin into the 2.2 repositories.
After we do that, you should be able to run the installer upgrade scripts
again. I will post back once that is complete.

Eric

··· On Thu, May 28, 2015 at 7:17 AM, wrote:

I get the same error as above:

[ INFO 2015-05-28 11:11:23 main] Upgrade Step: migrate_candlepin…
[ERROR 2015-05-28 11:11:30 main]
########## ERROR ############
Error running command: liquibase --driver=org.postgresql.Driver
–classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/
–changeLogFile=db/changelog/changelog-update.xml
–url=jdbc:postgresql:candlepin --username=candlepin --password= migrate
-Dcommunity=False
Status code: 65280
Command output: Liquibase update Failed: Migration failed for change set
db/changelog/20150211111319-add-last-guest-update-table.xml::20150211111319-2::dgoodwin:
Reason: liquibase.exception.DatabaseException: Error executing SQL
INSERT INTO cp_guest_ids_checkin(id, consumer_id, created, updated)
SELECT DISTINCT cp_consumer.id, cp_consumer.id,
cp_consumer_guests.created, cp_consumer_guests.updated FROM cp_consumer
INNER JOIN cp_consumer_guests ON cp_consumer.id =
cp_consumer_guests.consumer_id: ERROR: duplicate key value violates unique
constraint “cp_guest_ids_checkin_pkey”

Migrating candlepin database
Traceback (most recent call last):
File “/usr/share/candlepin/cpdb”, line 245, in
dbsetup.update()
File “/usr/share/candlepin/cpdb”, line 69, in update
self._run_liquibase(“db/changelog/changelog-update.xml”)
File “/usr/share/candlepin/cpdb”, line 92, in _run_liquibase
self.community))
File “/usr/share/candlepin/cpdb”, line 38, in run_command
error_out(command, status, output)
File “/usr/share/candlepin/cpdb”, line 46, in error_out
raise Exception(“Error running command”)
Exception: Error running command

[ERROR 2015-05-28 11:11:30 main] Upgrade step migrate_candlepin failed.
Check logs for more information.
[DEBUG 2015-05-28 11:11:30 main] Exit with status code: 1 (signal was 1)
[ERROR 2015-05-28 11:11:30 main] Repeating errors encountered during run:
[ERROR 2015-05-28 11:11:30 main] mongod is stopped

[ERROR 2015-05-28 11:11:30 main] nil


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Thanks Eric

Please let me know when this is available.

··· On Thursday, May 28, 2015 at 8:33:42 PM UTC+8, Eric Helms wrote: > > After some consultation with the Candlepin team, this will require us to > release a slightly newer version of Candlepin into the 2.2 repositories. > After we do that, you should be able to run the installer upgrade scripts > again. I will post back once that is complete. > > > Eric > > On Thu, May 28, 2015 at 7:17 AM, <mfar...@gmail.com > wrote: > >> >> I get the same error as above: >> >> [ INFO 2015-05-28 11:11:23 main] Upgrade Step: migrate_candlepin... >> [ERROR 2015-05-28 11:11:30 main] >> ########## ERROR ############ >> Error running command: liquibase --driver=org.postgresql.Driver >> --classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/ >> --changeLogFile=db/changelog/changelog-update.xml >> --url=jdbc:postgresql:candlepin --username=candlepin --password= migrate >> -Dcommunity=False >> Status code: 65280 >> Command output: Liquibase update Failed: Migration failed for change set >> db/changelog/20150211111319-add-last-guest-update-table.xml::20150211111319-2::dgoodwin: >> Reason: liquibase.exception.DatabaseException: Error executing SQL >> INSERT INTO cp_guest_ids_checkin(id, consumer_id, created, updated) >> SELECT DISTINCT cp_consumer.id, cp_consumer.id, >> cp_consumer_guests.created, cp_consumer_guests.updated FROM cp_consumer >> INNER JOIN cp_consumer_guests ON cp_consumer.id = >> cp_consumer_guests.consumer_id: ERROR: duplicate key value violates unique >> constraint "cp_guest_ids_checkin_pkey" >> >> Migrating candlepin database >> Traceback (most recent call last): >> File "/usr/share/candlepin/cpdb", line 245, in >> dbsetup.update() >> File "/usr/share/candlepin/cpdb", line 69, in update >> self._run_liquibase("db/changelog/changelog-update.xml") >> File "/usr/share/candlepin/cpdb", line 92, in _run_liquibase >> self.community)) >> File "/usr/share/candlepin/cpdb", line 38, in run_command >> error_out(command, status, output) >> File "/usr/share/candlepin/cpdb", line 46, in error_out >> raise Exception("Error running command") >> Exception: Error running command >> >> [ERROR 2015-05-28 11:11:30 main] Upgrade step migrate_candlepin failed. >> Check logs for more information. >> [DEBUG 2015-05-28 11:11:30 main] Exit with status code: 1 (signal was 1) >> [ERROR 2015-05-28 11:11:30 main] Repeating errors encountered during run: >> [ERROR 2015-05-28 11:11:30 main] mongod is stopped >> >> [ERROR 2015-05-28 11:11:30 main] nil >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/d/optout. >> > >

This has unfortunately been delayed. When testing upgrades to newer
Candlepin we hit a migration error and are having to hold off while the
Candlepin team investigates the issues for us. I will continue to update as
I get more information.

Eric

··· On Thu, May 28, 2015 at 9:55 PM, sinux shen wrote:

Thanks Eric

Please let me know when this is available.

On Thursday, May 28, 2015 at 8:33:42 PM UTC+8, Eric Helms wrote:

After some consultation with the Candlepin team, this will require us to
release a slightly newer version of Candlepin into the 2.2 repositories.
After we do that, you should be able to run the installer upgrade scripts
again. I will post back once that is complete.

Eric

On Thu, May 28, 2015 at 7:17 AM, mfar...@gmail.com wrote:

I get the same error as above:

[ INFO 2015-05-28 11:11:23 main] Upgrade Step: migrate_candlepin…
[ERROR 2015-05-28 11:11:30 main]
########## ERROR ############
Error running command: liquibase --driver=org.postgresql.Driver
–classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/
–changeLogFile=db/changelog/changelog-update.xml
–url=jdbc:postgresql:candlepin --username=candlepin --password= migrate
-Dcommunity=False
Status code: 65280
Command output: Liquibase update Failed: Migration failed for change set
db/changelog/20150211111319-add-last-guest-update-table.xml::20150211111319-2::dgoodwin:
Reason: liquibase.exception.DatabaseException: Error executing SQL
INSERT INTO cp_guest_ids_checkin(id, consumer_id, created, updated)
SELECT DISTINCT cp_consumer.id, cp_consumer.id,
cp_consumer_guests.created, cp_consumer_guests.updated FROM cp_consumer
INNER JOIN cp_consumer_guests ON cp_consumer.id =
cp_consumer_guests.consumer_id: ERROR: duplicate key value violates unique
constraint “cp_guest_ids_checkin_pkey”

Migrating candlepin database
Traceback (most recent call last):
File “/usr/share/candlepin/cpdb”, line 245, in
dbsetup.update()
File “/usr/share/candlepin/cpdb”, line 69, in update
self._run_liquibase(“db/changelog/changelog-update.xml”)
File “/usr/share/candlepin/cpdb”, line 92, in _run_liquibase
self.community))
File “/usr/share/candlepin/cpdb”, line 38, in run_command
error_out(command, status, output)
File “/usr/share/candlepin/cpdb”, line 46, in error_out
raise Exception(“Error running command”)
Exception: Error running command

[ERROR 2015-05-28 11:11:30 main] Upgrade step migrate_candlepin failed.
Check logs for more information.
[DEBUG 2015-05-28 11:11:30 main] Exit with status code: 1 (signal was 1)
[ERROR 2015-05-28 11:11:30 main] Repeating errors encountered during run:
[ERROR 2015-05-28 11:11:30 main] mongod is stopped

[ERROR 2015-05-28 11:11:30 main] nil


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Sinux,

I spoke with the Candlepin team about this issue and the conclusion we came
to was to apply a manual patch and then re-run the katello upgrade. If look
at (https://gist.github.com/ehelms/7e09d217a175ebd65237) it explains what
to change and how to change it. Once you update this file you can just
re-run upgrade:

katello-installer --upgrade

Please let me know if you have questions or run into further issues.

Eric

··· On Wed, Jun 3, 2015 at 8:27 AM, Eric D Helms wrote:

This has unfortunately been delayed. When testing upgrades to newer
Candlepin we hit a migration error and are having to hold off while the
Candlepin team investigates the issues for us. I will continue to update as
I get more information.

Eric

On Thu, May 28, 2015 at 9:55 PM, sinux shen sinux.shen@gmail.com wrote:

Thanks Eric

Please let me know when this is available.

On Thursday, May 28, 2015 at 8:33:42 PM UTC+8, Eric Helms wrote:

After some consultation with the Candlepin team, this will require us to
release a slightly newer version of Candlepin into the 2.2 repositories.
After we do that, you should be able to run the installer upgrade scripts
again. I will post back once that is complete.

Eric

On Thu, May 28, 2015 at 7:17 AM, mfar...@gmail.com wrote:

I get the same error as above:

[ INFO 2015-05-28 11:11:23 main] Upgrade Step: migrate_candlepin…
[ERROR 2015-05-28 11:11:30 main]
########## ERROR ############
Error running command: liquibase --driver=org.postgresql.Driver
–classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/
–changeLogFile=db/changelog/changelog-update.xml
–url=jdbc:postgresql:candlepin --username=candlepin --password= migrate
-Dcommunity=False
Status code: 65280
Command output: Liquibase update Failed: Migration failed for change
set
db/changelog/20150211111319-add-last-guest-update-table.xml::20150211111319-2::dgoodwin:
Reason: liquibase.exception.DatabaseException: Error executing SQL
INSERT INTO cp_guest_ids_checkin(id, consumer_id, created, updated)
SELECT DISTINCT cp_consumer.id, cp_consumer.id,
cp_consumer_guests.created, cp_consumer_guests.updated FROM cp_consumer
INNER JOIN cp_consumer_guests ON cp_consumer.id =
cp_consumer_guests.consumer_id: ERROR: duplicate key value violates unique
constraint “cp_guest_ids_checkin_pkey”

Migrating candlepin database
Traceback (most recent call last):
File “/usr/share/candlepin/cpdb”, line 245, in
dbsetup.update()
File “/usr/share/candlepin/cpdb”, line 69, in update
self._run_liquibase(“db/changelog/changelog-update.xml”)
File “/usr/share/candlepin/cpdb”, line 92, in _run_liquibase
self.community))
File “/usr/share/candlepin/cpdb”, line 38, in run_command
error_out(command, status, output)
File “/usr/share/candlepin/cpdb”, line 46, in error_out
raise Exception(“Error running command”)
Exception: Error running command

[ERROR 2015-05-28 11:11:30 main] Upgrade step migrate_candlepin failed.
Check logs for more information.
[DEBUG 2015-05-28 11:11:30 main] Exit with status code: 1 (signal was 1)
[ERROR 2015-05-28 11:11:30 main] Repeating errors encountered during
run:
[ERROR 2015-05-28 11:11:30 main] mongod is stopped

[ERROR 2015-05-28 11:11:30 main] nil


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

HI Eric,

That worked for me. The only item I noticed was the directory path found in
(https://gist.github.com/ehelms/7e09d217a175ebd65237) needs to reference
/var/lib/tomcat6 rather than /var/lib/tomcat.

The upgrade needed to be run twice as the first time it failed on adding
metadata_expire but re-running fixed this. So thanks! Now testing
everything else worked.

Thanks

Marc

··· On Thu, Jun 4, 2015 at 4:59 PM, Eric D Helms wrote:

Sinux,

I spoke with the Candlepin team about this issue and the conclusion we
came to was to apply a manual patch and then re-run the katello upgrade. If
look at (https://gist.github.com/ehelms/7e09d217a175ebd65237) it explains
what to change and how to change it. Once you update this file you can just
re-run upgrade:

katello-installer --upgrade

Please let me know if you have questions or run into further issues.

Eric

On Wed, Jun 3, 2015 at 8:27 AM, Eric D Helms ericdhelms@gmail.com wrote:

This has unfortunately been delayed. When testing upgrades to newer
Candlepin we hit a migration error and are having to hold off while the
Candlepin team investigates the issues for us. I will continue to update as
I get more information.

Eric

On Thu, May 28, 2015 at 9:55 PM, sinux shen sinux.shen@gmail.com wrote:

Thanks Eric

Please let me know when this is available.

On Thursday, May 28, 2015 at 8:33:42 PM UTC+8, Eric Helms wrote:

After some consultation with the Candlepin team, this will require us
to release a slightly newer version of Candlepin into the 2.2 repositories.
After we do that, you should be able to run the installer upgrade scripts
again. I will post back once that is complete.

Eric

On Thu, May 28, 2015 at 7:17 AM, mfar...@gmail.com wrote:

I get the same error as above:

[ INFO 2015-05-28 11:11:23 main] Upgrade Step: migrate_candlepin…
[ERROR 2015-05-28 11:11:30 main]
########## ERROR ############
Error running command: liquibase --driver=org.postgresql.Driver
–classpath=/usr/share/java/postgresql-jdbc.jar:/var/lib/tomcat6/webapps/candlepin/WEB-INF/classes/
–changeLogFile=db/changelog/changelog-update.xml
–url=jdbc:postgresql:candlepin --username=candlepin --password= migrate
-Dcommunity=False
Status code: 65280
Command output: Liquibase update Failed: Migration failed for change
set
db/changelog/20150211111319-add-last-guest-update-table.xml::20150211111319-2::dgoodwin:
Reason: liquibase.exception.DatabaseException: Error executing
SQL INSERT INTO cp_guest_ids_checkin(id, consumer_id, created, updated)
SELECT DISTINCT cp_consumer.id, cp_consumer.id,
cp_consumer_guests.created, cp_consumer_guests.updated FROM cp_consumer
INNER JOIN cp_consumer_guests ON cp_consumer.id =
cp_consumer_guests.consumer_id: ERROR: duplicate key value violates unique
constraint “cp_guest_ids_checkin_pkey”

Migrating candlepin database
Traceback (most recent call last):
File “/usr/share/candlepin/cpdb”, line 245, in
dbsetup.update()
File “/usr/share/candlepin/cpdb”, line 69, in update
self._run_liquibase(“db/changelog/changelog-update.xml”)
File “/usr/share/candlepin/cpdb”, line 92, in _run_liquibase
self.community))
File “/usr/share/candlepin/cpdb”, line 38, in run_command
error_out(command, status, output)
File “/usr/share/candlepin/cpdb”, line 46, in error_out
raise Exception(“Error running command”)
Exception: Error running command

[ERROR 2015-05-28 11:11:30 main] Upgrade step migrate_candlepin
failed. Check logs for more information.
[DEBUG 2015-05-28 11:11:30 main] Exit with status code: 1 (signal was
1)
[ERROR 2015-05-28 11:11:30 main] Repeating errors encountered during
run:
[ERROR 2015-05-28 11:11:30 main] mongod is stopped

[ERROR 2015-05-28 11:11:30 main] nil


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/E4vv9eEV3pc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Ahh yea, good catch. The tomcat/tomcat6 depends on what OS you are running
(tomcat6 for EL6, tomcat6​ EL7).

Eric