Ryan,
What puzzles me now is that your message_processing.log doesn't contain any
traces of the merge request being processed, let's focus on that now.

When a merge request is created (or rather, its `confirmed_by_user` method
is called, which happens when it's created), a message is sent to the
message queue by the merge request's `publish_notification` method. This
message should be picked up by the poller script, and it should be logged to
message_processing.log when it's taken off the queue for processing. I
suspect the poller isn't running properly.

The poller will log to message_processing.log once it's running, if it fails
to start it will dump errors to tmp/pids/poller.output (not the most obvious
place to look, I know). Does this file tell you anything interesting?

Cheers,
- Marius

On Wed, Apr 27, 2011 at 2:28 PM, Ryan Linneman <rlinne...@gmail.com> wrote:

> Thank you so much for helping!
> Unfortunately that's a negative ghost rider, the SHA are not correct.
>
> I was able to find the project but and the repos exist.  However the branch
> is not pushed and I do not see a file with the SHA in the tracking repo.
>
> I created a new request just now to test with and took a snapshot 'ps' of
> the current processes I know to be important for this activity.  The error
> in the production log is identical to before.  Also, while creating the
> merge request, I ran tail on the log/message_processing.log and got no
> messages at all, let alone relevant to the creation of the request, however
> stomp is running with the command below.
>
> $ env RAILS_ENV=production script/console
> Loading production environment (Rails 2.3.5)
> >>
> mr=Project.find_by_slug("iProcessor").repositories.find_by_name("iprocessor-server").merge_requests.find_by_sequence_number(1)
> => #<MergeRequest id: 12, user_id: 1, source_repository_id: 29,
> target_repository_id: 28, proposal: "", sha_snapshot: nil, status: 1,
> created_at: "2011-04-27 11:48:43", updated_at: "2011-04-27 11:48:43",
> source_branch: "master", target_branch: "master", ending_commit:
> "d4eaeeb87d07f216118d5b1ad8bca962cc5a5f5c", reason: nil, oauth_token: nil,
> oauth_secret: nil, contribution_agreement_version: nil, updated_by_user_id:
> nil, status_tag: "Open", summary: "Sample MR", legacy: false,
> sequence_number: 1>
> >> mr.target_repository.full_repository_path
> => "/media/scm/repositories/b6e/640/dba214d183676843ee5684ebaf6473212c.git"
> >>  mr.tracking_repository.full_repository_path
> => "/media/scm/repositories/4fe/8c4/e66c64ca544b3840543294e8ef2c38e153.git"
> >> quit
>
> ## Target
> $ ls
> /media/scm/repositories/b6e/640/dba214d183676843ee5684ebaf6473212c.git/refs/
> total 8.0K
> drwxr-x--- 2 git gitorious 4.0K 2011-04-26 13:15 heads
> drwxr-x--- 2 git gitorious 4.0K 2011-04-26 12:07 tags
>
> ## Tracking
> $ ls
> /media/scm/repositories/4fe/8c4/e66c64ca544b3840543294e8ef2c38e153.git/refs/merge-requests/1/
> total 0
>
> $ ps aux | grep git
> git      16076  0.1 22.9 219336 116056 ?       S    Apr26   1:32 Rails:
> /var/www/git.usa-800.com/gitorious
> git      17323  0.0 14.0 195468   71132 ?      Sl   Apr22    4:01 ruby
> script/server -d
> git      20941  0.0  0.0  31808        280 ?       S    Apr26   0:02
> searchd --config /var/www/
> git.usa-800.com/gitorious/config/ultrasphinx/production.conf
> git      24308  0.0  3.0 185200    15496 ?       S    Apr26   0:00 ruby
> /var/www/git.usa-800.com/gitorious/script/git-daemon -d
> git      24727  0.0 20.3 198600  102908 ?      Sl   Apr26    0:47 poller
>
> $ ps aux | grep stomp
> root     25829  0.0  2.1  64656 11104 ?        S    Apr26   0:20
> /usr/bin/ruby1.8 /usr/bin/stompserver
>
>
> What direction should I head in?  Thanks again,
> - Ryan
>
> On Wed, Apr 27, 2011 at 1:20 AM, Marius Mårnes Mathiesen <
> marius.mathie...@gmail.com> wrote:
>
>> On Tue, Apr 26, 2011 at 6:27 PM, Ryan Linneman <rlinne...@gmail.com>wrote:
>>
>>> I've setup a private install of gitorious on ubuntu following
>>> Christians guide at
>>> http://cjohansen.no/en/ruby/setting_up_gitorious_on_your_own_server.
>>> Almost everything seems to be functional now.  I can seem to find any
>>> other reports of the following issue and am not well versed in Ruby/
>>> Rails.  The problem I have is when attempting to review a merge
>>> request, the section "Commits that would be merged" shows the
>>> following "An error has occured. Please try again later."  I've looked
>>> into the production.log file and get:
>>>
>>> NoMethodError (undefined method `diffs' for nil:NilClass):
>>>  app/models/merge_request_version.rb:107:in `single_commit_diff'
>>>
>>
>> Ryan,
>> The problem you're seeing may be caused by some parts missing on your
>> server. A quick background:
>>
>> - When you create a merge request, a new branch is pushed to the target
>> repository (refs/merge-requests/<merge-request-id>. This branch will be the
>> commit chosen as the last commit in the merge request
>> - At the same time, one branch is created for each version of a merge
>> request in a hidden tracking repository for the target repository
>> (refs/merge-request/<merge-request-id>/<version>
>>
>> It could be that one of these branches is missing. To find the path to
>> these repositories on disk:
>>
>> Assuming the URL to your merge request is /project/repo/merge_requests/1:
>> enter this inside script/console to find the location of the repositories on
>> disk (substitute "project", "repository" and "1" with the real values from
>> your merge request:
>>
>> mr =
>> Project.find_by_slug("project").repositories.find_by_name("repo").merge_requests.find_by_sequence_number(1)
>> mr.target_repository.full_repository_path
>> mr.tracking_repository.full_repository_path
>>
>> Now, verify that the merge request branch exists in the target repository:
>> cat <target_repo_path>/refs/merge-requests/1  # should be the SHA of the
>> merge request
>> cat <tracking_repo_path>/refs/merge-requests/1/1  # should be the same
>>
>> Are both of these correct?
>>
>> Cheers,
>> - Marius
>>
>> --
>> To post to this group, send email to gitorious@googlegroups.com
>> To unsubscribe from this group, send email to
>> gitorious+unsubscr...@googlegroups.com
>>
>
>  --
> To post to this group, send email to gitorious@googlegroups.com
> To unsubscribe from this group, send email to
> gitorious+unsubscr...@googlegroups.com
>



-- 
Marius Mårnes Mathiesen
Rubyist, Shortcut AS
Tel.: (+47) 92 60 95 38.

http://shortcut.no

-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com

Reply via email to