502 proxy error

Added by Daniel Dimitrov over 11 years ago

Hi @ll,
Today I tried to add this repository to redmine: http://svn.wp-plugins.org/chimpexpress and whenever I go to the repository tab the whole redmine installation just dies with:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /projects/worpmailer/repository.

Reason: Error reading from remote server

Additionally, a 502 Bad Gateway error was encountered while trying to use an ErrorDocument to handle the request.

My mongrel.8000.log is full with lines like this:

svn: Unable to find repository location for 'http://plugins.svn.wordpress.org/chimpexpress' in revision 200
svn: Unable to find repository location for 'http://plugins.svn.wordpress.org/chimpexpress' in revision 400
svn: Unable to find repository location for 'http://plugins.svn.wordpress.org/chimpexpress' in revision 600

Any ideas what could be wrong? Redmine is functioning perfectly with other repositories, but not with the above one...
Thank you in advance!

Replies (3)

RE: 502 proxy error - Added by Daniel Dimitrov over 11 years ago

More info from the log:

svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 140600
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 140800
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 141000
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 141200
** Daemonized, any open files are closed.  Look at tmp/pids/mongrel.8000.pid and log/mongrel.8000.log for info.
** Starting Mongrel listening at 0.0.0.0:8000
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/tcphack.rb:12:in `initialize_without_backlog': Address already in use - bind(2) (Errno::EADDRINUSE)
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/tcphack.rb:12:in `initialize'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:93:in `new'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:93:in `initialize'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:139:in `new'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:139:in `listener'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    from /usr/bin/mongrel_rails:19:in `load'
    from /usr/bin/mongrel_rails:19
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 141400
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 141600
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 141800
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 142000
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 142200
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 142400
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 142600
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 142800
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 143000
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 143200
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 143400
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 143600
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 143800
** Daemonized, any open files are closed.  Look at tmp/pids/mongrel.8000.pid and log/mongrel.8000.log for info.
** Starting Mongrel listening at 0.0.0.0:8000
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/tcphack.rb:12:in `initialize_without_backlog': Address already in use - bind(2) (Errno::EADDRINUSE)
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/tcphack.rb:12:in `initialize'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:93:in `new'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:93:in `initialize'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:139:in `new'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:139:in `listener'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    from /usr/bin/mongrel_rails:19:in `load'
    from /usr/bin/mongrel_rails:19
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 144000
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 144200
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 144400
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 144600
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 144800
** Daemonized, any open files are closed.  Look at tmp/pids/mongrel.8000.pid and log/mongrel.8000.log for info.
** Starting Mongrel listening at 0.0.0.0:8000
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/tcphack.rb:12:in `initialize_without_backlog': Address already in use - bind(2) (Errno::EADDRINUSE)
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/tcphack.rb:12:in `initialize'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:93:in `new'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:93:in `initialize'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:139:in `new'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:139:in `listener'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    from /usr/bin/mongrel_rails:19:in `load'
    from /usr/bin/mongrel_rails:19
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 145000
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 145200
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 145400
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 145600
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 145800
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 146000
svn: Unable to find repository location for 'http://svn.wp-plugins.org/chimpexpress' in revision 146200
** TERM signal received.
Wed Apr 13 10:45:12 +0200 2011: Reaping 157 threads for slow workers because of 'shutdown'
Thread #<Thread:0x2afc325e96e8 sleep> is too old, killing.
Wed Apr 13 10:45:12 +0200 2011: Error calling Dispatcher.dispatch #<Mongrel::TimeoutError: Mongrel timed out this thread: shutdown>Thread #<Thread:0x2afc3262a698 sleep> is too old, killing.

/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:221:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/usr/bin/mongrel_rails:19:in `load'
/usr/bin/mongrel_rails:19Wed Apr 13 10:45:12 +0200 2011: Error calling Dispatcher.dispatch #<Mongrel::TimeoutError: Mongrel timed out this thread: shutdown>Thread #<Thread:0x2afc32739d68 sleep> is too old, killing.

/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:221:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/usr/bin/mongrel_rails:19:in `load'
/usr/bin/mongrel_rails:19Wed Apr 13 10:45:12 +0200 2011: Error calling Dispatcher.dispatch #<Mongrel::TimeoutError: Mongrel timed out this thread: shutdown>Thread #<Thread:0x2afc328231c0 sleep> is too old, killing.

RE: 502 proxy error - Added by Christina Louise Warne over 11 years ago

Hi Daniel,

I'm in the same boat as you, funnily enough, with a WordPress plugin.

I think however I've found a solution. The problem, I think, is just the time it's taking for your server to process the WordPress repository. My plugin was added at revision 93302, clearly this is going to take a long time to go through all the revisions given how busy the repos is (at the time of writing we're on revision 380000 something).

So, here's what I did. I found the repository ID from the repositories table which corresponded with my plugin projects repos. I then created a changeset record in the changeset table which had dummy values in. In my case I used this SQL:-

insert into changesets (repository_id,revision,committer,committed_on,comments,commit_date) values (9,'93301','(none)','2009-02-10 09:09:06','(none)','2009-02-10 09:09:06');

9 is the ID of my repository in the repositories table. 93301 is the revision immediately prior to my plugin being added to the WordPress repositories. The committer and comment are just set to (none) and the dates are the timestamps of revision 93302 when my plugin was added.

I've then gone to the root of my Redmine installation end run this (this is a Linux server):-

export RAILS_ENV=production
rake redmine:fetch_changesets

Having looked directly at the database, I can see that the system is now pulling in changes that are relevant to my plugin, but based on the time it took to process 200 revisions... I think it's going to take a while, and the worst thing is I have another plugin to add.

You may want to try the same thing because I think this is your problem, the sheer size of the WordPress repos and the time it takes to process it. You just have to help Redmine a long a little by tweaking the DB so it starts at a suitably high revision number. Given how long it's taking and how busy the WordPress repos is, you might be advised to setup a scheduled task to scan the repos daily or something like that so that it keeps on top of the changes.

Hope this helps, I should just point out that at the time of writing, it's still processing, but new changesets are getting stuffed into the database. The changesets that are appearing all look ok, but the latest changesets section doesn't work. I think this is down to how the WordPress repos is run. Each plugin is in a subdirectory of the repos. When you browse the repos (which is obviously done using the URL) you'll get the 'trunk', 'tags' and 'branches' directories. But, the changes cached in the DB are all being prefixed with the plugin name because thats how the repos sees the files. The latest revisions feature finds changes based on the path so say for my plugin '/advanced-custom-field-widget/trunk' is stored in the DB but the repos browser is looking for '/trunk' (at least this is my understanding of how it all ties together).

Regards

Christina

RE: 502 proxy error - Added by Christina Louise Warne over 11 years ago

Hi Daniel,

Scratch my comment that the latest revisions section isn't working. It took an age to process the repository, but I left it run an an infrequent cron job over night and it's all working. I have the latest revisions and all changes information cached locally.

The tweaking of the database definitely helped, although I suspect if you get the fetch running on a cron job it will work too as it's also processed my other plugin which didn't get the database tweak.

Regards

Christina

(1-3/3)