After update Redmine "Error: hg exited with non-zero status: 255"
Added by Michiel Jakobs over 12 years ago
Dear Everybody,
Last Monday I have update my Redmine to version 2.0.2.
The application will works fine, but when viewing tab "Repository" I get an error.
The error is "hg exited with non-zero status: 255".
How can I fix this?
PS. Ruby version: 1.8.7; Rails version: 3.2.6; Mercurial: 1.8.4
Thanks.
Greets,
Michiel
Replies (9)
RE: After update Redmine "Error: hg exited with non-zero status: 255" - Added by Michiel Jakobs over 12 years ago
I have updated Mercurial to version 2.2.2; The error still remains visible.
I have look into the log (Production.log) and get:
Started GET "/redmine-2.0.2/projects/project/repository" for 192.168.1.100 at Mon Jun 25 08:41:01 +0200 2012 Processing by RepositoriesController#show as HTML Parameters: {"id"=>"project"} Rendered common/error.html.erb within layouts/base (0.1ms) Completed 500 Internal Server Error in 383ms (Views: 73.4ms | ActiveRecord: 150.3ms)
RE: After update Redmine "Error: hg exited with non-zero status: 255" - Added by William Roush over 12 years ago
Switch Redmine to development mode, check the logs.
Sure the repo path is set correctly?
RE: After update Redmine "Error: hg exited with non-zero status: 255" - Added by Michiel Jakobs over 12 years ago
Thanks for your reply!
Sorry for the stupid question, but how can I switch to development-mode?
And yes, the repo path is correctly; when I use the path from command-line, i can see the repo.
RE: After update Redmine "Error: hg exited with non-zero status: 255" - Added by Michiel Jakobs over 12 years ago
After some puzzling I have the following result:
Started GET "/redmine-2.0.2/projects/projectA/repository" for 192.168.100.130 at Mon Jun 25 19:58:58 +0200 2012 Processing by RepositoriesController#show as HTML Parameters: {"id"=>"projectA"} (0.6ms) SELECT MAX(`settings`.`updated_on`) AS max_id FROM `settings` User Load (0.4ms) SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`id` = ? AND (users.status = 1) LIMIT 1 [["id", 1]] Project Load (0.5ms) SELECT `projects`.* FROM `projects` WHERE `projects`.`identifier` = 'projectA' LIMIT 1 Repository Load (0.6ms) SELECT `repositories`.* FROM `repositories` WHERE `repositories`.`project_id` = 5 AND (is_default = 1) LIMIT 1 EnabledModule Load (0.5ms) SELECT name FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 5 Shelling out: 'hg' '-R' '/var/portal/mercurial/repos/projectA/extranet' '--encoding' 'utf-8' '--config' 'extensions.redminehelper=/var/portal/redmine-2.0.2/lib/redmine/scm/adapters/mercurial/redminehelper.py' '--config' 'diff.git=false' 'rhsummary' Changeset Load (0.7ms) SELECT `changesets`.* FROM `changesets` WHERE `changesets`.`repository_id` = 9 ORDER BY changesets.id DESC LIMIT 1 Fetching changesets for repository /var/portal/mercurial/repos/projectA/extranet Shelling out: 'hg' '-R' '/var/portal/mercurial/repos/projectA/extranet' '--encoding' 'utf-8' '--config' 'extensions.redminehelper=/var/portal/redmine-2.0.2/lib/redmine/scm/adapters/mercurial/redminehelper.py' '--config' 'diff.git=false' 'log' '--debug' '-C' '--style' '/var/portal/redmine-2.0.2/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl' '-r' '0:99' Rendered common/error.html.erb within layouts/base (0.2ms) UserPreference Load (0.5ms) SELECT `user_preferences`.* FROM `user_preferences` WHERE `user_preferences`.`user_id` = 1 LIMIT 1 SQL (2.6ms) SELECT `members`.`id` AS t0_r0, `members`.`user_id` AS t0_r1, `members`.`project_id` AS t0_r2, `members`.`created_on` AS t0_r3, `members`.`mail_notification` AS t0_r4, `projects`.`id` AS t1_r0, `projects`.`name` AS t1_r1, `projects`.`description` AS t1_r2, `projects`.`homepage` AS t1_r3, `projects`.`is_public` AS t1_r4, `projects`.`parent_id` AS t1_r5, `projects`.`created_on` AS t1_r6, `projects`.`updated_on` AS t1_r7, `projects`.`identifier` AS t1_r8, `projects`.`status` AS t1_r9, `projects`.`lft` AS t1_r10, `projects`.`rgt` AS t1_r11, `roles`.`id` AS t2_r0, `roles`.`name` AS t2_r1, `roles`.`position` AS t2_r2, `roles`.`assignable` AS t2_r3, `roles`.`builtin` AS t2_r4, `roles`.`permissions` AS t2_r5, `roles`.`issues_visibility` AS t2_r6 FROM `members` LEFT OUTER JOIN `projects` ON `projects`.`id` = `members`.`project_id` LEFT OUTER JOIN `member_roles` ON `member_roles`.`member_id` = `members`.`id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `member_roles`.`role_id` WHERE `members`.`user_id` = 1 AND (projects.status=1) ORDER BY projects.name (0.8ms) SELECT COUNT(DISTINCT `versions`.`id`) FROM `versions` LEFT OUTER JOIN `projects` ON `projects`.`id` = `versions`.`project_id` WHERE (projects.id = 5 OR (projects.status = 1 AND ( versions.sharing = 'system' OR (projects.lft >= 49 AND projects.rgt <= 50 AND versions.sharing = 'tree') OR (projects.lft < 49 AND projects.rgt > 50 AND versions.sharing IN ('hierarchy', 'descendants')) OR (projects.lft > 49 AND projects.rgt < 50 AND versions.sharing = 'hierarchy')))) Wiki Load (0.4ms) SELECT `wikis`.* FROM `wikis` WHERE `wikis`.`project_id` = 5 LIMIT 1 (0.3ms) SELECT COUNT(*) FROM `boards` WHERE `boards`.`project_id` = 5 Completed 500 Internal Server Error in 216ms (Views: 56.5ms | ActiveRecord: 7.9ms)
Frankly I do not know what to do, hopefully you have a good idea (or solution).
RE: After update Redmine "Error: hg exited with non-zero status: 255" - Added by William Roush over 12 years ago
do you have a "scm.stderr.log"?
Does the user that is currently executing Redmine (I'm assuming www-data?) have access to /var/portal/mercurial/repos/projectA/extranet?
RE: After update Redmine "Error: hg exited with non-zero status: 255" - Added by Michiel Jakobs over 12 years ago
Really thanks for your help!
Yes, I have a file named "scm.stderr.log".
The contents is:
abort: style not found: /var/portal/redmine-2.0.2/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl abort: style not found: /var/portal/redmine-2.0.2/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl
In addition, I use Passenger and I think the user than Apache. In any event, the contents of the respective path (ls -laF):
[root@intranet extranet]# ls -laF total 12 drwxr-xr-x 3 apache apache 4096 feb 21 11:06 ./ drwxr-xr-x 4 apache apache 4096 mrt 28 08:42 ../ drwxr-xr-x 4 apache apache 4096 jun 25 16:58 .hg/
RE: After update Redmine "Error: hg exited with non-zero status: 255" - Added by Michiel Jakobs over 12 years ago
Ow; and I'm using CentOS 5.
RE: After update Redmine "Error: hg exited with non-zero status: 255" - Added by William Roush over 12 years ago
This file is required for Mercurial to be able to do it's outputs:
/var/portal/redmine-2.0.2/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl
Make sure it exists, apache has access to it, and if not grab it from the Redmine repos (though I have no clue how you'd be missing it). As I understand it this is used to create an XML output that Redmine can understand.
RE: After update Redmine "Error: hg exited with non-zero status: 255" - Added by Michiel Jakobs over 12 years ago
Wow; great! Thank you very much!
It's works!