Error creating repository

Hi there,


I have recently downloaded and installed the community edition of rhodecode and explored its web UI. When I tried to create a repository, I am getting an error "Error creating repository ".

Now I unable to create a repository. Could you please help me to troubleshoot this? what/how should I configure rhodecode so that I can create repos successfully?


Please check the rhodecode logs shown after running rccontrol status command.
This should show why creating a repository failed

1 Like

Here is the error that I am getting … I was trying to create an svn repository at the path /opt/rhodecode.

HttpVCSCommunicationError: '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "">\n<html><head>\n<meta http-equiv="Content-Type" CONTENT="text/html; charset=utf-8">\n<title>ERROR: The requested URL could not be retrieved</title>\n<style type="text/css"><!-- \n /*\n Stylesheet for Squid Error pages\n Adapted from design by Free CSS Templates\n\n Released for free under a Creative Commons Attribution 2.5 License\n*/\n\n/* Page basics */\n* {\n\tfont-family: verdana, sans-serif;\n}\n\nhtml body {\n\tmargin: 0;\n\tpadding: 0;\n\tbackground: #efefef;\n\tfont-size: 12px;\n\tcolor: #1e1e1e;\n}\n\n/* Page displayed title area */\n#titles {\n\tmargin-left: 15px;\n\tpadding: 10px;\n\tpadding-left: 100px;\n\tbackground: url(\'\') no-repeat left;\n}\n\n/* initial title */\n#titles h1 {\n\tcolor: #000000;\n}\n#titles h2 {\n\tcolor: #000000;\n}\n\n/* special event: FTP success page titles */\n#titles ftpsuccess {\n\tbackground-color:#00ff00;\n\twidth:100%;\n}\n\n/* Page displayed body content area */\n#content {\n\tpadding: 10px;\n\tbackground: #ffffff;\n}\n\n/* General text */\np {\n}\n\n/* error brief description */\n#error p {\n}\n\n/* some data which may have caused the problem */\n#data {\n}\n\n/* the error message received from the system or other software */\n#sysmsg {\n}\n\npre {\n    font-family:sans-serif;\n}\n\n/* special event: FTP / Gopher directory listing */\n#dirmsg {\n    font-family: courier;\n    color: black;\n    font-size: 10pt;\n}\n#dirlisting {\n    margin-left: 2%;\n    margin-right: 2%;\n}\n#dirlisting tr.entry td.icon,td.filename,td.size, {\n    border-bottom: groove;\n}\n#dirlisting td.size {\n    width: 50px;\n    text-align: right;\n    padding-right: 5px;\n}\n\n/* horizontal lines */\nhr {\n\tmargin: 0;\n}\n\n/* page displayed footer area */\n#footer {\n\tfont-size: 9px;\n\tpadding-left: 10px;\n}\n\n\nbody\n:lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }\n:lang(he) { direction: rtl; }\n --></style>\n</head><body id=ERR_CONNECT_FAIL>\n<div id="titles">\n<h1>ERROR</h1>\n<h2>The requested URL could not be retrieved</h2>\n</div>\n<hr>\n\n<div id="content">\n<p>The following error was encountered while trying to retrieve the URL: <a href=""></a></p>\n\n<blockquote id="error">\n<p><b>Connection to failed.</b></p>\n</blockquote>\n\n<p id="sysmsg">The system returned: <i>(111) Connection refused</i></p>\n\n<p>The remote host or network may be down. Please try the request again.</p>\n\n<p>Your cache administrator is <a href="mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_CONNECT_FAIL&amp;body=CacheHost%3A%20proxy1%0D%0AErrPage%3A%20ERR_CONNECT_FAIL%0D%0AErr%3A%20(111)%20Connection%20refused%0D%0ATimeStamp%3A%20Wed,%2030%20May%202018%2005%3A04%3A20%20GMT%0D%0A%0D%0AClientIP%3A%20172.24.188.116%0D%0AServerIP%3A%20127.0.0.1%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Fgit%20HTTP%2F1.1%0AHost%3A%20127.0.0.1%3A10010%0D%0AUser-Agent%3A%20PycURL%2F7.19.5%20libcurl%2F7.50.3%20OpenSSL%2F1.0.2h%20zlib%2F1.2.8%20libssh2%2F1.7.0%20nghttp2%2F1.7.1%0D%0AAccept%3A%20*%2F*%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0AContent-Length%3A%20181%0D%0AContent-Type%3A%20application%2Fx-www-form-urlencoded%0D%0A%0D%0A%0D%0A">webmaster</a>.</p>\n\n<br>\n</div>\n\n<hr>\n<div id="footer">\n<p>Generated Wed, 30 May 2018 05:04:20 GMT by proxy1 (squid/3.3.8)</p>\n<!-- ERR_CONNECT_FAIL -->\n</div>\n</body></html>\n'

2018-05-30 10:34:20.700 [3565] INFO  [rhodecode.model.repo] Removing repository /home/aspire/RhodeCode/Apple
2018-05-30 10:34:20.702 [3565] ERROR [rhodecode.lib.vcs.backends] Perhaps this repository is in db and not in filesystem run rescan repositories with "destroy old data" option from admin panel

This looks like a problem with connection to vcsserver.

  • make sure it’s actually running
  • make also sure that no proxy/firewall is blocking it.
    i see a squid proxy errors in there, so might be some port conflict ?

I checked it using the command rccontrol status and got the following result.

 - NAME: community-1
 - VERSION: 4.12.2 Community
 - VCS: vcsserver-1
 - URL:
 - CONFIG: /home/aspire/.rccontrol/community-1/rhodecode.ini

 - NAME: vcsserver-1
 - VERSION: 4.12.2 VCSServer
 - URL:
 - CONFIG: /home/aspire/.rccontrol/vcsserver-1/vcsserver.ini

the status says the vcsserver is running. I have choosen the default ports that are suggested by rhodecode while installing it. I have no idea on ports , what to use and what not to use. I welcome your comments!

Can you try doing on local machine where rhodecode is running:


What does it return ?

Here it is,

<div id="titles">
<h2>The requested URL could not be retrieved</h2>

<div id="content">
<p>The following error was encountered while trying to retrieve the URL: <a  href=""></a></p>

<blockquote id="error">
<p><b>Connection to failed.</b></p>

<p id="sysmsg">The system returned: <i>(111) Connection refused</i></p>

<p>The remote host or network may be down. Please try the request again.</p>

I think you are correct, what I did is, for both vcsserver and rhodecode community installations, I used the same ip but the port numbers I used are 10010 and 10020.

For me it looks like the ports are OK, however on something is intercepting connections, may it be a proxy ? (squid) ?

This prevents rhodecode to connect to vcsserver

when I run on browser, I am seeing a screen with three tabs, JSON, Raw Data, Headers and the staus under JSON tab is “OK”.

SO it must be something else than vcsserver. It returns 404 by default if you enter it with a browser…

You can maybe change the port inside vcsserver.ini to 10080 ? and check again ? You also need to change it in rhodecode.ini under vcs.server= parameter

I have changed those parameters in both the ini files. When I tried
I still find the same errors. Okay, let me ask my question otherwise. In order to run both the vcsserver and rhodecode on the same machine how should we choose the ip and ports?

Basically RhodeCode tires to detect any two free ports starting from 10010 and above. I think in your case there’s a proxy that intercepts those connections i’d check this. Maybe it some sort of security precaution on your side.

@rhodecode-support, Yeah, we have a proxy and may be that is blocking. In that case what should i change or do, so that the rhodecode can work?

as part of curl I get the following encoded message

<p>Your cache administrator is <a    href="mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_CONNECT_FAIL&amp;body=CacheHost%3A%20proxy1%0D%0AErrPage%3A%20ERR_CONNECT_FAIL%0D%0AErr%3A%20(111)%20Connection%20refused%0D%0ATimeStamp%3A%20Thu,%2031%20May%202018%2011%3A36%3A03%20GMT%0D%0A%0D%0AClientIP%3A%20172.24.188.116%0D%0AServerIP%3A%20127.0.0.1%0D%0A%0D%0AHTTP%20Request%3A%0D%0AGET%20%2F%20HTTP%2F1.1%0AHost%3A%20127.0.0.1%3A10030%0D%0AUser-Agent%3A%20curl%2F7.35.0%0D%0AAccept%3A%20*%2F*%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0A%0D%0A%0D%0A">webmaster</a>.</p>

I’m sorry but this i don’t know. You’d need to check your proxy squid configuration. It’s something we really cannot fix on rhodecode side.

Again, I did rccontrol self-destroy, installed from scratch changed the repo path. But I am still getting the same error. But when I read the lines logged in the file community.log line by line I found that rhodecode is trying to create a git repo but what I was trying to create is a svn repo basically.

2018-06-04 11:38:14.370 [13049] INFO  [rhodecode.lib.auth] user <AuthUser('id:2[admin] ip: auth:True')> authenticating with:RHODECODE_AUTH IS authenticated on func AdminReposView:repository_create
2018-06-04 11:38:14.506 [13049] ERROR [rhodecode.lib.vcs.client_http] Call to ** returned non 200 HTTP code: 503**
2018-06-04 11:38:14.506 [13049] WARNI [rhodecode.task.create_repo] Exception occurred when creating repository, doing cleanup...
Traceback (most recent call last):
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/lib/celerylib/", line 143, in create_repo
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/model/", line 832, in _create_filesystem_repo
    if is_valid_repo_group(repo_path, self.repos_path):
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/lib/", line 303, in is_valid_repo_group
    scm_ = get_scm(os.path.dirname(full_path))
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/lib/vcs/utils/", line 51, in get_scm
    found_scms = [(scm, path) for scm in get_scms_for_path(path)]
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/lib/vcs/utils/", line 91, in get_scms_for_path
    if backend.is_valid_repository(path):
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/git/", line 139, in is_valid_repository
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/git/", line 69, in __init__
    self._init_repo(create, src_url, update_after_clone, bare)
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/git/", line 164, in _init_repo
    if not self._remote.assert_correct_path():
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/lib/vcs/", line 125, in f
    return self._call(name, *args, **kwargs)
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/lib/vcs/", line 144, in _call_with_logging
    return RemoteRepo._call(self, name, *args, **kwargs)
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/lib/vcs/", line 181, in wrapper
    return func(*args, **kwargs)
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/lib/vcs/", line 139, in _call
    return _remote_call(self.url, payload, EXCEPTIONS_MAP, self._session)
  File "/opt/rhodecode/store/bbjmr1bwgmqsdkajzkmm5hk16al1b3ag-python2.7-rhodecode-enterprise-ce-4.12.2/lib/python2.7/site-packages/rhodecode/lib/vcs/", line 211, in _remote_call
    raise exceptions.HttpVCSCommunicationError(repr(response.content))

After clicking “Add Repository” I chose the type as “svn” but rhodecode is trying to create a git repo I guess and that ends up in an error. Why may it be though?


The fact that it calls /git url is part of discovery logic, rhodecode first checks if the path you’re trying to create isn’t a git/hg/svn repo. This is why the call to /git is taking place.

The problem seems to be at higher level that something in your env is intercepting connections. Maybe you have some global ENV variable like HTTP_PROXY or similar set ? RhodeCode makes use of those…

1 Like

Of course you are, we use a proxy here in office and I am getting this error. When I installed rhodecode on my laptop (at home) it worked well no problems. In my office case, how can I solve the problem? my aim is to make it working but I have no idea of what to configure and where exactly I should!!!

could you try this:

vim ~/.rccontrol/supervisor/supervisord.ini
# edit lines that starts with environment = PYTHONPATH=""
environment = HTTP_PROXY="", PYTHONPATH=""

Please check if that helps, you have to run rccontrol self-stop --force && rccontrol self-init && rccontrol start "*" after that

I did that, now no error message is logged into the community.log file. But the repository is not created I am still getting the error message in Red banner in repo creation page. When I did curl on the vcsserver link it still returns “The system returned: (111) Connection refused” Error.

can you check also this:

rccontrol ishell community-1

Inside the shell do this:

import os
print os.environ