kubitron / redmine_git_hosting

A ChiliProject/Redmine plugin which makes configuring your own git hosting easy.
78 stars 15 forks source link

repositories are not created #48

Closed k2s closed 12 years ago

k2s commented 12 years ago

I see message "***> git_hosting: update_repositories() exited without acquiring lock!" in production.log.

How to find out what is wrong ?

kubitron commented 12 years ago

Do you have a lot of different people working at the same time? This error can happen if two instances are trying to modify state at the same time.

Two things (1) you should always be able to fix any resulting problems by executing a fetch_changesets operation; I suggest running it in the background from a cron job; also, any change to that particular project should fix the state. (2) If this happens a lot to you, you could increase the lock wait time on the plugin settings page.

k2s commented 12 years ago

thank you for quick response

I executed "ruby script/runner "Repository.fetch_changesets" and I got:

fatal: Not a git repository: 'repositories/da/test-documents.git' find: `recycle_bin/': No such file or directory

Nobody is using the server in this moment and it started to happen after I wanted to create first time GIT repository of subproject. The "da" project is without repository.

k2s commented 12 years ago

Looks like running "ruby script/runner "Repository.fetch_changesets" solved the problem.

kubitron commented 12 years ago

Did you run this command as root? That might screw up your configuration (by making the /tmp directory information owned by root). I was suggesting something more direct:

rake fetch_changesets RAILS_ENV=production

Run this as your web server user.

Did you follow the step-by-step instructions in the plugin README? Please do that. There is a whole discussion of repairing messed up configurations, setting up your bin directory, etc. You should follow those instructions.

k2s commented 12 years ago

I runned it as web user and it helped. Thank you for your help.