2012-01-10 83 views
1

但願這是爲那些有經驗速戰速決!水銀/管理平臺 - 404錯誤當訪問知識庫

我只是完成了我的共享HostGator的服務器從管理平臺和Mercurial文檔發球上安裝水銀和管理平臺,但在一個小問題上運行。 Mercurial完美地工作,我能夠創建一個回購,克隆它,並同步到它沒有任何問題,除了當我添加回購到Redmine並轉到存儲庫選項卡時,我得到一個404錯誤。我一定要仔細檢查一下,我是否從根開始設置目錄,並且它不起作用。我嘗試了多種不同的方式來寫出目錄,但仍然沒有運氣。我最終打開了我的production.log,這是每次出現404錯誤時寫入的條目。

Processing RepositoriesController#show (for 74.56.***.*** at 2012-01-10 13:59:43) [GET] 
    Parameters: {"action"=>"show", "id"=>"testhg1", "controller"=>"repositories"} 
hg: error during getting info: hg exited with non-zero status: 255 
hg: error during getting info: hg exited with non-zero status: 255 
Rendering template within layouts/base 
Rendering common/error (404) 
Completed in 280ms (View: 12, DB: 2) | 404 Not Found [http://redmine.mydomain.org/projects/testhg1/repository] 

任何幫助,將不勝感激!謝謝!

+0

我最近用Redmine設置了Mercurial並得到了404錯誤。我很確定這是一個不正確的Mercurial密碼,所以你應該嘗試一下。 – 2012-01-11 06:40:32

+0

你解決了這個問題嗎? – v2k 2012-03-08 08:02:43

+0

好的,我知道至少有3人有這個錯誤。我想我將不得不自己解決它。 – umassthrower 2012-03-16 02:37:57

回答

0

推門進去的發展模式,以得到一些更好的日誌記錄:

 
Processing RepositoriesController#show (for ***.***.***.*** at 2012-03-15 22:54:47) [GET] 
    Parameters: {"action"=>"show", "id"=>"go", "controller"=>"repositories"} 
    Setting Columns (0.9ms) SHOW FIELDS FROM `settings` 

... more unimportant queries ... 

    Repository::Mercurial Columns (0.7ms) SHOW FIELDS FROM `repositories` 
Shelling out: '/usr/bin/hg' '-R' '/var/lib/hg/godc' '--encoding' 'utf-8' '--config' 'extensions.redminehelper=/var/www/corp/redmine/lib/redmine/scm/adapters/mercurial/redminehelper.py' '--config' 'diff.git=false' 'rhsummary' 
hg: error during getting info: hg exited with non-zero status: 255 
Shelling out: '/usr/bin/hg' '-R' '/var/lib/hg/godc' '--encoding' 'utf-8' '--config' 'extensions.redminehelper=/var/www/corp/redmine/lib/redmine/scm/adapters/mercurial/redminehelper.py' '--config' 'diff.git=false' 'rhmanifest' '-r' 'tip' '' 
Rendering template within layouts/base 
Rendering common/error (404) 

所以錯誤似乎是與此命令:

 
'/usr/bin/hg' '-R' '/var/lib/hg/godc' '--encoding' 'utf-8' '--config' 'extensions.redminehelper=/var/www/corp/redmine/lib/redmine/scm/adapters/mercurial/redminehelper.py' '--config' 'diff.git=false' 'rhsummary' 

當我運行的正常工作是根

 
[email protected]:/var/www/corp/redmine# '/usr/bin/hg' '-R' '/var/lib/hg/godc' '--encoding' 'utf-8' '--config' 'extensions.redminehelper=/var/www/corp/redmine/lib/redmine/scm/adapters/mercurial/redminehelper.py' '--config' 'diff.git=false' 'rhsummary' 

... returns XML that S. O. doesn't want to show ... 
(if you know how to fix this, please edit) 







但我的網絡服務器運行作爲WWW的數據不具有訪問汞柱DIR

 
[email protected]:/var/www/corp/redmine# sudo su - www-data 
$ '/usr/bin/hg' '-R' '/var/lib/hg/godc' '--encoding' 'utf-8' '--config' 'extensions.redminehelper=/var/www/corp/redmine/lib/redmine/scm/adapters/mercurial/redminehelper.py' '--config' 'diff.git=false' 'rhsummary' 
abort: repository /var/lib/hg/godc not found! 
$ ls -l /var/lib/hg 
ls: cannot open directory /var/lib/hg: Permission denied 
$ 

給我的www數據的用戶訪問回購和命令現在工作:

 
$ groups 
www-data hg 
$ '/usr/bin/hg' '-R' '/var/lib/hg/godc' '--encoding' 'utf-8' '--config' 'extensions.redminehelper=/var/www/corp/redmine/lib/redmine/scm/adapters/mercurial/redminehelper.py' '--config' 'diff.git=false' 'rhsummary' 

... returns XML that S. O. doesn't want to show ... 








$ 

測試了管理平臺,仍然得到了錯誤,但我重新啓動時Apache的一切是理所應當。

(我使用Phusion乘客。)

升級竟然是一個紅色的鯡魚,造成這是從腳本/服務器爲我的用戶運行變化的實際的東西(其中有回購訪問)作爲正確安裝的旅客生產實例運行。

就你的情況而言,假設你大概每月$ 7美元的hostgator共享服務器安裝,我相信你無權修改權限,但你可以儘量使用我描述的過程來嘗試並確定問題。我對hostgator的安裝知之甚少,但似乎可能出現同樣的問題。

2

我們遇到了同樣的錯誤一個CentOS 6.3服務器上。 在我們的例子中,我們也得到了以下錯誤/var/log/httpd/error_log

abort: requirement 'dotencode' not supported! 

我們創建一個使用RhodeCode我們的資料庫,其使用的一個非常新的版本水銀(2.3.2),比自帶的CentOS的一個6.3(1.4)。使用來自repoforge的預先構建的RPM更新系統上的mercurial版本解決了問題。在CentOS上yum提供的極其舊版本的mercurial不支持新版本2.3.2 Mercurial使用的dotencode功能。