4503: Unable to add subversion repository (SVN+SSH and custom port)

sknyazhentsev

What version are you running?

2.5.7

What's the URL of the page containing the problem?

r/new/

What steps will reproduce the problem?

  1. Add subversion repository through admin interface. Specifically one with svn+ssh, username, and custom port - svn+ssh://<username>@<domain>:<custom port>/path/to/repo
  2. Repository is added successfully.
  3. Go to new review request page. Error appears: Unable to connect to a repository at URL 'svn+ssh://<username>@<domain>:<custom port>/path/to/repo'
    To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
    Network connection closed unexpectedly

What is the expected output? What do you see instead?

I would like to add new review request

What operating system are you using? What browser?

Ibelieve this is not browser issue

Please provide any additional information below.

Trying to debug this I attempted many things:
- specifying username in username field - same result, repo is added successfully, but it is impossible to add new review request
- tried adding repo URL to mirror URL - didn't help
- specified port in <app dir>/data/.subversion/config - I was still unable to add repo in administration area without specifying port anyway
- adding settings to .ssh/config - same result
- enabled debug settings in reviewboard.wsgi
os.environ['DEBUG_RBSSH'] = "1"
os.environ['RBSSH_LOG_DIR'] = "/tmp"

then monitored logs
01-03 18:09 root DEBUG ['/usr/local/bin/rbssh', '<username>@<domain>:<custom port>', 'svnserve', '-t']
01-03 18:09 root DEBUG PID 29036
01-03 18:09 root DEBUG !!! <domain>:<custom port>, <username>, ['svnserve', '-t']
01-03 18:09 root ERROR Unknown exception during connect: [Errno -2] Name or service not known (<class 'socket.gaierror'>)

can't understand much by this. Same errors appear if I run rbssh from command line
PYTHONPATH=/var/www/html/reviewboard/conf DEBUG_RBSSH=1 DJANGO_SETTINGS_MODULE=reviewboard.settings rbssh svn+ssh://<username>@<domain>:<custom port>/path/to/repo
Unknown exception during connect: [Errno -2] Name or service not known (<class 'socket.gaierror'>)

I'm out of options. What should I do to be able to add this repo to reviewboard and be able to add review requests?

#1 sknyazhentsev

I forgot to mention that from the very beginning I added private key via web interface and only after that I was able to add the repo

#2 sknyazhentsev

Logs info
2017-01-03 17:54:57,127 - DEBUG - - SVNTool: Attempting ssh connection with host: <domain>:<custom port>, username: <username>
2017-01-03 17:54:57,230 - DEBUG - - starting thread (client mode): 0xa677a4d0L
2017-01-03 17:54:57,230 - DEBUG - - Local version/idstring: SSH-2.0-paramiko_2.1.1
2017-01-03 17:54:57,269 - DEBUG - - Remote version/idstring: SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
2017-01-03 17:54:57,269 - INFO - - Connected (version 2.0, client OpenSSH_6.6.1p1)
2017-01-03 17:54:57,301 - DEBUG - - kex algos:[u'curve25519-sha256@libssh.org', u'ecdh-sha2-nistp256', u'ecdh-sha2-nistp384', u'ecdh-sha2-nistp521', u'diffie-hellman-group-exchange-sha256', u'diffie-hellman-group-exchange-sha1', u'diffie-hellman-group14-sha1', u'diffie-hellman-group1-sha1'] server key:[u'ssh-rsa', u'ssh-dss'] client encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'arcfour256', u'arcfour128', u'aes128-gcm@openssh.com', u'aes256-gcm@openssh.com', u'chacha20-poly1305@openssh.com', u'aes128-cbc', u'3des-cbc', u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour', u'rijndael-cbc@lysator.liu.se'] server encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'arcfour256', u'arcfour128', u'aes128-gcm@openssh.com', u'aes256-gcm@openssh.com', u'chacha20-poly1305@openssh.com', u'aes128-cbc', u'3des-cbc', u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour', u'rijndael-cbc@lysator.liu.se'] client mac:[u'hmac-md5-etm@openssh.com', u'hmac-sha1-etm@openssh.com', u'umac-64-etm@openssh.com', u'umac-128-etm@openssh.com', u'hmac-sha2-256-etm@openssh.com', u'hmac-sha2-512-etm@openssh.com', u'hmac-ripemd160-etm@openssh.com', u'hmac-sha1-96-etm@openssh.com', u'hmac-md5-96-etm@openssh.com', u'hmac-md5', u'hmac-sha1', u'umac-64@openssh.com', u'umac-128@openssh.com', u'hmac-sha2-256', u'hmac-sha2-512', u'hmac-ripemd160', u'hmac-ripemd160@openssh.com', u'hmac-sha1-96', u'hmac-md5-96'] server mac:[u'hmac-md5-etm@openssh.com', u'hmac-sha1-etm@openssh.com', u'umac-64-etm@openssh.com', u'umac-128-etm@openssh.com', u'hmac-sha2-256-etm@openssh.com', u'hmac-sha2-512-etm@openssh.com', u'hmac-ripemd160-etm@openssh.com', u'hmac-sha1-96-etm@openssh.com', u'hmac-md5-96-etm@openssh.com', u'hmac-md5', u'hmac-sha1', u'umac-64@openssh.com', u'umac-128@openssh.com', u'hmac-sha2-256', u'hmac-sha2-512', u'hmac-ripemd160', u'hmac-ripemd160@openssh.com', u'hmac-sha1-96', u'hmac-md5-96'] client compress:[u'none', u'zlib@openssh.com'] server compress:[u'none', u'zlib@openssh.com'] client lang:[u''] server lang:[u''] kex follows?False
2017-01-03 17:54:57,301 - DEBUG - - Kex agreed: diffie-hellman-group1-sha1
2017-01-03 17:54:57,301 - DEBUG - - Cipher agreed: aes128-ctr
2017-01-03 17:54:57,301 - DEBUG - - MAC agreed: hmac-sha2-256
2017-01-03 17:54:57,301 - DEBUG - - Compression agreed: none
2017-01-03 17:54:57,382 - DEBUG - - kex engine KexGroup1 specified hash_algo <built-in function openssl_sha1>
2017-01-03 17:54:57,382 - DEBUG - - Switch to new keys ...
2017-01-03 17:54:57,394 - DEBUG - - Trying SSH key b60e55b040c77f74b3595249b7c645d9
2017-01-03 17:54:57,485 - DEBUG - - userauth is OK
2017-01-03 17:54:57,525 - INFO - - Authentication (publickey) successful!
2017-01-03 17:54:57,625 - DEBUG - - EOF in transport thread
2017-01-03 18:06:34,216 - INFO - - Reloading logging settings
2017-01-03 18:08:49,158 - INFO - - Using reviewboard.scmtools.svn.pysvn backend for SVN