Defect #12459

Error try to delete a project or repository within a project

Added by gc cg about 9 years ago. Updated about 9 years ago.

Status:ClosedStart date:
Priority:HighDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:-
Resolution:Invalid Affected version:

Description

Hi All,
i am login to redmine as administrator, then go to admininstraion/projects --> select a project --> then click delete a repository. i got this error message:

Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.
If you are the Redmine administrator, check your log files for details about the error.

I have no clue how to fix it. Please give me some clue. i appriciate your help!

Thanks a lot

From the log:
Started GET "/redmine/projects/sw/settings" for 110.12.2.51 at Tue Nov 24 18:19:55 +0000 2012
Processing by ProjectsController#settings as HTML
Parameters: {"id"=>"sw"}
Current user: g2345c (id=207)
Rendered projects/_form.html.erb (59.8ms)
Rendered projects/_edit.html.erb (271.5ms)
Rendered projects/settings/_modules.html.erb (6.9ms)
Rendered projects/settings/_members.html.erb (3105.9ms)
Rendered projects/settings/_versions.html.erb (10.7ms)
Rendered projects/settings/_issue_categories.html.erb (18.2ms)
Rendered projects/settings/_wiki.html.erb (5.1ms)
Rendered projects/settings/_repositories.html.erb (12.3ms)
Rendered projects/settings/_boards.html.erb (216.0ms)
Rendered projects/settings/_activities.html.erb (15.7ms)
Rendered common/_tabs.html.erb (3876.5ms)
Rendered projects/settings.html.erb within layouts/base (3878.4ms)
Completed 200 OK in 3933ms (Views: 3817.1ms | ActiveRecord: 98.8ms)
Connecting to database specified by database.yml
OpenIdAuthentication.store is nil. Using in-memory store.

Started DELETE "/redmine/repositories/2" for 110.12.2.51 at Tue Nov 24 18:20:06 +0000 2012
Processing by RepositoriesController#destroy as HTML
Parameters: {"authenticity_token"=>"CYndDMD4sUkwoKw2UnI+YWOO/Ace010lnL0Ptrch+N4=", "id"=>"2"}
Current user: g2345c (id=207)
Completed 500 Internal Server Error in 15ms

NameError (uninitialized constant Repository::Change):
app/models/repository.rb:422:in `clear_changesets'
app/controllers/repositories_controller.rb:109:in `destroy'

Also, from command line.
root@linux:/opt/bitnami/apps/redmine/htdocs# curl "http://localhost:8080/redmine/sys/fetch_changesets?key=HMlhcIkfHtl4doIfQVh2"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<title>Redmine 500 error</title>
<style>
body{
font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
color:#303030;
margin:10px;
}
h1{
font-size:1.5em;
}
p{
font-size:0.8em;
}
</style>
<body>
<h1>Internal error</h1>
<p>An error occurred on the page you were trying to access.<br />
If you continue to experience problems please contact your Redmine administrator for assistance.</p>
<p>If you are the Redmine administrator, check your log files for details about the error.</p>
<p><a href="javascript:history.back()">Back</a></p>
</body>
</html>
root@linux:/opt/bitnami/apps/redmine/htdocs#

Log says:
Started GET "/redmine/sys/fetch_changesets?key=HMlhcIkfHtl4doIfQVh2" for 192.168.11.25 at Tue Nov 24 18:18:48 +0000 2012
Processing by SysController#fetch_changesets as */*
Parameters: {"key"=>"HMlhcIkfHtl4doIfQVh2"}
hg: error during getting info: hg exited with non-zero status: 255
hg: error during getting info: hg exited with non-zero status: 255
hg: error during getting info: hg exited with non-zero status: 255
Completed 500 Internal Server Error in 4999ms

Server Info:
root@linux:/opt/bitnami/apps/redmine/htdocs# RAILS_ENV=production rake about
About your application's environment
Ruby version 1.8.7 (x86_64-linux)
RubyGems version 1.6.2
Rack version 1.4
Rails version 3.2.8
Active Record version 3.2.8
Action Pack version 3.2.8
Active Resource version 3.2.8
Action Mailer version 3.2.8
Active Support version 3.2.8
Middleware Rack::Cache, ActionDispatch::Static, Rack::Lock, #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x7f627fe39598>, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head, Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport, OpenIdAuthentication
Application root /opt/bitnami/apps/redmine/htdocs
Environment production
Database adapter mysql
Database schema version 20120731164049

root@linux:/opt/bitnami/apps/redmine/htdocs# gem list

  • LOCAL GEMS ***

actionmailer (3.2.8, 2.3.14)
actionpack (3.2.8, 2.3.14)
activemodel (3.2.8)
activerecord (3.2.8, 2.3.14)
activeresource (3.2.8, 2.3.14)
activesupport (3.2.8, 2.3.14)
after_commit (1.0.10)
allison (2.0.3)
arel (3.0.2)
aws-sdk (1.6.5)
bcrypt-ruby (3.0.1)
bluecloth (2.1.0)
builder (3.0.0)
bundler (1.0.21)
capistrano (2.9.0)
cgi_multipart_eof_fix (2.5.0)
coderay (1.0.6)
crack (0.3.1)
cucumber (1.1.4)
daemon_controller (1.0.0)
daemons (1.0.10)
delayed_job (2.0.7)
diff-lcs (1.1.2)
echoe (4.5.6, 4.3.1)
edavis10-object_daddy (0.4.3)
erubis (2.7.0)
eventmachine (1.0.0.rc.4 x86-mingw32)
fastercsv (1.5.4)
fastthread (1.0.7)
ffi (1.0.9)
file-tail (1.0.7)
gem_plugin (0.2.3)
gemcutter (0.7.1)
gherkin (2.7.1)
gruff (0.3.6)
highline (1.6.8)
hike (1.2.1)
hoe (2.12.4)
hpricot (0.8.5)
httparty (0.8.1)
i18n (0.6.0, 0.4.2)
journey (1.0.4)
jquery-rails (2.0.3)
json (1.6.3, 1.5.4)
json_pure (1.6.3)
mail (2.4.4)
memcache-client (1.8.5)
metaclass (0.0.1)
mime-types (1.18)
mini_magick (3.3)
mocha (0.12.3, 0.10.5)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
multi_json (1.1.0, 1.0.4)
multi_xml (0.4.1)
mysql (2.8.1)
mysql2 (0.3.11)
needle (1.3.0)
net-ldap (0.3.1)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.2.1)
net-ssh-gateway (1.1.0)
nokogiri (1.5.0, 1.4.4)
passenger (3.0.17)
polyglot (0.3.3)
prototype-rails (3.2.1)
rack (1.4.1, 1.3.5, 1.1.3)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.2)
rack-test (0.6.1, 0.5.7)
rails (3.2.8, 2.3.14)
rails_analyzer_tools (1.4.0)
railties (3.2.8)
rake (0.9.2.2, 0.8.7)
rake-compiler (0.7.9)
rcov (0.9.11)
rdiscount (1.3.1.1)
rdoc (3.11)
RedCloth (4.2.9)
riddle (1.5.0)
rmagick (2.12.2)
rspec (2.7.0)
rspec-core (2.7.1)
rspec-expectations (2.7.0)
rspec-mocks (2.7.0)
ruby-openid (2.1.8)
rubyforge (2.0.4)
sprockets (2.1.3, 2.1.2)
spruz (0.2.5)
sqlite3 (1.3.6)
sqlite3-ruby (1.3.2)
subexec (0.1.0)
SyslogLogger (1.4.0)
SystemTimer (1.2.3)
term-ansicolor (1.0.7)
test-unit (2.5.2)
thin (1.2.11)
thinking-sphinx (1.4.10)
thor (0.14.6)
tilt (1.3.3)
tins (0.3.4)
treetop (1.4.10, 1.4.5)
tzinfo (0.3.33)
uuidtools (2.1.2)
webrat (0.7.3)
yard (0.8.1)

History

#1 Updated by Jean-Philippe Lang about 9 years ago

  • Resolution set to Cant reproduce

I can't reproduce as the Change model should be autoloaded. The following patch should solve your problem:

Index: app/models/repository.rb
===================================================================
--- app/models/repository.rb    (revision 10880)
+++ app/models/repository.rb    (working copy)
@@ -419,7 +419,7 @@
   # Deletes repository data
   def clear_changesets
     cs = Changeset.table_name 
-    ch = Change.table_name
+    ch = ::Change.table_name
     ci = "#{table_name_prefix}changesets_issues#{table_name_suffix}" 
     cp = "#{table_name_prefix}changeset_parents#{table_name_suffix}" 

#2 Updated by gc cg about 9 years ago

Hi Jean,
while you're here. Can you please also help me with this issue. Why this fetch_changeset fail on me? i must have done some thing wrong here.

root@linux:/opt/bitnami/apps/redmine/htdocs# curl "http://localhost:8080/redmine/sys/fetch_changesets?key=HMlhcIkfHtl4doIfQVh2"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<title>Redmine 500 error</title>
<style>
body{
font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
color:#303030;
margin:10px;
}
h1{
font-size:1.5em;
}
p{
font-size:0.8em;
}
</style>
<body>
<h1>Internal error</h1>
<p>An error occurred on the page you were trying to access.<br />
If you continue to experience problems please contact your Redmine administrator for assistance.</p>
<p>If you are the Redmine administrator, check your log files for details about the error.</p>
<p><a href="javascript:history.back()">Back</a></p>
</body>
</html>
root@linux:/opt/bitnami/apps/redmine/htdocs#

Log says:
Started GET "/redmine/sys/fetch_changesets?key=HMlhcIkfHtl4doIfQVh2" for 192.168.11.25 at Tue Nov 24 18:18:48 +0000 2012
Processing by SysController#fetch_changesets as */*
Parameters: {"key"=>"HMlhcIkfHtl4doIfQVh2"}
hg: error during getting info: hg exited with non-zero status: 255
hg: error during getting info: hg exited with non-zero status: 255
hg: error during getting info: hg exited with non-zero status: 255
Completed 500 Internal Server Error in 4999ms

#3 Updated by Toshi MARUYAMA about 9 years ago

  • Category set to SCM

#4 Updated by Toshi MARUYAMA about 9 years ago

gc cg wrote:

hg: error during getting info: hg exited with non-zero status: 255

Check your Mercurial repository owner and permission.
Try "hg log" on your Mercurial repository with your Redmine process uid.

Completed 500 Internal Server Error in 4999ms

It seems Bitnami problems.
Please contact Bitnami.

#5 Updated by gc cg about 9 years ago

Jean-Philippe Lang wrote:

I can't reproduce as the Change model should be autoloaded. The following patch should solve your problem:

[...]

Hi Jean,
It still doesnt work. Here is the log:
root@linux:/opt/bitnami/apps/redmine/htdocs/log# tail -f production.log
Processing by RepositoriesController#destroy as HTML
Parameters: {"authenticity_token"=>"CYndDMD4sUkwoKw2UnI+YWOO/Ace010lnL0Ptrch+N4=", "id"=>"4"}
Current user: hbnguyen (id=207)
Completed 500 Internal Server Error in 16ms

NameError (uninitialized constant Change):
app/models/repository.rb:423:in `clear_changesets'
app/controllers/repositories_controller.rb:109:in `destroy'

Started DELETE "/redmine/repositories/4" for 172.16.1.37 at Wed Nov 28 07:23:41 +0000 2012
Processing by RepositoriesController#destroy as HTML
Parameters: {"authenticity_token"=>"CYndDMD4sUkwoKw2UnI+YWOO/Ace010lnL0Ptrch+N4=", "id"=>"4"}
Current user: hbnguyen (id=207)
Completed 500 Internal Server Error in 14ms

NameError (uninitialized constant Change):
app/models/repository.rb:423:in `clear_changesets'
app/controllers/repositories_controller.rb:109:in `destroy'

Any other idea?

thanks a lot

#6 Updated by Jean-Philippe Lang about 9 years ago

Looks like app/models/change.rb is missing.

#7 Updated by gc cg about 9 years ago

hmmm it's correct. how come that file was missing is still a mystery?

thanks a lot for your help.

#8 Updated by gc cg about 9 years ago

  • Status changed from New to Resolved

#9 Updated by Etienne Massip about 9 years ago

  • Status changed from Resolved to Closed
  • Resolution changed from Cant reproduce to Invalid

Also available in: Atom PDF