Linux系統(tǒng)(centos7.6)安裝數(shù)字報刊系統(tǒng)常見錯誤
廣告:
1. CentOS 7安裝autoconf-2.69 ./configure 報BEGIN failed--compilation aborted at ../bin/autom4te line 37.
錯誤解決:
安裝yum groupinstall perl*
原因:
CLAIMS 第三方安裝包編譯問題
ECNU 90s集群是個環(huán)境復雜的集群,claims用戶由于需要單獨升級gcc 等系統(tǒng)工具版本,并且保留原有工具供OB team使用,故造成claims用戶獨特的高版本工具運行環(huán)境.
2. aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in' error: **** apxs was not found, DSO compilation will not be available.
錯誤解決:
需安裝apxs (apxs是apache的一個輔助工具軟件,它通常用來為apache安裝擴展模塊。)
yum search apxs 找到合適的包,再安裝;蛘咧苯影惭bhttpd-devel也可。
yum install httpd-devel #apxs
3. rpm -ivh 安裝某個rpm包時報錯:
Warning: user mockbuild does not exist. using root
解決辦法:
yum install mock
useradd -s /sbin/nologin mockbuild
cd /var/mod_mono-master
./autogen.sh --prefix=/usr/local/mono
4. [Wed Oct 30 17:41:47.942303 2019] [:error] [pid 45524] Failed running '/usr/bin/mod-mono-server2 --filename /tmp/mod_mono_server_global --nonstop --master (null) (null) (null) (null) (null) (null) (null) (null)'. Reason: No such file or directory [Wed Oct 30 17:41:49.943288 2019] [:error] [pid 45462] Failed to connect to mod-mono-server after several attempts to spawn the process.
解決辦法:
需要安裝 xsp
原因:
該模塊傳遞asp.net的請求到一個額外的程序 mod-mono-server(該程序是在安裝xsp的時候自動安裝的),實際的求情處理是由該程序處理的。而Mod_Mono 和 mod-mono-server之間的通信是通過tcp的socket進行的。
5. configure: error: You need to install 'gmcs' configure: error: You need to install 'dmcs'
解決辦法:
sudo yum install mono-mcs
6. configure: error: You need to install g++ g++
這是因為我們沒有安裝對應(yīng)的gcc 和gcc-c++。
Linux上的gcc是Gnu的C語言編譯器,至于C++編譯器,它的名字叫做g++
解決辦法:
yum install gcc gcc-c++
7. checking for cmake... no
configure: error: "cmake not found"
解決辦法:
yum install -y cmake
8. Failed to connect to mod-mono-server after several attempts to spawn the process
configure: error: You need to install bison
解決辦法:
yum install bison
9. /usr/include/features.h:330:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
**Error**: You must have `libtool' installed to compile Mono.
Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz
(or a newer version if it is available)
解決辦法:
yum install bison libtool
10. **Error**: automake failed.
解決辦法:
sudo yum install automake autoconf libtool
11. Version mismatch error. This is libtool 2.4.2, but the libtool: definition of this LT_INIT comes from libtool 2.2.6. autoreconf -ivf *106 connect() failed (111: Connection refused) while connecting to upstream 2019/11/06 12:44:29 [error] 953#953: *6 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 59.41.93.110, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "106.75.29.181"
原因:
fastcgi-mono-server2 /applications=/:/var/www/html /socket=tcp:127.0.0.1:9000 & 沒有啟動
解決辦法:
查看服務(wù)器開啟進程端口:netstat -lntp 看有沒有 9000
12. upstream sent unexpected FastCGI record: 3 while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8080", host: "127.0.0.1"
/usr/local/xsp/bin/fastcgi-mono-server4 /applications=/:/var/www/html /port=8080 /logfile=/var/log/nginx/xsp.log /socket=tcp:127.0.0.1:8080 &
解決辦法:
在upstream服務(wù)器后端命令加上 /logfile參數(shù),然后在xsp.log文件看詳細錯誤
13. [error] 3099#3099: *1 directory index of "/var/www/html/" is forbidden, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost"
解決辦法:
autoindex on;
14. Error Failed to process connection. Reason: Could not load file or assembly 'fastcgi-mono-server2, Version=2.10.2.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
gac/fastcgi-mono-server2/2.10.2.0__0738eb9f132ed756/fastcgi-mono-server2.exe[2019-11-08 14:28:18] Error : Failed to process connection.
[2019-11-08 14:28:18] Error : Could not load file or assembly 'fastcgi-mono-server2, Version=3.8.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
[2019-11-08 14:28:18] Error : at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string)
[2019-11-08 14:28:18] Error : at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string)
[2019-11-08 14:28:18] Error : at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] in <filename unknown>:0
[2019-11-08 14:28:18] Error : at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] in <filename unknown>:0
[2019-11-08 14:28:18] Error : at Mono.WebServer.ApplicationServer.GetApplicationForPath (System.String vhost, Int32 port, System.String path, Boolean defaultToRoot) [0x00000] in <filename unknown>:0
[2019-11-08 14:28:18] Error : at (wrapper remoting-invoke-with-check) Mono.WebServer.ApplicationServer:GetApplicationForPath (string,int,string,bool)
[2019-11-08 14:28:18] Error : at Mono.WebServer.FastCgi.Server.GetApplicationForPath (System.String vhost, Int32 port, System.String path, System.String realPath) [0x00000] in <filename unknown>:0
[2019-11-08 14:28:18] Error : at Mono.FastCgi.Request.ParseParameterData () [0x00000] in <filename unknown>:0
[2019-11-08 14:28:18] Error : at Mono.FastCgi.Request.AddParameterData (IReadOnlyList`1 data) [0x00000] in <filename unknown>:0
[2019-11-08 14:28:18] Error : at Mono.FastCgi.Connection.HandleParams (Mono.FastCgi.Request request, Record record) [0x00000] in <filename unknown>:0
[2019-11-08 14:28:18] Error : at Mono.FastCgi.Connection.HandleRequest (Record record, Mono.FastCgi.Request request) [0x00000] in <filename unknown>:0
[2019-11-08 14:28:18] Error : at Mono.FastCgi.Connection.Run () [0x00000] in <filename unknown>:0
[2019-11-08 14:28:18] Error : at Mono.WebServer.FastCgi.ConnectionProxy.Run () [0x00000] in <filename unknown>:0
[2019-11-08 14:28:18] Error : at Mono.WebServer.FastCgi.GenericServer`1[Mono.WebServer.FastCgi.ConnectionProxy].OnAccept (IAsyncResult ares) [0x00000] in <filename unknown>:0
解決辦法:
XSP needs to be installed in the same prefix as mono, not in a different one XSP需要與 mono安裝在同一目錄
15. System.SystemException
Error running mcs: Cannot find the specified file
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.
解決辦法:
頁面代碼加page頭: <%@ Page Language="C#"%>
mcs --version,先查看mcs是否安裝
再檢查映射
ln -s /usr/local/mono/bin/mcs /usr/bin
16. System.Web.Compilation.ParseException
Cannot find type Mvcb2b.MvcApplication
Description: Error parsing a resource required to service this request. Review your source file and modify it to fix this error.
Details: Cannot find type Mvcb2b.MvcApplication
Error origin: Parser
Error source file: /var/www/html/paperweb/Global.asax
解決辦法:
web.config文件讀取錯誤
請開啟xsp調(diào)試:
/loglevels=Error /logfile=/var/log/nginx/xsp.log 這兩個要同時設(shè)置才會顯示詳細出錯信息
/usr/local/mono/bin/fastcgi-mono-server2 /socket=tcp:9000 /address=127.0.0.1 /applications=/:/var/www/html /port=9000 /loglevels=Error /logfile=/var/log/nginx/xsp.log &
17. An error occurred.
Sorry, the page you are looking for is currently unavailable.
Please try again later.
If you are the system administrator of this resource then you should check the error log for details.
Faithfully yours, nginx.
解決辦法:
web.config文件讀取錯誤
請開啟xsp調(diào)試:
/loglevels=Error /logfile=/var/log/nginx/xsp.log 這兩個要同時設(shè)置才會顯示詳細出錯信息
/usr/local/mono/bin/fastcgi-mono-server2 /socket=tcp:9000 /address=127.0.0.1 /applications=/:/var/www/html /port=9000 /loglevels=Error /logfile=/var/log/nginx/xsp.log &
System.Configuration.ConfigurationErrorsException: Unable to open configSource file '/var/www/html/Config\53bknet.config'.
linux系統(tǒng)讀取config文件,需要把 \ 轉(zhuǎn)換為 /
18. Application Exception
System.Net.Sockets.SocketException
Connection refused
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Exception stack trace:
at System.Net.Sockets.Socket+SocketAsyncResult.CheckIfThrowDelayedException () [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.EndConnect (IAsyncResult result) [0x00000] in <filename unknown>:0
at Mono.Data.Tds.Protocol.TdsComm..ctor (System.String dataSource, Int32 port, Int32 packetSize, Int32 timeout, TdsVersion tdsVersion) [0x00000] in <filename unknown>:0
Version Information: 3.8.0 (tarball Mon Nov 11 12:18:53 CST 2019); ASP.NET Version: 2.0.50727.1433
解決辦法:
可能是數(shù)據(jù)庫連接錯誤,請配置安裝sqlserver數(shù)據(jù)庫
或者注釋stateserver連接: <!--<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="30" />-->
或者環(huán)境變量設(shè)置:
vi /etc/profile # 最后一行加上以下內(nèi)容: (最后插入行鍵盤輸入大寫的"G" 鍵盤輸入小寫的"o" 。保存,小寫字母英文輸入狀態(tài):esc后 按 : 號,輸入 wq 保存文件并退出vi ,:w! 強制保存,不推出vi , :q 不保存文件,退出vi,:q! 不保存文件,強制退出vi)
export PATH=$PATH:/opt/mssql-tools/bin
19.
System.Net.Sockets.SocketException
Could not resolve host '(localhost)'
解決辦法:
數(shù)據(jù)庫連接不認識 localhost
20. System.Data.SqlClient.SqlException
無法打開登錄所請求的數(shù)據(jù)庫 "Newspaper"。登錄失敗。
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): Mono SqlClient Data Provider.
解決辦法:
數(shù)據(jù)庫連接不認識 localhost,連接符錯誤
21. 瀏覽器顯示中文亂碼:
解決辦法:
nginx 加 charset utf-8;
location ~* /{ #請求的url過濾,正則匹配,~為區(qū)分大小寫,~*為不區(qū)分大小寫。
#root /usr/share/nginx/html;
#index index.html index.htm;
root /var/www/html/;
index index.html index.htm;
charset utf-8;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_index Default.aspx;
autoindex on;
#fastcgi_keep_conn on;
#fastcgi_read_timeout=150;
#fastcgi_send_timeout=150;
include fastcgi_params;
fastcgi_buffers 8 32k;
fastcgi_buffer_size 32k;
}
22.
System.DllNotFoundException
libgdiplus.so
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Drawing.
Exception stack trace:
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () [0x00000] in <filename unknown>:0
解決辦法:
ln -s /usr/local/mono/lib /usr/lib
yum install libgdiplus-devel
ln -s /usr/lib64/libgdiplus.so.0.0.0 /usr/lib64/libgdiplus.so
23. System.Web.HttpException
The resource cannot be found. 圖片 404 js文件404
Description: HTTP 404.The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. nginx js文件 500 錯誤
解決辦法:
setsebool -P samba_enable_home_dirs on (SElinux禁用)
js500錯誤,因為程序讀取 appsetting錯誤。web.config config\53bknet.config 改成 ./config/53bknet.config
圖片不顯示,因為linux系統(tǒng)URL區(qū)分大小寫
根目錄下面新建一個 WebResource.axd 實際文件
24. System.Configuration.ConfigurationErrorsException
Unable to open configSource file '/var/www/html/Comja/Config\53bknet.config'.
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Configuration.
Exception stack trace: config\53bknet.config 改成 ./config/53bknet.config
WebResource.axd 404錯誤 Details: No virtual path information available.
臨時目錄:Error source file: /tmp/root-temp-aspnet-0/f55c6e0a/App_global.asax_876090_0.cs
<add path="WebResource.axd" verb="GET,DEBUG" type="System.Web.Handlers.AssemblyResourceLoader" />
解決辦法:
要真的放個 WebResource.axd文件
25. System.Net.Sockets.SocketException
Connection refused
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Exception stack trace:
at System.Net.Sockets.Socket+SocketAsyncResult.CheckIfThrowDelayedException () [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.EndConnect (IAsyncResult result) [0x00000] in <filename unknown>:0
at Mono.Data.Tds.Protocol.TdsComm..ctor (System.String dataSource, Int32 port, Int32 packetSize, Int32 timeout, TdsVersion tdsVersion) [0x00000] in <filename unknown>:0
解決方法:連接錯誤,一般數(shù)據(jù)庫錯誤,請安裝數(shù)據(jù)庫
26. 413 Request Entity Too Large
解決方法:
上傳文件過大 添加:client_max_body_size 100m;
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#fastcgi_buffer_size 64K;
#gzip on;
client_max_body_size 100m;
include /etc/nginx/conf.d/*.conf;
}
27. System.Data.SqlClient.SqlException
無法打開備份設(shè)備 '/var/www/html/Img/database/2019111835.bak'。出現(xiàn)操作系統(tǒng)錯誤 2(系統(tǒng)找不到指定的文件)。
解決方法:
database目錄添加--創(chuàng)建和刪除權(quán)限
28. System.Data.SqlClient.SqlException
The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 13: The parameter name is invalid.
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): Mono SqlClient Data Provider.Exception stack trace:
解決方法:
new SqlParameter("@icp", SqlDbType.VarChar,80) 改成:new SqlParameter("@icp", SqlDbType.NVarChar,80)
SQL_Latin1_General_CP1_CI_AS的排序規(guī)則中,添加中文字符需要把參數(shù)字段類型 varchar 更改為nvarchar類型。
廣告: