Php fpm服务无法在solus上启动。可能是由于snmp模块

Php fpm服务无法在solus上启动。可能是由于snmp模块,php,apache,snmp,systemd,solus,Php,Apache,Snmp,Systemd,Solus,我在启动php fpm服务时遇到一些问题。这可能与snmp模块有关 以下是有关错误的一些信息: ~ $ sudo systemctl status php-fpm Mot de passe : ● php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: enabled) Active: fai

我在启动php fpm服务时遇到一些问题。这可能与snmp模块有关

以下是有关错误的一些信息:

~ $ sudo systemctl status php-fpm
Mot de passe :
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Mon 2021-04-12 11:34:02 CEST; 3min 52s ago
Process: 4958 ExecStart=/usr/sbin/php-fpm --nodaemonize --fpm-config /etc/php/php-fpm.conf (code=exited, status=0/SUCCESS)
Main PID: 4958 (code=exited, status=0/SUCCESS)
CPU: 69ms
avril 12 11:32:32 keynux-fab php-fpm[4958]: Cannot find module (IP-FORWARD-MIB): At line 0 in (none)
avril 12 11:32:32 keynux-fab php-fpm[4958]: Cannot find module (NET-SNMP-PASS-MIB): At line 0 in (none)
avril 12 11:32:32 keynux-fab php-fpm[4958]: Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)
avril 12 11:32:32 keynux-fab php-fpm[4958]: Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
avril 12 11:32:32 keynux-fab php-fpm[4958]: Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
avril 12 11:32:32 keynux-fab php-fpm[4958]: Cannot find module (SNMPv2-TM): At line 0 in (none)
avril 12 11:32:32 keynux-fab php-fpm[4958]: Cannot find module (NET-SNMP-VACM-MIB): At line 0 in (none)
avril 12 11:34:02 keynux-fab systemd[1]: php-fpm.service: start operation timed out. Terminating.
avril 12 11:34:02 keynux-fab systemd[1]: php-fpm.service: Failed with result 'timeout'.
avril 12 11:34:02 keynux-fab systemd[1]: Failed to start The PHP FastCGI Process Manager.
当我尝试独立启动php fpm时:

~ $ sudo /usr/sbin/php-fpm --nodaemonize --fpm-config /etc/php/php-fpm.conf
Mot de passe :
MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (IPV6-ICMP-MIB): At line 0 in (none)
Cannot find module (IPV6-MIB): At line 0 in (none)
Cannot find module (IPV6-TCP-MIB): At line 0 in (none)
Cannot find module (IPV6-UDP-MIB): At line 0 in (none)
Cannot find module (IP-FORWARD-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-PASS-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
Cannot find module (NET-SNMP-VACM-MIB): At line 0 in (none)
[12-Apr-2021 11:47:59] NOTICE: fpm is running, pid 5410
[12-Apr-2021 11:47:59] NOTICE: ready to handle connections
[12-Apr-2021 11:47:59] NOTICE: systemd monitor interval set to 10000ms
它似乎开始了,但是我在位于/var/www的所有php脚本上得到403个“拒绝访问”/ 当我执行以下操作时,我会得到相同的结果(拒绝访问):

~$sudo systemctl编辑php fpm
然后输入:

### Editing /etc/systemd/system/php-fpm.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file

[Service]
Type=simple
然后

问题似乎是php在/usr/share/snmp/mibs中找不到mib。但是,所有的MIB都在这个文件夹中,所以我不知道为什么它找不到它们。 我试图重新安装网络snmp,但没有效果

我能够在一个新的solus安装上重现这个问题:我所做的只是

  • 安装httpd和php。Php按预期工作
  • 注释/etc/php/php.ini中的行“extension=snmp”
  • 重新启动httpd和php-fpm。Php fpm服务在没有snmp错误的情况下失败
  • 取消注释/etc/php/php.ini中的行“extension=snmp”
  • 重新启动httpd和php-fpm。Php fpm服务如上所述失败
如果有人有任何想法来解决这个问题,那将非常有帮助。。。我很乐意提供任何有用的日志

php版本是7.3.26。 我没有将任何内容更改为默认的php配置,也没有更改www pool配置。 我对conf所做的唯一更改位于/etc/httpd/conf.d/httpd.conf中:

LoadModule deflate_module lib64/httpd/mod_deflate.so
LoadModule rewrite_module lib64/httpd/mod_rewrite.so
LoadModule expires_module lib64/httpd/mod_expires.so

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName 127.0.0.1

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www"
<Directory "/var/www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>
LoadModule deflate_module lib64/httpd/mod_deflate.so
LoadModule rewrite_module lib64/httpd/mod_rewrite.so
LoadModule expires\u module lib64/httpd/mod\u expires.so
#
#ServerName提供服务器用于标识自身的名称和端口。
#这通常可以自动确定,但我们建议您指定
#这是为了防止启动过程中出现问题。
#
#如果您的主机没有注册的DNS名称,请在此处输入其IP地址。
#
服务器名127.0.0.1
#
#DocumentRoot:您将从中提供服务的目录
#文件。默认情况下,所有请求都来自此目录,但
#符号链接和别名可用于指向其他位置。
#
DocumentRoot“/var/www”
#
#选项指令的可能值为“无”、“全部”,
#或以下任何组合:
#索引包括以下符号链接符号链接所有者匹配执行CGI多视图
#
#请注意,“多视图”必须显式命名为*--“所有选项”
#不给你。
#
#期权指令既复杂又重要。请看
# http://httpd.apache.org/docs/2.4/mod/core.html#options
#了解更多信息。
#
选项索引跟随符号链接
#
#AllowOverride控制可在.htaccess文件中放置的指令。
#它可以是“全部”、“无”或关键字的任意组合:
#AllowOverride文件信息AuthConfig限制
#
允许超越所有
#
#控制谁可以从此服务器获取内容。
#
要求所有授权
谢谢你的帮助

LoadModule deflate_module lib64/httpd/mod_deflate.so
LoadModule rewrite_module lib64/httpd/mod_rewrite.so
LoadModule expires_module lib64/httpd/mod_expires.so

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName 127.0.0.1

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www"
<Directory "/var/www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>