centos mono 自动关闭问题
来源:互联网 发布:快车软件下载 编辑:程序博客网 时间:2024/05/21 17:52
安装上mono时就想到如果mono进程挂掉了怎么办(http://blog.csdn.net/gold2008/article/details/8228690),没想到网站没过多久,就提示 502 bad gateway错误, ps aux 看了下,mono进程不见了。写个sh,每分钟执行一次检查进程是否存在,不存在就启动:
#!/bin/bashif [ `ps -fe | grep "/fastcgi-mono-server4.exe" | grep -v "grep" | wc -l` = "0" ]; then /opt/mono/bin/mono /opt/mono/lib/mono/4.0/fastcgi-mono-server4.exe /applications=/:/home/www/目录 /socket=tcp:127.0.0.1:9000 &fi;
然后killall mono, 计划任务启动mono后,浏览器打开aspx文件,提示错误:
Server Error in '/' Application
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration>
==========================================
对比分析从shell命令行启动跟cron启动有什么区别? 应该是环境变量的问题,多次测试后,找到解决办法:
#!/bin/bashif [ `ps -fe | grep "/fastcgi-mono-server4.exe" | grep -v "grep" | wc -l` = "0" ]; thenPATH=$PATH:$HOME/binexport PATHunset USERNAMEexport PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:export LD_LIBRARY_PATH=/opt/mono/lib:export PATH=/opt/mono/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin/opt/mono/bin/mono /opt/mono/lib/mono/4.0/fastcgi-mono-server4.exe /applications=/:/home/www/目录 /socket=tcp:127.0.0.1:9000 &echo "start" >> /home/mono.txtfi;
- centos mono 自动关闭问题
- centos 安装mono 遇到问题
- centos 关闭自动启动服务
- myeclipse自动关闭问题
- Dreamweaver8自动关闭问题
- Dreamweaver8自动关闭问题
- Kafka自动关闭问题
- Putty自动关闭问题
- CentOS 7 防止端口自动关闭
- Centos下安装MONO
- CentOS设置Mono环境变量
- centos 6.4 安装 mono
- 窗体的自动关闭问题
- weblogic数据库连接自动关闭问题
- eclipse 频繁自动关闭问题
- linux显示器自动关闭问题
- centos 7 中防火墙的关闭问题
- centos 7 中防火墙的关闭问题
- 登录一些安全网站,比如twitter/facebook,提示安全链接失败,或提示下载文件。
- 【应用赏析】Android 应用获取居民疏散信息
- TP-LINK路由器端口映射详解
- Linux 服务器用户修改密码小结
- 统计宏块各个模式所占的比例
- centos mono 自动关闭问题
- 【技术直通车】在Windows Phone上使用SQLite,并获取和编辑模拟器中的数据库文件
- 网站的收录数量与权重、PR有没有关系?
- 利用Jackson对Object,Map,List,数组,枚举,日期类等转化为json
- 视频编解码基础
- BCD码
- Makefile的写法入门心得
- LoadRunner Windows Sockets 牛刀小试
- 首页被K后1个月内恢复快照且排名提升