简体   繁体   English

使用Apache 2.4和Mono的Fedora 22服务器上的503错误

[英]503 Error On Fedora 22 Server Using Apache 2.4 and Mono

I am currently attempting to setup a home webserver. 我目前正在尝试设置家庭网络服务器。 I have a lot of experience programming in C# and have been using Visual Studio and IIS for years. 我有很多使用C#编程的经验,并且多年来一直使用Visual Studio和IIS。 I recently decided to make the move to Linux and have been rebuilding my code bases using MonoDevelop. 我最近决定转向Linux,并一直使用MonoDevelop重建我的代码库。 I have them compiling on my development machine, so I am setting up a home server with Fedora 22 Server, and Apache 2.4. 我让它们在我的开发机器上编译,因此我要使用Fedora 22 Server和Apache 2.4设置家庭服务器。

Using nothing but the default configuration the server is able to serve html pages without a problem, but when I installed Mono, and its dependencies, I have been getting various errors, and they are not detailed enough for someone with my limited experience to resolve. 仅使用默认配置,服务器就可以毫无问题地提供html页面的服务,但是当我安装Mono及其依赖项时,我遇到了各种各样的错误,并且它们的详细程度不足以使我的经验有限的人无法解决。 I have spent the entire week working on the issue, and here is where I am stuck. 我花了整整一个星期的时间来解决这个问题,这就是我遇到的问题。

When browsing to http://71.41.214.194/LDC-Demo/index.aspx , I get a "503 Service Unavailable" error in the browser. 浏览到http://71.41.214.194/LDC-Demo/index.aspx时 ,在浏览器中收到“ 503 Service Unavailable”错误。 When looking at the Apache Error log I get the following: 查看Apache错误日志时,我得到以下信息:

[Fri Oct 09 15:22:41.809588 2015] [:error] [pid 7577] Failed to connect to mod-mono-server after several attempts to spawn the process.

Since that is not enough to discern the issue, I restarted Apache and tried to reload the page (I was hoping for a related error that could help me chase down the problem) 由于这不足以识别问题,因此我重新启动了Apache并尝试重新加载页面(我希望找到一个相关的错误,可以帮助我解决该问题)

[Fri Oct 09 15:38:22.000257 2015] [mpm_prefork:notice] [pid 7564] AH00170: caught SIGWINCH, shutting down gracefully
[Fri Oct 09 15:38:23.011225 2015] [:alert] [pid 7564] (13)Permission denied: Failed to acquire dashboard lock before destroying the dashboard
[Fri Oct 09 15:38:23.011668 2015] [:alert] [pid 7564] (13)Permission denied: Failed to acquire dashboard lock before destroying the dashboard
[Fri Oct 09 15:38:23.011770 2015] [:alert] [pid 7564] (13)Permission denied: Failed to acquire dashboard lock before destroying the dashboard
[Fri Oct 09 15:38:24.068911 2015] [core:notice] [pid 7641] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Fri Oct 09 15:38:24.069933 2015] [suexec:notice] [pid 7641] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globa$
[Fri Oct 09 15:38:24.079961 2015] [auth_digest:notice] [pid 7641] AH01757: generating secret for digest authentication ...
[Fri Oct 09 15:38:24.080817 2015] [lbmethod_heartbeat:notice] [pid 7641] AH02282: No slotmem from mod_heartmonitor
[Fri Oct 09 15:38:24.088966 2015] [mpm_prefork:notice] [pid 7641] AH00163: Apache/2.4.16 (Fedora) mod_mono/3.12 configured -- resuming normal operations
[Fri Oct 09 15:38:24.088993 2015] [core:notice] [pid 7641] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Fri Oct 09 15:38:36.414478 2015] [:error] [pid 7651] Failed to connect to mod-mono-server after several attempts to spawn the process.

After researching each of these messages to the best of my ability, I could not find anything that was related to the issue. 在尽我所能研究了所有这些消息之后,我找不到与该问题相关的任何信息。 I did find that I could see some more details if I ran the command "journalctl -xe -cat". 我确实发现,如果运行命令“ journalctl -xe -cat”,我可以看到更多详细信息。

Started The Apache HTTP Server.
mono[7646]: segfault at 5 ip 0000000000512710 sp 00007fffa85f01b0 error 6 in mono-sgen[400000+34d000]
<audit-1130> pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=httpd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Unregistered Authentication Agent for unix-process:7633:25881589 (system bus name :1.83, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
<audit-1400> avc:  denied  { execmem } for  pid=7649 comm="mono" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=0
<audit-1400> avc:  denied  { execmem } for  pid=7649 comm="mono" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=0
<audit-1701> auid=4294967295 uid=48 gid=48 ses=4294967295 subj=system_u:system_r:httpd_t:s0 pid=7649 comm="mono" exe="/usr/bin/mono-sgen" sig=11
mono[7649]: segfault at 5 ip 0000000000512710 sp 00007ffe5ca30440 error 6 in mono-sgen[400000+34d000]
Not saving repeating crash in '/usr/bin/mono-sgen'
Not saving repeating crash in '/usr/bin/mono-sgen'
<audit-1400> avc:  denied  { sigchld } for  pid=7647 comm="abrt-hook-ccpp" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=0
Failed to create core_backtrace: waitpid failed: Permission denied
Blacklisted package 'mono-core'
'post-create' on '/var/spool/abrt/ccpp-2015-10-09-15:38:24-7644' exited with 1
Deleting problem directory '/var/spool/abrt/ccpp-2015-10-09-15:38:24-7644'
<audit-1400> avc:  denied  { execmem } for  pid=7661 comm="mono" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=0
<audit-1400> avc:  denied  { execmem } for  pid=7661 comm="mono" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=0
<audit-1701> auid=4294967295 uid=48 gid=48 ses=4294967295 subj=system_u:system_r:httpd_t:s0 pid=7661 comm="mono" exe="/usr/bin/mono-sgen" sig=11
mono[7661]: segfault at 5 ip 0000000000512710 sp 00007ffed5a32ee0 error 6 in mono-sgen[400000+34d000]
Not saving repeating crash in '/usr/bin/mono-sgen'

There is a lot more information in these messages, but I am still having a problem finding the cause. 这些消息中有很多信息,但是我仍然无法找到原因。 The last 5 lines are repeated three times. 最后5行重复3次。

I have tried making modifications to the apache config file (httpd.conf) as well as to the mod_mono.conf file, but nothing seems to get me past the problem. 我曾尝试对apache配置文件(httpd.conf)和mod_mono.conf文件进行修改,但是似乎没有任何事情可以解决我的问题。

In my current configuration the mod_mono.conf file is unmodified from the default configuration, and the only change that I have made to httpd.conf is to add a virtual host section as follows: 在当前配置中,mod_mono.conf文件未从默认配置中进行修改,而我对httpd.conf所做的唯一更改是添加了一个虚拟主机部分,如下所示:

<VirtualHost *:80>
  ServerName LDC-Demo
  ServerAdmin root@localhost
  ServerAlias LDC-Demo
  DocumentRoot /var/www/html/LDC-Demo/
  MonoServerPath LDC-Demo "/usr/bin/mod-mono-server4"
  MonoDebug LDC-Demo true
  MonoSetEnv LDC-Demo MONO_IOMAP=all
  MonoApplications LDC-Demo "/:/var/www/html/LDC-Demo"
  <Location "/LDC-Demo">
    Allow from all
    Order allow,deny
    MonoSetServerAlias LDC-Demo
    SetHandler mono
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
  </Location>
</VirtualHost>

Any ideas would be appreciated, as I stated above, I have been working on this all week, and am not making much progress. 如我上面所述,任何想法都将不胜感激,我整个星期都在努力,并且没有取得太大进展。

I entered this above as a comment, but I intended to answer the question. 我在上面输入此内容作为评论,但我想回答这个问题。

I figuered it out. 我想通了。 Fedora runs SELinux, and it was interfering with the permissions needed for mod_mono to run. Fedora运行SELinux,并且正在干扰mod_mono运行所需的权限。 To see these settings I ran the command: getenforce Then to temporarily change the setting I used the following command: setenforce 0 Finally, restart Apache: apachectl restart I refreshed the web browser and the page loaded correctly. 要查看这些设置,我运行了命令:getenforce然后使用以下命令临时更改设置:setenforce 0最后,重新启动Apache:apachectl restart我刷新了Web浏览器并正确加载了页面。 To make the setting permanant, edit the selinux file: nano /etc/sysconfig/selinux I rebooted the server, and tried to load the webpage again. 要使设置永久不变,请编辑selinux文件:nano / etc / sysconfig / selinux我重新启动了服务器,并尝试再次加载该网页。 Eureka! 尤里卡! everything is working. 一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Fedora 35 上的 httpd localhost 服务器出现错误 503 - Error 503 with httpd localhost server on Fedora 35 Apache Server 2.4权限错误 - Apache Server 2.4 permission Error 在 Fedora 上部署 Django 时,Apache 2.4 出现错误“禁止您无权访问此服务器上的 /static/” - Apache 2.4 giving error "Forbidden You don't have permission to access /static/ on this server" while deploying Django on Fedora 使用apache 2.4和silverstripe 3.1.12的500 Internal Server Error - 500 Internal Server Error using apache 2.4 and silverstripe 3.1.12 Apache 2.4,Fedora 22上Symfony2的权限问题:app.php,app_dev.php,config.php上有500个响应 - Permissions issue with Symfony2 on Apache 2.4, Fedora 22: 500 response on app.php, app_dev.php, config.php HTTP Apache服务器错误503服务不可用 - HTTP apache server Error 503 service unavailable Fedora 20 上的 Apache 2.4 未索引 documentroot 中的目录 - Apache 2.4 on Fedora 20 not indexing the directories in the documentroot 新鲜的fedora上的apache 2.4:AH01630:服务器配置拒绝了客户端 - apache 2.4 on fresh fedora: AH01630: client denied by server configuration Fedora上的Apache服务器 - Apache server on Fedora 某些页面上的服务器编译错误 - Server compilation error on some pages apache mono
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM