Bug 1526004 - Spacewalk install fails when running spacewalk-setup
Summary: Spacewalk install fails when running spacewalk-setup
Keywords:
Status: CLOSED DUPLICATE of bug 1524221
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.7
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space28
TreeView+ depends on / blocked
 
Reported: 2017-12-14 15:16 UTC by ihavethisundercontrol
Modified: 2018-04-20 12:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-05 11:55:22 UTC
Embargoed:


Attachments (Terms of Use)

Description ihavethisundercontrol 2017-12-14 15:16:16 UTC
Description of problem:
when I try to install spacewalk server, following the latest instructions on the github wiki, the install fails when I get to the spacewalk-setup stage

I am using the postgresql version.


[root@spacewalk ~]# spacewalk-setup
* Setting up SELinux..
** Database: Setting up database connection for PostgreSQL backend.
** Database: Installing the database:
** Database: This is a long process that is logged in:
** Database:   /var/log/rhn/install_db.log
*** Progress: ####
Could not install database.


/var/log/messages 

Dec 14 14:58:54 localhost yum[11609]: Installed: spacewalk-postgresql-2.7.4-1.el7.noarch
Dec 14 14:58:54 localhost systemd: Reloading.
Dec 14 14:58:54 localhost systemd: [/run/systemd/generator.late/cobblerd.service:11] Failed to add dependency on network,.service, ignoring: Invalid argument
Dec 14 14:58:54 localhost systemd: [/run/systemd/generator.late/cobblerd.service:12] Failed to add dependency on xinetd,.service, ignoring: Invalid argument
Dec 14 14:58:54 localhost systemd: [/usr/lib/systemd/system/ip6tables.service:3] Failed to add dependency on syslog.target,iptables.service, ignoring: Invalid argument
Dec 14 14:58:56 localhost systemd: Starting Cleanup of Temporary Directories...
Dec 14 14:58:56 localhost systemd: Started Cleanup of Temporary Directories.
Dec 14 15:01:02 localhost systemd: Started Session 3 of user root.
Dec 14 15:01:02 localhost systemd: Starting Session 3 of user root.
Dec 14 15:01:13 localhost dbus-daemon: dbus[654]: avc:  received policyload notice (seqno=10)
Dec 14 15:01:13 localhost dbus[654]: avc:  received policyload notice (seqno=10)
Dec 14 15:01:13 localhost dbus[654]: [system] Reloaded configuration
Dec 14 15:01:13 localhost dbus-daemon: dbus[654]: [system] Reloaded configuration
Dec 14 15:01:14 localhost dbus-daemon: dbus[654]: avc:  received policyload notice (seqno=11)
Dec 14 15:01:14 localhost dbus[654]: avc:  received policyload notice (seqno=11)
Dec 14 15:01:14 localhost dbus[654]: [system] Reloaded configuration
Dec 14 15:01:14 localhost dbus-daemon: dbus[654]: [system] Reloaded configuration
Dec 14 15:01:15 localhost dbus-daemon: dbus[654]: avc:  received policyload notice (seqno=12)
Dec 14 15:01:15 localhost dbus[654]: avc:  received policyload notice (seqno=12)
Dec 14 15:01:15 localhost dbus[654]: [system] Reloaded configuration
Dec 14 15:01:15 localhost dbus-daemon: dbus[654]: [system] Reloaded configuration
Dec 14 15:01:15 localhost setsebool: The httpd_enable_cgi policy boolean was changed to 1 by root
Dec 14 15:01:16 localhost dbus-daemon: dbus[654]: avc:  received policyload notice (seqno=13)
Dec 14 15:01:16 localhost dbus[654]: avc:  received policyload notice (seqno=13)
Dec 14 15:01:16 localhost dbus[654]: [system] Reloaded configuration
Dec 14 15:01:16 localhost dbus-daemon: dbus[654]: [system] Reloaded configuration
Dec 14 15:01:17 localhost dbus-daemon: dbus[654]: avc:  received policyload notice (seqno=14)
Dec 14 15:01:17 localhost dbus[654]: avc:  received policyload notice (seqno=14)
Dec 14 15:01:17 localhost dbus[654]: [system] Reloaded configuration
Dec 14 15:01:17 localhost dbus-daemon: dbus[654]: [system] Reloaded configuration
Dec 14 15:01:17 localhost setsebool: The httpd_can_network_connect policy boolean was changed to 1 by root
Dec 14 15:01:17 localhost dbus[654]: avc:  received policyload notice (seqno=15)
Dec 14 15:01:17 localhost dbus-daemon: dbus[654]: avc:  received policyload notice (seqno=15)
Dec 14 15:01:17 localhost dbus[654]: [system] Reloaded configuration
Dec 14 15:01:17 localhost dbus-daemon: dbus[654]: [system] Reloaded configuration
Dec 14 15:01:19 localhost dbus-daemon: dbus[654]: avc:  received policyload notice (seqno=16)
Dec 14 15:01:19 localhost dbus[654]: avc:  received policyload notice (seqno=16)
Dec 14 15:01:19 localhost dbus[654]: [system] Reloaded configuration
Dec 14 15:01:19 localhost dbus-daemon: dbus[654]: [system] Reloaded configuration
Dec 14 15:01:19 localhost setsebool: The httpd_can_sendmail policy boolean was changed to 1 by root
Dec 14 15:01:40 localhost dbus-daemon: dbus[654]: avc:  received policyload notice (seqno=17)
Dec 14 15:01:40 localhost dbus[654]: avc:  received policyload notice (seqno=17)
Dec 14 15:01:40 localhost dbus[654]: [system] Reloaded configuration
Dec 14 15:01:40 localhost dbus-daemon: dbus[654]: [system] Reloaded configuration
Dec 14 15:01:41 localhost systemd: Starting PostgreSQL database server...
Dec 14 15:01:41 localhost postgresql-check-db-dir: "/var/lib/pgsql/data" is missing or empty.
Dec 14 15:01:41 localhost postgresql-check-db-dir: Use "postgresql-setup initdb" to initialize the database cluster.
Dec 14 15:01:41 localhost postgresql-check-db-dir: See /usr/share/doc/postgresql-9.2.23/README.rpm-dist for more information.
Dec 14 15:01:41 localhost systemd: postgresql.service: control process exited, code=exited status=1
Dec 14 15:01:41 localhost systemd: Failed to start PostgreSQL database server.
Dec 14 15:01:41 localhost systemd: Unit postgresql.service entered failed state.
Dec 14 15:01:41 localhost systemd: postgresql.service failed.
Dec 14 15:01:41 localhost systemd: Reloading.
Dec 14 15:01:41 localhost systemd: [/run/systemd/generator.late/cobblerd.service:11] Failed to add dependency on network,.service, ignoring: Invalid argument
Dec 14 15:01:41 localhost systemd: [/run/systemd/generator.late/cobblerd.service:12] Failed to add dependency on xinetd,.service, ignoring: Invalid argument
Dec 14 15:01:41 localhost systemd: [/usr/lib/systemd/system/ip6tables.service:3] Failed to add dependency on syslog.target,iptables.service, ignoring: Invalid argument
Dec 14 15:01:46 localhost systemd: Starting PostgreSQL database server...
Dec 14 15:01:47 localhost systemd: Started PostgreSQL database server.





Version-Release number of selected component (if applicable):
latest

How reproducible:
100%

Steps to Reproduce:
follow the official github wiki install for centos7 postgresql

https://github.com/spacewalkproject/spacewalk/wiki/HowToInstall#installing-spacewalk

I am not using an external database


Additional info:

I have tried to do this install both manually and using an ansible playbook.

I am 100% sure that the ansible playbook has worked before however it failed this time, and always fails now.

any help is greatly apprecited

Comment 1 Tomáš Kašpárek 2017-12-15 07:01:52 UTC
Hello,

could you please provide contents of /var/log/rhn/install_db.log na /var/log/rhn/rhn_installation.log?

Thank you
Tomas

Comment 2 ihavethisundercontrol 2018-01-02 15:00:28 UTC
(In reply to Tomáš Kašpárek from comment #1)
> Hello,
> 
> could you please provide contents of /var/log/rhn/install_db.log na
> /var/log/rhn/rhn_installation.log?
> 
> Thank you
> Tomas

[root@misc rhn]# cat install_db.log
Note: Forwarding request to 'systemctl enable postgresql.service'.
/usr/bin/spacewalk-setup-postgresql: line 165: [: 018446744073692774399: integer expression expected
Redirecting to /bin/systemctl stop postgresql.service
Redirecting to /bin/systemctl start postgresql.service
createdb: database creation failed: ERROR:  new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT:  Use the same encoding as in the template database, or use template0 as template.
[root@misc rhn]# cat rhn_installation.log
Installation log of Spacewalk
Command: /bin/spacewalk-setup 

Running /usr/sbin/spacewalk-selinux-enable
/sbin/restorecon reset /var/log/rhn/rhn_installation.log.1 context unconfined_u:object_r:spacewalk_install_log_t:s0->unconfined_u:object_r:spacewalk_log_t:s0
/sbin/restorecon reset /var/log/rhn/install_db.log.1 context unconfined_u:object_r:spacewalk_install_log_t:s0->unconfined_u:object_r:spacewalk_log_t:s0
Running /usr/sbin/osa-dispatcher-selinux-enable
[root@misc rhn]# 



thanks,

Mark

Comment 3 ihavethisundercontrol 2018-01-03 12:30:56 UTC
Hello,

https://bugzilla.redhat.com/show_bug.cgi?id=643368

This bug  is the same problem I was having.

The workaround to my problem was to run the command:




postgresql-setup initdb


before installing spacewalk-postgresql

Running spacewalk-setup now works

Thanks

Comment 4 ihavethisundercontrol 2018-01-03 12:34:18 UTC
(In reply to ihavethisundercontrol from comment #3)
> Hello,
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=643368
> 
> This bug  is the same problem I was having.
> 
> The workaround to my problem was to run the command:
> 
> 
> 
> 
> postgresql-setup initdb
> 
> 
> before installing spacewalk-postgresql
> 
> Running spacewalk-setup now works
> 
> Thanks

Sorry, ment this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1524221

Comment 5 Tomáš Kašpárek 2018-01-05 11:55:22 UTC

*** This bug has been marked as a duplicate of bug 1524221 ***


Note You need to log in before you can comment on or make changes to this bug.