我已經通過apt
安裝mono-runtime
,以便通過SSH在Ubuntu上運行我的Mono控制檯應用程序。但是,當我運行命令mono myapp.exe
時,它退出,沒有消息,我的程序什麼都不做。Mono 2.10.5 Ubuntu 11.10(可能是log4net?)的運行時錯誤
如果我扔-v
切換爲單聲道,如mono -v myapp.exe
,我得到約10K的輸出線(如預期,-v
是詳細),與前幾行是:
converting method System.OutOfMemoryException:.ctor (string)
Method System.OutOfMemoryException:.ctor (string) emitted at 0xb7052c28 to 0xb7052c4b (code length 35) [myapp.exe]
converting method (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr) emitted at 0xb7052c68 to 0xb7052cf6 (code length 142) [myapp.exe]
converting method System.SystemException:.ctor (string)
我讀到這個作爲拋出OutOfMemory
異常的運行時間,但機器沒有高強度負載,有足夠的可用RAM,並且除了系統進程以外沒有其他任何運行。
我已經刪除並重新安裝了無數次單聲道,甚至可以在其他機器上運行可執行文件。
我在這裏錯過了一些完全明顯的東西嗎?
編輯:這裏
每@lupus的回答,是log4net的內部發生的事情的轉儲。我看不出什麼錯:
log4net: log4net assembly [log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a]. Loaded from [/mnt/ebs/911dispatch/scrapers/WA/Seattle/log4net.dll]. (.NET Runtime [4.0.30319.1] on Unix 3.0.0.12)
log4net: defaultRepositoryType [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository for assembly [Seattle911.Backend.Scraper, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]
log4net: Assembly [Seattle911.Backend.Scraper, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From [/mnt/ebs/911dispatch/scrapers/WA/Seattle/Seattle911.Backend.Scraper.exe]
log4net: Assembly [Seattle911.Backend.Scraper, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a RepositoryAttribute specified.
log4net: Assembly [Seattle911.Backend.Scraper, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null] using repository [log4net-default-repository] and repository type [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository [log4net-default-repository] using type [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository for assembly [Seattle911.DAL, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]
log4net: Assembly [Seattle911.DAL, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From [/mnt/ebs/911dispatch/scrapers/WA/Seattle/Seattle911.DAL.dll]
log4net: Assembly [Seattle911.DAL, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a RepositoryAttribute specified.
log4net: Assembly [Seattle911.DAL, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null] using repository [log4net-default-repository] and repository type [log4net.Repository.Hierarchy.Hierarchy]
log4net: repository [log4net-default-repository] already exists, using repository type [log4net.Repository.Hierarchy.Hierarchy]log4net: Shutdown called on Hierarchy [log4net-default-repository]
如果是這樣的話,其他系統上的症狀是否也會發生?我使用的log4net配置文件在所有機器上都是一樣的 – johnluetke
其他服務器可能有權訪問數據庫,而這可能不是(默認安裝postgres通常只允許從本地主機訪問)。 – lupus
..很高興..我要粉筆這一張,以阻滯 – johnluetke