Re: Mercurial, Internal Server Error, RepoError...

2010-08-26 Thread Christian Hammond
Thanks Ryan. I appreciate the detailed information. It sounds like Mercurial
isn't seeing the proper directory when it invokes its own ssh functionality,
so we'll need to look further into it. It would help if someone
knowledgeable with Mercurial could do some digging to figure out why it's
not seeing the right $HOME.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Wed, Aug 18, 2010 at 1:49 PM, Ryan Roemer  wrote:

> Hi Christian,
>
> I run post-review from my laptop ("dev box") to submit review requests
> to our remote RB server, which is running in a cloud VM.
>
> For our RB server, we take a new VM with Ubuntu, install vanilla
> apache, and issue an 'rb-site' command to install RB and host through
> Apache.  So, this is an Apache install, and we use mod_python. Our
> apache config for RB is at /etc/apache2/sites-available/reviewboard
> and includes in relevant part:
>
> # Serve django pages
> 
>PythonPath "['/var/www/reviewboard/conf'] + sys.path"
>SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
>SetEnv PYTHON_EGG_CACHE "/var/www/reviewboard/tmp/egg_cache"
>SetEnv HOME "/var/www/reviewboard/data"
>SetHandler mod_python
>PythonHandler django.core.handlers.modpython
>PythonAutoReload Off
>PythonDebug Off
># Used to run multiple mod_python sites in the same apache
>PythonInterpreter reviewboard_reviewboard
> 
>
> Note: we haven't tweaked any of the settings -- we just let the basic
> install / rb-site do the work.
>
> Digging in a little bit more, is that (if I remember correctly -- I
> had debug statements in an older install that I've since wiped, so I
> may be off), here are the two checks:
>
> (1) Add a new repository in RB Admin site with Path: "ssh:// ...
> anything ...":  This causes a validation check through:
> reviewboard.scmtools.core.SCMTool.check_repository() that uses "/var/
> www/reviewboard/data/.ssh" as the operative SSH directory.  This is
> the operative directory for all John's previous email, and was what
> was causing us problems for adding respositories on RB server only.
>
> (2) On a dev. machine (laptop, etc. separate from the RB Server), a
> dev wants to submit a review requests and issues a 'post-review'
> command on their machine.  Post-review contacts the RB server, and (as
> far as I can tell) this starts a different code path on the RB server,
> which ends up going to reviewboard.scmtools.HgClient.__init__().  When
> we hit the line (175 in 1.5 RC1): "self.repo = hg.repository(hg_ui,
> path=repoPath)", then we get an SSH exception bubbled up as follows:
>
> 2010-08-17 13:29:26,645 - ERROR - Exception thrown for user USER at
> http://REPO_IP_ADDRESS/r/1/
>
> no suitable response from remote hg
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/
> django/core/handlers/base.py", line 100, in get_response
>response = callback(request, *callback_args, **callback_kwargs)
>   File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/accounts/decorators.py", line 25, in _check
>return login_required(view_func)(*args, **kwargs)
>  File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.3-py2.6.egg/
> djblets/auth/util.py", line 46, in _checklogin
>return view_func(request, *args, **kwargs)
>  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/reviews/views.py", line 226, in review_detail
>'upload_diff_form': UploadDiffForm(review_request),
>  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/reviews/forms.py", line 214, in __init__
>data, *args, **kwargs)
>  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/diffviewer/forms.py", line 44, in __init__
> if self.repository.get_scmtool().get_diffs_use_absolute_paths():
>   File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/scmtools/models.py", line 52, in get_scmtool
>return cls(self)
>  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/scmtools/hg.py", line 29, in __init__
> self.client = HgClient(repository.path)
>   File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/scmtools/hg.py", line 175, in __init__
> self.repo = hg.repository(hg_ui, path=repoPath)
>  File "/usr/lib/pymodules/python2.6/mercurial/hg.py", line 63, in
> repository
>repo = _lookup(path).instance(ui, path, create)
>  File "/usr/lib/pymodules/python2.6/mercurial/sshrepo.py", line 51,
> in __init__
>self.validate_repo(ui, sshcmd, args, remotecmd)
>  File "/usr/lib/pymodules/python2.6/mercurial/sshrepo.py", line 82,
> in validate_repo
>self.abort(error.RepoError(_("no suitable response from remote
> hg")))
>  File "/usr/lib/pymodules/python2.6/mercurial/sshrepo.py", line 100,
>

Re: Mercurial, Internal Server Error, RepoError...

2010-08-18 Thread Ryan Roemer
Actually, on reviewing the thread, I'm not sure #1 in my email was the
problem in John's original one.  Checks #1 in #2 in my latest
response, however, were both problems for my install/setup until I
added "id_dsa" to the two (different) respective .ssh directory
locations.

And, as a nit, when I edited "http://REPO_IP_ADDRESS/r/1/ " in the
exception stack trace, I really meant "http://RB_SERVER_IP_ADDRESS/r/
1/ ", in case I caused any confusion...

On Aug 18, 1:49 pm, Ryan Roemer  wrote:
> Hi Christian,
>
> I run post-review from my laptop ("dev box") to submit review requests
> to our remote RB server, which is running in a cloud VM.
>
> For our RB server, we take a new VM with Ubuntu, install vanilla
> apache, and issue an 'rb-site' command to install RB and host through
> Apache.  So, this is an Apache install, and we use mod_python. Our
> apache config for RB is at /etc/apache2/sites-available/reviewboard
> and includes in relevant part:
>
> # Serve django pages
> 
>     PythonPath "['/var/www/reviewboard/conf'] + sys.path"
>     SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
>     SetEnv PYTHON_EGG_CACHE "/var/www/reviewboard/tmp/egg_cache"
>     SetEnv HOME "/var/www/reviewboard/data"
>     SetHandler mod_python
>     PythonHandler django.core.handlers.modpython
>     PythonAutoReload Off
>     PythonDebug Off
>     # Used to run multiple mod_python sites in the same apache
>     PythonInterpreter reviewboard_reviewboard
> 
>
> Note: we haven't tweaked any of the settings -- we just let the basic
> install / rb-site do the work.
>
> Digging in a little bit more, is that (if I remember correctly -- I
> had debug statements in an older install that I've since wiped, so I
> may be off), here are the two checks:
>
> (1) Add a new repository in RB Admin site with Path: "ssh:// ...
> anything ...":  This causes a validation check through:
> reviewboard.scmtools.core.SCMTool.check_repository() that uses "/var/
> www/reviewboard/data/.ssh" as the operative SSH directory.  This is
> the operative directory for all John's previous email, and was what
> was causing us problems for adding respositories on RB server only.
>
> (2) On a dev. machine (laptop, etc. separate from the RB Server), a
> dev wants to submit a review requests and issues a 'post-review'
> command on their machine.  Post-review contacts the RB server, and (as
> far as I can tell) this starts a different code path on the RB server,
> which ends up going to reviewboard.scmtools.HgClient.__init__().  When
> we hit the line (175 in 1.5 RC1): "self.repo = hg.repository(hg_ui,
> path=repoPath)", then we get an SSH exception bubbled up as follows:
>
> 2010-08-17 13:29:26,645 - ERROR - Exception thrown for user USER 
> athttp://REPO_IP_ADDRESS/r/1/
>
> no suitable response from remote hg
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/
> django/core/handlers/base.py", line 100, in get_response
>     response = callback(request, *callback_args, **callback_kwargs)
>   File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/accounts/decorators.py", line 25, in _check
>     return login_required(view_func)(*args, **kwargs)
>   File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.3-py2.6.egg/
> djblets/auth/util.py", line 46, in _checklogin
>     return view_func(request, *args, **kwargs)
>   File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/reviews/views.py", line 226, in review_detail
>     'upload_diff_form': UploadDiffForm(review_request),
>   File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/reviews/forms.py", line 214, in __init__
>     data, *args, **kwargs)
>   File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/diffviewer/forms.py", line 44, in __init__
>     if self.repository.get_scmtool().get_diffs_use_absolute_paths():
>   File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/scmtools/models.py", line 52, in get_scmtool
>     return cls(self)
>   File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/scmtools/hg.py", line 29, in __init__
>     self.client = HgClient(repository.path)
>   File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
> py2.6.egg/reviewboard/scmtools/hg.py", line 175, in __init__
>     self.repo = hg.repository(hg_ui, path=repoPath)
>   File "/usr/lib/pymodules/python2.6/mercurial/hg.py", line 63, in
> repository
>     repo = _lookup(path).instance(ui, path, create)
>   File "/usr/lib/pymodules/python2.6/mercurial/sshrepo.py", line 51,
> in __init__
>     self.validate_repo(ui, sshcmd, args, remotecmd)
>   File "/usr/lib/pymodules/python2.6/mercurial/sshrepo.py", line 82,
> in validate_repo
>     self.abort(error.RepoError(_("no suitable response from remote
> hg")))
>   File "/usr/lib/pymodules/python2.6/mercurial/sshrepo.py", 

Re: Mercurial, Internal Server Error, RepoError...

2010-08-18 Thread Ryan Roemer
Hi Christian,

I run post-review from my laptop ("dev box") to submit review requests
to our remote RB server, which is running in a cloud VM.

For our RB server, we take a new VM with Ubuntu, install vanilla
apache, and issue an 'rb-site' command to install RB and host through
Apache.  So, this is an Apache install, and we use mod_python. Our
apache config for RB is at /etc/apache2/sites-available/reviewboard
and includes in relevant part:

# Serve django pages

PythonPath "['/var/www/reviewboard/conf'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
SetEnv PYTHON_EGG_CACHE "/var/www/reviewboard/tmp/egg_cache"
SetEnv HOME "/var/www/reviewboard/data"
SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonAutoReload Off
PythonDebug Off
# Used to run multiple mod_python sites in the same apache
PythonInterpreter reviewboard_reviewboard


Note: we haven't tweaked any of the settings -- we just let the basic
install / rb-site do the work.

Digging in a little bit more, is that (if I remember correctly -- I
had debug statements in an older install that I've since wiped, so I
may be off), here are the two checks:

(1) Add a new repository in RB Admin site with Path: "ssh:// ...
anything ...":  This causes a validation check through:
reviewboard.scmtools.core.SCMTool.check_repository() that uses "/var/
www/reviewboard/data/.ssh" as the operative SSH directory.  This is
the operative directory for all John's previous email, and was what
was causing us problems for adding respositories on RB server only.

(2) On a dev. machine (laptop, etc. separate from the RB Server), a
dev wants to submit a review requests and issues a 'post-review'
command on their machine.  Post-review contacts the RB server, and (as
far as I can tell) this starts a different code path on the RB server,
which ends up going to reviewboard.scmtools.HgClient.__init__().  When
we hit the line (175 in 1.5 RC1): "self.repo = hg.repository(hg_ui,
path=repoPath)", then we get an SSH exception bubbled up as follows:

2010-08-17 13:29:26,645 - ERROR - Exception thrown for user USER at
http://REPO_IP_ADDRESS/r/1/

no suitable response from remote hg
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/
django/core/handlers/base.py", line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
py2.6.egg/reviewboard/accounts/decorators.py", line 25, in _check
return login_required(view_func)(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.3-py2.6.egg/
djblets/auth/util.py", line 46, in _checklogin
return view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
py2.6.egg/reviewboard/reviews/views.py", line 226, in review_detail
'upload_diff_form': UploadDiffForm(review_request),
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
py2.6.egg/reviewboard/reviews/forms.py", line 214, in __init__
data, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
py2.6.egg/reviewboard/diffviewer/forms.py", line 44, in __init__
if self.repository.get_scmtool().get_diffs_use_absolute_paths():
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
py2.6.egg/reviewboard/scmtools/models.py", line 52, in get_scmtool
return cls(self)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
py2.6.egg/reviewboard/scmtools/hg.py", line 29, in __init__
self.client = HgClient(repository.path)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5rc1-
py2.6.egg/reviewboard/scmtools/hg.py", line 175, in __init__
self.repo = hg.repository(hg_ui, path=repoPath)
  File "/usr/lib/pymodules/python2.6/mercurial/hg.py", line 63, in
repository
repo = _lookup(path).instance(ui, path, create)
  File "/usr/lib/pymodules/python2.6/mercurial/sshrepo.py", line 51,
in __init__
self.validate_repo(ui, sshcmd, args, remotecmd)
  File "/usr/lib/pymodules/python2.6/mercurial/sshrepo.py", line 82,
in validate_repo
self.abort(error.RepoError(_("no suitable response from remote
hg")))
  File "/usr/lib/pymodules/python2.6/mercurial/sshrepo.py", line 100,
in abort
raise exception
RepoError: no suitable response from remote hg

This second error was fixed by adding the same identity file to a
directory "/var/www/.ssh" as we had in "/var/www/reviewboard/
data/.ssh".

So, it looks like for check #1 (add a repo), the $HOME = "/var/www/
reviewboard/data" (the RB-specific home), but for check #2 (RB server
receives a request from remote post-review), the $HOME = "/var/
www/" (the real Unix user home for 'www-data').

Thanks,
Ryan



On Aug 18, 12:34 pm, Christian Hammond  wrote:
> Glad it works for you, though I want to understand this a bit more.
>
> When you say you run post-review with a dev box, 

Re: Mercurial, Internal Server Error, RepoError...

2010-08-18 Thread Christian Hammond
Glad it works for you, though I want to understand this a bit more.

When you say you run post-review with a dev box, I assume you mean that it's
still Apache looking for the /var/www/.ssh/id_dsa, right? is that a
different install from the main install, or is it just that you're running
post-review *on* the dev box?

Is this happening with an Apache install, or using devserver? Also, are you
running mod_python or fastcgi/wsgi?

Does your Apache config have the SetEnv HOME line? If so, I'm surprised
we're seeing that behavior, but it would indicate that Mercurial is never
seeing what we've set it to, unlike Subversion and Git.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Tue, Aug 17, 2010 at 2:03 PM, Ryan Roemer  wrote:

> I've been working with John on this, and we finally pounded out
> something that works.  We are running Review Board 1.5 RC1.  Say we
> have a code base repo with ssh string of: ssh://
> some_u...@foo.codebasehq.com/path/to/repo.hg
> . To generalize, it took us something like this to get hosted SSH from
> Codebase working:
>
> SSH Directories
>
> For server setup on Ubuntu, Review Board is going to run as the Apache
> user 'www-data'.  The Apache user's home (e.g., "$HOME") is '/var/www'
> and we're installing Review Board to '/var/www/reviewboard'.  We have
> a private key named "id_dsa", that is uploaded (and passphrase-less)
> to Codebase.  We installed id_dsa on the server as follows:
>
> * /var/www/.ssh/id_dsa
> * /var/www/reviewboard/data/.ssh/id_dsa
>
> (Actually with symlinks).  I'm not sure if this was strictly
> necessary, but seemed the only combination to work.  Skimming (really
> quickly) the code it seems that adding a repository with "ssh://" URL
> does a validation against '/var/www/reviewboard/data/.ssh/id_dsa', but
> using post-review on a dev. box causes actions on the server to use '/
> var/www/.ssh/id_dsa' (with the Mercurial API calls).
>
> Adding a Repository
>
> Then, when we add a repository, the relevant fields we set were:
>
> * Path: "ssh://some_u...@foo.codebasehq.com/path/to/repo.hg"
> * Username: "some_user"
> * Password: (Empty)
>
> And everything seems to work (from post-review through actual reviews
> on Review Board).
>
> Not sure if the above behavior is / will be different with newer
> versions of RB, but this is what got us through and actually hooked up
> with Codebase, so hope it helps!
>
> Best,
> Ryan
>
>
> On Aug 13, 12:10 pm, John DeRosa  wrote:
> > On Aug 13, 2010, at 3:20 AM, Christian Hammond wrote:
> >
> > > Try renaming id_rsa_ipstreet to just id_rsa. This is what paramiko is
> expecting to find in that directory.
> >
> > > Christian
> >
> > Done. Same thing happens.
> >
> > John
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~--~~~~--~~--~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Re: Mercurial, Internal Server Error, RepoError...

2010-08-18 Thread Ryan Roemer
I've been working with John on this, and we finally pounded out
something that works.  We are running Review Board 1.5 RC1.  Say we
have a code base repo with ssh string of: 
ssh://some_u...@foo.codebasehq.com/path/to/repo.hg
. To generalize, it took us something like this to get hosted SSH from
Codebase working:

SSH Directories

For server setup on Ubuntu, Review Board is going to run as the Apache
user 'www-data'.  The Apache user's home (e.g., "$HOME") is '/var/www'
and we're installing Review Board to '/var/www/reviewboard'.  We have
a private key named "id_dsa", that is uploaded (and passphrase-less)
to Codebase.  We installed id_dsa on the server as follows:

* /var/www/.ssh/id_dsa
* /var/www/reviewboard/data/.ssh/id_dsa

(Actually with symlinks).  I'm not sure if this was strictly
necessary, but seemed the only combination to work.  Skimming (really
quickly) the code it seems that adding a repository with "ssh://" URL
does a validation against '/var/www/reviewboard/data/.ssh/id_dsa', but
using post-review on a dev. box causes actions on the server to use '/
var/www/.ssh/id_dsa' (with the Mercurial API calls).

Adding a Repository

Then, when we add a repository, the relevant fields we set were:

* Path: "ssh://some_u...@foo.codebasehq.com/path/to/repo.hg"
* Username: "some_user"
* Password: (Empty)

And everything seems to work (from post-review through actual reviews
on Review Board).

Not sure if the above behavior is / will be different with newer
versions of RB, but this is what got us through and actually hooked up
with Codebase, so hope it helps!

Best,
Ryan


On Aug 13, 12:10 pm, John DeRosa  wrote:
> On Aug 13, 2010, at 3:20 AM, Christian Hammond wrote:
>
> > Try renaming id_rsa_ipstreet to just id_rsa. This is what paramiko is 
> > expecting to find in that directory.
>
> > Christian
>
> Done. Same thing happens.
>
> John

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Mercurial, Internal Server Error, RepoError...

2010-08-13 Thread John DeRosa
On Aug 13, 2010, at 3:20 AM, Christian Hammond wrote:

> Try renaming id_rsa_ipstreet to just id_rsa. This is what paramiko is 
> expecting to find in that directory.
> 
> Christian
> 

Done. Same thing happens.

John


-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Mercurial, Internal Server Error, RepoError...

2010-08-13 Thread Christian Hammond
Try renaming id_rsa_ipstreet to just id_rsa. This is what paramiko is
expecting to find in that directory.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Tue, Aug 10, 2010 at 10:45 AM, John DeRosa  wrote:

> On Aug 10, 2010, at 1:00 AM, Christian Hammond wrote:
>
> > It sounds like the publickey method didn't work correctly.
> >
> > Are the files in data/.ssh/ owned by the web server's user, and contain
> the right permissions?
>
> Yes:
>
> r...@reviewboard:/var/www/reviewboard/data# ls -alrt
> total 12
> drwxr-xr-x 3 www-data www-data 4096 Aug  9 18:18 .
> drwxr-xr-x 7 www-data www-data 4096 Aug  9 18:59 ..
> drwxr-xr-x 2 www-data www-data 4096 Aug 10 17:40 .ssh
>
> r...@reviewboard:/var/www/reviewboard/data/.ssh# ls -lrt
> total 12
> -rw-r--r-- 1 www-data www-data  396 Aug  9 18:18 known_hosts
> -rw--- 1 www-data www-data 1743 Aug  9 18:54 id_rsa_ipstreet
> -rw-r--r-- 1 www-data www-data   80 Aug  9 21:45 config
>
>
> >
> > There was another issue we saw recently involving paramiko (the library
> we use to handle SSH connections), so we're trying to collect all the data
> we can.
>
> I'm ready, willing, and able to run tests or gather data for you. Tell me
> how I can help!
>
> John
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~--~~~~--~~--~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Re: Mercurial, Internal Server Error, RepoError...

2010-08-12 Thread John DeRosa
Should I file a ticket on this exchange, so it's in the bug tracker?

On Aug 10, 2010, at 10:45 AM, John DeRosa wrote:

> On Aug 10, 2010, at 1:00 AM, Christian Hammond wrote:
> 
>> It sounds like the publickey method didn't work correctly.
>> 
>> Are the files in data/.ssh/ owned by the web server's user, and contain the 
>> right permissions?
> 
> Yes:
> 
> r...@reviewboard:/var/www/reviewboard/data# ls -alrt
> total 12
> drwxr-xr-x 3 www-data www-data 4096 Aug  9 18:18 .
> drwxr-xr-x 7 www-data www-data 4096 Aug  9 18:59 ..
> drwxr-xr-x 2 www-data www-data 4096 Aug 10 17:40 .ssh
> 
> r...@reviewboard:/var/www/reviewboard/data/.ssh# ls -lrt
> total 12
> -rw-r--r-- 1 www-data www-data  396 Aug  9 18:18 known_hosts
> -rw--- 1 www-data www-data 1743 Aug  9 18:54 id_rsa_ipstreet
> -rw-r--r-- 1 www-data www-data   80 Aug  9 21:45 config
> 
> 
>> 
>> There was another issue we saw recently involving paramiko (the library we 
>> use to handle SSH connections), so we're trying to collect all the data we 
>> can.
> 
> I'm ready, willing, and able to run tests or gather data for you. Tell me how 
> I can help!
> 
> John
> 
> -- 
> Want to help the Review Board project? Donate today at 
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~--~~~~--~~--~--~---
> To unsubscribe from this group, send email to 
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Mercurial, Internal Server Error, RepoError...

2010-08-10 Thread John DeRosa
On Aug 10, 2010, at 1:00 AM, Christian Hammond wrote:

> It sounds like the publickey method didn't work correctly.
> 
> Are the files in data/.ssh/ owned by the web server's user, and contain the 
> right permissions?

Yes:

r...@reviewboard:/var/www/reviewboard/data# ls -alrt
total 12
drwxr-xr-x 3 www-data www-data 4096 Aug  9 18:18 .
drwxr-xr-x 7 www-data www-data 4096 Aug  9 18:59 ..
drwxr-xr-x 2 www-data www-data 4096 Aug 10 17:40 .ssh

r...@reviewboard:/var/www/reviewboard/data/.ssh# ls -lrt
total 12
-rw-r--r-- 1 www-data www-data  396 Aug  9 18:18 known_hosts
-rw--- 1 www-data www-data 1743 Aug  9 18:54 id_rsa_ipstreet
-rw-r--r-- 1 www-data www-data   80 Aug  9 21:45 config


> 
> There was another issue we saw recently involving paramiko (the library we 
> use to handle SSH connections), so we're trying to collect all the data we 
> can.

I'm ready, willing, and able to run tests or gather data for you. Tell me how I 
can help!

John

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Mercurial, Internal Server Error, RepoError...

2010-08-10 Thread Christian Hammond
It sounds like the publickey method didn't work correctly.

Are the files in data/.ssh/ owned by the web server's user, and contain the
right permissions?

There was another issue we saw recently involving paramiko (the library we
use to handle SSH connections), so we're trying to collect all the data we
can.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Mon, Aug 9, 2010 at 2:55 PM, John DeRosa  wrote:

> On Aug 7, 2010, at 1:02 AM, Christian Hammond wrote:
>
> > Hi John,
> >
> > I suspect the problem is due to the repository being SSH-based. Review
> Board 1.0.x doesn't in general support SSH-backed repositories, as it has no
> way to present host key confirmation or key checking/storage.
> >
> > We've been added this support to Review Board 1.5. I'd suggest installing
> 1.5 RC 1 and attempting to re-add that repository. If you upgrade the
> existing site, make sure to follow the instructions at the end of the site
> upgrade that tell you to create the $sitedir/data directory, set the proper
> ownership, and add the right Apache configuration for setting $HOME to that
> directory.
> >
> [snip]
>
> I installed 1.5 RC 1 onto a new server (so no upgrade needed), and made
> more progress. Thank you! But ultimately things didn't work. What am I doing
> wrong? :
>
> 1) On the Review Board server, in data/.ssh/, I deposited my private key,
> and a config file that specified it when accessing codebasehq.com.
> Codebasehq.com has my corresponding public key.
>
> 2) In the Review Board admin, under "repositories", I entered "ssh://
> h...@codebasehq.com/ipstreet/dev/v10.hg" as the path, as well as my Codebase
> username and password.
>
> 3) I click on Save and I get: "Unable to authenticate against this
> repository with the provided username and password."
>
> I enabled logging, and the reviewboard log has:
>
> ---
> 2010-08-09 11:59:35,562 - INFO - Logging to
> /var/www/reviewboard/logs/reviewboard.log with a minimum level of DEBUG
> 2010-08-09 11:59:55,437 - DEBUG - HgTool: Attempting ssh connection with
> host: codebasehq.com, username: johnderosa
> 2010-08-09 11:59:55,561 - DEBUG - starting thread (client mode):
> 0x96443dd0L
> 2010-08-09 11:59:55,664 - INFO - Connected (version 2.0, client
> OpenSSH_5.2)
> 2010-08-09 11:59:55,761 - DEBUG - kex
> algos:['diffie-hellman-group-exchange-sha256',
> 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1',
> 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client
> encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256',
> 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc',
> 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-...@lysator.liu.se']
> server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256',
> 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc',
> 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-...@lysator.liu.se']
> client mac:['hmac-md5', 'hmac-sha1', 'umac...@openssh.com',
> 'hmac-ripemd160', 'hmac-ripemd...@openssh.com', 'hmac-sha1-96',
> 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', 'umac...@openssh.com',
> 'hmac-ripemd160', 'hmac-ripemd...@openssh.com', 'hmac-sha1-96',
> 'hmac-md5-96'] client compress:['none', 'z...@openssh.com'] server
> compress:['none', 'z...@openssh.com'] client lang:[''] server lang:['']
> kex follows?False
> 2010-08-09 11:59:55,761 - DEBUG - Ciphers agreed: local=aes128-ctr,
> remote=aes128-ctr
> 2010-08-09 11:59:55,761 - DEBUG - using kex diffie-hellman-group1-sha1;
> server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac:
> local hmac-sha1, remote hmac-sha1; compression: local none, remote none
> 2010-08-09 11:59:55,961 - DEBUG - Switch to new keys ...
> 2010-08-09 11:59:56,200 - DEBUG - userauth is OK
> 2010-08-09 11:59:56,298 - DEBUG - Authentication type (password) not
> permitted.
> 2010-08-09 11:59:56,298 - DEBUG - Allowed methods: ['publickey',
> 'keyboard-interactive']
> 2010-08-09 11:59:56,405 - DEBUG - userauth is OK
> 2010-08-09 11:59:56,504 - INFO - Authentication (keyboard-interactive)
> failed.
> 2010-08-09 11:59:56,604 - DEBUG - EOF in transport thread
> ---
>
>
> What else should I try or look at to debug this?
>
> Thanks!
>
> John
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~--~~~~--~~--~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+un

Re: Mercurial, Internal Server Error, RepoError...

2010-08-09 Thread John DeRosa
On Aug 7, 2010, at 1:02 AM, Christian Hammond wrote:

> Hi John,
> 
> I suspect the problem is due to the repository being SSH-based. Review Board 
> 1.0.x doesn't in general support SSH-backed repositories, as it has no way to 
> present host key confirmation or key checking/storage.
> 
> We've been added this support to Review Board 1.5. I'd suggest installing 1.5 
> RC 1 and attempting to re-add that repository. If you upgrade the existing 
> site, make sure to follow the instructions at the end of the site upgrade 
> that tell you to create the $sitedir/data directory, set the proper 
> ownership, and add the right Apache configuration for setting $HOME to that 
> directory.
> 
[snip]

I installed 1.5 RC 1 onto a new server (so no upgrade needed), and made more 
progress. Thank you! But ultimately things didn't work. What am I doing wrong? :

1) On the Review Board server, in data/.ssh/, I deposited my private key, and a 
config file that specified it when accessing codebasehq.com. Codebasehq.com has 
my corresponding public key.

2) In the Review Board admin, under "repositories", I entered 
"ssh://h...@codebasehq.com/ipstreet/dev/v10.hg" as the path, as well as my 
Codebase username and password.

3) I click on Save and I get: "Unable to authenticate against this repository 
with the provided username and password."

I enabled logging, and the reviewboard log has:

---
2010-08-09 11:59:35,562 - INFO - Logging to 
/var/www/reviewboard/logs/reviewboard.log with a minimum level of DEBUG
2010-08-09 11:59:55,437 - DEBUG - HgTool: Attempting ssh connection with host: 
codebasehq.com, username: johnderosa
2010-08-09 11:59:55,561 - DEBUG - starting thread (client mode): 0x96443dd0L
2010-08-09 11:59:55,664 - INFO - Connected (version 2.0, client OpenSSH_5.2)
2010-08-09 11:59:55,761 - DEBUG - kex 
algos:['diffie-hellman-group-exchange-sha256', 
'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 
'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client 
encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 
'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 
'aes256-cbc', 'arcfour', 'rijndael-...@lysator.liu.se'] server 
encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 
'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 
'aes256-cbc', 'arcfour', 'rijndael-...@lysator.liu.se'] client mac:['hmac-md5', 
'hmac-sha1', 'umac...@openssh.com', 'hmac-ripemd160', 
'hmac-ripemd...@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] server 
mac:['hmac-md5', 'hmac-sha1', 'umac...@openssh.com', 'hmac-ripemd160', 
'hmac-ripemd...@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] client 
compress:['none', 'z...@openssh.com'] server compress:['none', 
'z...@openssh.com'] client lang:[''] server lang:[''] kex follows?False
2010-08-09 11:59:55,761 - DEBUG - Ciphers agreed: local=aes128-ctr, 
remote=aes128-ctr
2010-08-09 11:59:55,761 - DEBUG - using kex diffie-hellman-group1-sha1; server 
key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local 
hmac-sha1, remote hmac-sha1; compression: local none, remote none
2010-08-09 11:59:55,961 - DEBUG - Switch to new keys ...
2010-08-09 11:59:56,200 - DEBUG - userauth is OK
2010-08-09 11:59:56,298 - DEBUG - Authentication type (password) not permitted.
2010-08-09 11:59:56,298 - DEBUG - Allowed methods: ['publickey', 
'keyboard-interactive']
2010-08-09 11:59:56,405 - DEBUG - userauth is OK
2010-08-09 11:59:56,504 - INFO - Authentication (keyboard-interactive) failed.
2010-08-09 11:59:56,604 - DEBUG - EOF in transport thread
---


What else should I try or look at to debug this?

Thanks!

John

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Mercurial, Internal Server Error, RepoError...

2010-08-09 Thread John DeRosa
On Aug 7, 2010, at 1:02 AM, Christian Hammond wrote:

> Hi John,
> 
> I suspect the problem is due to the repository being SSH-based. Review Board 
> 1.0.x doesn't in general support SSH-backed repositories, as it has no way to 
> present host key confirmation or key checking/storage.
> 
> We've been added this support to Review Board 1.5. I'd suggest installing 1.5 
> RC 1 and attempting to re-add that repository. If you upgrade the existing 
> site, make sure to follow the instructions at the end of the site upgrade 
> that tell you to create the $sitedir/data directory, set the proper 
> ownership, and add the right Apache configuration for setting $HOME to that 
> directory.
> 
> Christian
> 

Boy, do I feel dumb! Righto, I'll give 1.5 a try!

Thank you!

John


-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Mercurial, Internal Server Error, RepoError...

2010-08-07 Thread Christian Hammond
Hi John,

I suspect the problem is due to the repository being SSH-based. Review Board
1.0.x doesn't in general support SSH-backed repositories, as it has no way
to present host key confirmation or key checking/storage.

We've been added this support to Review Board 1.5. I'd suggest installing
1.5 RC 1 and attempting to re-add that repository. If you upgrade the
existing site, make sure to follow the instructions at the end of the site
upgrade that tell you to create the $sitedir/data directory, set the proper
ownership, and add the right Apache configuration for setting $HOME to that
directory.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Fri, Aug 6, 2010 at 12:33 PM, John DeRosa @ work wrote:

> Hi,
>
> I'm trying to set up Review Board to work with our Mercurial
> repository, but I'm stuck at a RepoError.
>
> 1) The RB server is Ubuntu 10.04 running Review Board 1.0.9. The
> Mercurial repository is hosted at Codebase (http://
> www.codebasehq.com/), with the path ssh://
> h...@codebasehq.com/ipstreet/dev/v10.hg.
>
> 2) On my client (a Mac), I'm running RBtools 0.2.
>
> 3) On my client, I type:  post-review -d 567. 567 is my local check-in
> number. Post-review prints out:
>
> lucius:dev-v10 johnd$ post-review -d 567
> >>> svn info
> >>> git rev-parse --git-dir
> >>> hg root
> >>> hg svn info
> >>> repository info: Path: ssh://h...@codebasehq.com/ipstreet/dev/v10.hg,
> Base path: , Supports changesets: False
> >>> hg diff 567
> >>> Looking for '184.106.204.128 /' cookie in
> /Users/johnd/.post-review-cookies.txt
> >>> Loaded valid cookie -- no login required
> >>> Attempting to create review request on ssh://
> h...@codebasehq.com/ipstreet/dev/v10.hg for None
> >>> HTTP POSTing to http://184.106.204.128/api/json/reviewrequests/new/:
> {'repository_path': 'ssh://h...@codebasehq.com/ipstreet/dev/v10.hg'}
> >>> Review request created
> >>> Uploading diff, size: 31
> >>> HTTP POSTing to
> http://184.106.204.128/api/json/reviewrequests/6/diff/new/: {}
> >>> Got HTTP error: 500:  Transitional//EN"
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
>  
>  500 - Internal Server Error | Review Board
>  
>  
>  Something broke! (Error 500)
>  
>   It appears something broke when you tried to go to here. This is
> either
>   a bug in Review Board or a server configuration error. Please
> report
>   this to your administrator.
>  
>  
> 
>
>
> Error uploading diff
>
> Your review request still exists, but the diff is not attached.
> lucius:dev-v10 johnd$
>
>
> 4) Over on the server, in Apache's error.log, there's this:
>
> ERROR:root:Exception thrown for user stugots at
> http://184.106.204.128/api/json/reviewrequests/5/diff/new/
>
> no suitable response from remote hg
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/
> base.py", line 100, in get_response
>response = callback(request, *callback_args, **callback_kwargs)
>  File "/usr/local/lib/python2.6/dist-packages/django/views/decorators/
> cache.py", line 69, in _wrapped_view_func
>response = view_func(request, *args, **kwargs)
>  File "/usr/local/lib/python2.6/dist-packages/djblets/webapi/
> decorators.py", line 84, in _checklogin
>response = view_func(*args, **kwargs)
>  File "/usr/local/lib/python2.6/dist-packages/django/views/decorators/
> http.py", line 37, in inner
>return func(request, *args, **kwargs)
>  File "/usr/local/lib/python2.6/dist-packages/reviewboard/webapi/
> json.py", line 1203, in new_diff
>form = UploadDiffForm(review_request.repository, form_data,
> request.FILES)
>  File "/usr/local/lib/python2.6/dist-packages/reviewboard/diffviewer/
> forms.py", line 44, in __init__
>if self.repository.get_scmtool().get_diffs_use_absolute_paths():
>  File "/usr/local/lib/python2.6/dist-packages/reviewboard/scmtools/
> models.py", line 43, in get_scmtool
>return cls(self)
>  File "/usr/local/lib/python2.6/dist-packages/reviewboard/scmtools/
> hg.py", line 21, in __init__
>self.client = HgClient(repository.path)
>  File "/usr/local/lib/python2.6/dist-packages/reviewboard/scmtools/
> hg.py", line 142, in __init__
>self.repo = hg.repository(hg_ui, path=repoPath)
>  File "/usr/lib/pymodules/python2.6/mercurial/hg.py", line 63, in
> repository
>repo = _lookup(path).instance(ui, path, create)
>  File "/usr/lib/pymodules/python2.6/mercurial/sshrepo.py", line 51,
> in __init__
>self.validate_repo(ui, sshcmd, args, remotecmd)
>  File "/usr/lib/pymodules/python2.6/mercurial/sshrepo.py", line 82,
> in validate_repo
>self.abort(error.RepoError(_("no suitable response from remote
> hg")))
>  File "/usr/lib/pymodules/python2.6/mercurial/sshrepo.py", line 100,
> in abort
>raise exception
> RepoError: no suitable response from remote hg
> ERROR:root:Exception thrown for user stugots at
> http://184.10