Katello/Foreman:无法同步产品或安装软件

Katello/Foreman:无法同步产品或安装软件

我已经配置了foreman场景katello,并且之前配置并同步了一些存储库和内容视图(针对 Red Hat 5 服务器)。

突然,在运行一些同步任务后,日志返回:

2016-12-30 17:12:14 0b8fc582 [app] [E] RuntimeError: 
There was an issue with the backend service pulp: 404 Resource Not Found.

# hammer ping

candlepin:

    Status:          ok
    Server Response: Duration: 112ms

candlepin_auth:

    Status:          ok
    Server Response: Duration: 79ms

pulp:

    Status:          FAIL
    Server Response:

foreman_tasks:

    Status:          ok
    Server Response: Duration: 40ms

我在谷歌、社区论坛和邮件列表上搜索,但没有准确的结果,也重新启动了所有包含的服务。

我该如何规避或解决这个问题?

软件信息:

Foreman 版本:foreman-1.13.2-1 Katello 版本:katello-3.2.1-1

Red Hat Enterprise Linux 7.2

答案1

感谢这项工作,

# hammer ping
candlepin:      
   Status:          ok
   Server Response: Duration: 49ms
candlepin_auth: 
   Status:          ok
   Server Response: Duration: 48ms
pulp:           
   Status:          FAIL
   Server Response:
foreman_tasks:  
   Status:          ok
   Server Response: Duration: 583ms

复制此

#
# WARNING: THIS CONFIGURATION WAS GENERATED BY KATELLO-CONFIGURE TOOL,
# CHANGES WILL LIKELY BE OVERWRITTEN.
#

# Apache configuration file for pulp web services and repositories

AddType application/x-pkcs7-crl .crl 
AddType application/x-x509-ca-cert .crt

# allow older yum clients to connect, see bz 647828 SSLInsecureRenegotiation on

WSGIProcessGroup pulp 
WSGIApplicationGroup pulp 
WSGIDaemonProcess pulp user=apache group=apache processes=3 display-name=%{GROUP}

# DEBUG - uncomment the next 2 lines to enable debugging
#WSGIRestrictStdin Off
#WSGIRestrictStdout Off

WSGISocketPrefix run/wsgi 
WSGIScriptAlias /pulp/api /usr/share/pulp/wsgi/webservices.wsgi 
WSGIImportScript /usr/share/pulp/wsgi/webservices.wsgi process-group=pulp 
application-group=pulp

<Directory /usr/share/pulp/wsgi>   
Require all granted 
</Directory>

<Files webservices.wsgi>
 WSGIPassAuthorization On
 WSGIProcessGroup pulp
 WSGIApplicationGroup pulp
 SSLRenegBufferSize  1048576
 SSLRequireSSL
 SSLVerifyDepth 3
 SSLOptions +StdEnvVars +ExportCertData
 SSLVerifyClient optional 
</Files>

Alias /pulp/static /var/lib/pulp/static

<Location /pulp/static>
SSLRequireSSL
Options +Indexes
Require all granted 
</Location>

重启后,systemctl restart httpd

再次 ping

# hammer ping
candlepin:      
    Status:          ok
    Server Response: Duration: 46ms
candlepin_auth: 
    Status:          ok
    Server Response: Duration: 48ms
pulp:           
    Status:          ok
    Server Response: Duration: 204ms
foreman_tasks:  
    Status:          ok
    Server Response: Duration: 1019ms

答案2

我找到了导致 Pull 无法正确加载/ping 的根本原因。我发现 Pull.conf 已被 Foreman 删除,位于路径 /etc/httpd/conf.d/ 中。添加内容并重新启动 apache httpd 后,它便正常工作了,我现在可以将任何软件包同步或安装到服务器。

分享pulp.conf的内容:

#
# WARNING: THIS CONFIGURATION WAS GENERATED BY KATELLO-CONFIGURE TOOL,
# CHANGES WILL LIKELY BE OVERWRITTEN.
#

# Apache configuration file for pulp web services and repositories

AddType application/x-pkcs7-crl .crl 
AddType application/x-x509-ca-cert .crt

# allow older yum clients to connect, see bz 647828 SSLInsecureRenegotiation on

WSGIProcessGroup pulp 
WSGIApplicationGroup pulp 
WSGIDaemonProcess pulp user=apache group=apache processes=3 display-name=%{GROUP}

# DEBUG - uncomment the next 2 lines to enable debugging
#WSGIRestrictStdin Off
#WSGIRestrictStdout Off

WSGISocketPrefix run/wsgi 
WSGIScriptAlias /pulp/api /usr/share/pulp/wsgi/webservices.wsgi 
WSGIImportScript /usr/share/pulp/wsgi/webservices.wsgi process-group=pulp application-group=pulp

<Directory /usr/share/pulp/wsgi>   
Require all granted 
</Directory>

<Files webservices.wsgi>
 WSGIPassAuthorization On
 WSGIProcessGroup pulp
 WSGIApplicationGroup pulp
 SSLRenegBufferSize  1048576
 SSLRequireSSL
 SSLVerifyDepth 3
 SSLOptions +StdEnvVars +ExportCertData
 SSLVerifyClient optional 
</Files>

Alias /pulp/static /var/lib/pulp/static

<Location /pulp/static>
SSLRequireSSL
Options +Indexes
Require all granted 
</Location>

相关内容