Moving SCM to a new server

707 views
Skip to first unread message

.Mark

unread,
Nov 11, 2011, 9:53:57 PM11/11/11
to scmmanager
I have created a new ubuntu server and installed jetty and SCM-Manager
1.8. I have copied the repositories and the repositories.xml to the
new server. I can't push changes to the server. I get the following
error

'https://..url to repo...............' does not appear to be an hg
repository:
---%<--- (no content-type)

---%<---

I can Pull from the repository. I can check push changes against the
repository. I can even push to it if there are no changes detected.
When there are changes I get the above error.

What else do I need to do to move scm cached repositories to a new SCM
server?

.Mark

unread,
Nov 11, 2011, 10:07:56 PM11/11/11
to scmmanager
I have just found out the hg version on the old server is 1.7.5. The
new server has hg version 1.9.1. I may have to post the question to
the hg forum. I can't validate/test the hg repository on the server
as I am getting a Not trusting file .hg/hgrc from untrusted user
jetty, group jetty. This error is actually in both servers but it
does not seem to impact the old server from working.

On Nov 11, 8:53 pm, ".Mark" <ward.m...@gmail.com> wrote:
> I have created a new ubuntu server and installed jetty and SCM-Manager
> 1.8.  I have copied the repositories and the repositories.xml to the
> new server.  I can't push changes to the server.  I get the following
> error
>
> 'https://..urlto repo...............' does not appear to be an hg

.Mark

unread,
Nov 11, 2011, 10:15:41 PM11/11/11
to scmmanager
I have tried deleting and creating a new repository on the new server
with the same name. When I tried to push the repository into the
server it detected the 65+ changes and during the searching for
changes I got the error again. Does not appear to be an hg
repository.

But, I can click on all of the hg links to view the repository's
source and the hg page works.

On Nov 11, 9:07 pm, ".Mark" <ward.m...@gmail.com> wrote:
> I have just found out the hg version on the old server is 1.7.5.  The
> new server has hg version 1.9.1.  I may have to post the question to
> the hg forum.  I can't validate/test the hg repository on the server
> as I am getting a Not trusting file .hg/hgrc from untrusted user
> jetty, group jetty.  This error is actually in both servers but it
> does not seem to impact the old server from working.
>
> On Nov 11, 8:53 pm, ".Mark" <ward.m...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I have created a new ubuntu server and installed jetty and SCM-Manager
> > 1.8.  I have copied the repositories and the repositories.xml to the
> > new server.  I can't push changes to the server.  I get the following
> > error
>
> > 'https://..urltorepo...............' does not appear to be an hg

Sebastian Sdorra

unread,
Nov 12, 2011, 3:27:22 AM11/12/11
to scmma...@googlegroups.com
Hi,
Have you checked the permissions of your repositories? Have a look at section 8.2 of http://mercurial.selenic.com/wiki/PublishingRepositories. Could you set the logging of scm-manager to trace level and post the output of a push?

To set the log level to trace edit the WEB-INF/classes/logback.xml.

Search the following line:
<logger name="sonia.scm" level="INFO" />

and replace it with:
<logger name="sonia.scm" level="TRACE" />

Sebastian


On Saturday, November 12, 2011 at 04:15, .Mark wrote:

> I have tried deleting and creating a new repository on the new server
> with the same name. When I tried to push the repository into the
> server it detected the 65+ changes and during the searching for
> changes I got the error again. Does not appear to be an hg
> repository.
>
> But, I can click on all of the hg links to view the repository's
> source and the hg page works.
>

Mark Ward

unread,
Nov 12, 2011, 11:00:33 AM11/12/11
to scmma...@googlegroups.com
With the Jetty setup that I have on Ubuntu it does not extract the war file in the webapps folder.  It opens the war file into /var/cache/jetty/ I have tried editing the file there but it seems to overwrite the file each time I start jetty.  Although I am not sure if editing the file after jetty has started will work.

Just wondering if I am doing things correctly or if there is somewhere else I should be finding the logback.xml.

Sebastian Sdorra

unread,
Nov 12, 2011, 11:11:12 AM11/12/11
to scmma...@googlegroups.com
You could copy the logback.xml from the /var/cache/jetty folder to an other location, change the log level to trace and start your jetty-server with the java property logback.configurationFile (-Dlogback.configurationFile=/path/to/logback.xml). Note that this setting affects all webapplications that uses logback. For more informations have a look at http://logback.qos.ch/manual/configuration.html#configFileProperty.

Sebastian


On Saturday, November 12, 2011 at 17:00, Mark Ward wrote:

> With the Jetty setup that I have on Ubuntu it does not extract the war file in the webapps folder. It opens the war file into /var/cache/jetty/ I have tried editing the file there but it seems to overwrite the file each time I start jetty. Although I am not sure if editing the file after jetty has started will work.
>
> Just wondering if I am doing things correctly or if there is somewhere else I should be finding the logback.xml.
>

.Mark

unread,
Nov 12, 2011, 11:18:32 AM11/12/11
to scmmanager
I have some log errors. The action was a push to a repository. It
was the first thing I did after starting the server. If this has to
with my self signed certificate just let me know. I copied the
keystore from the old server to this server. the web browsers are not
having problems with the certificate. The new server has the same
host name as the old. Although I need to verify the case of the host
name.

10:03:44.035 [198249052@qtp-1189367926-5] INFO
sonia.scm.auth.ldap.LDAPAuthenticationHandler - user has no group
attributes assigned
10:03:44.039 [198249052@qtp-1189367926-5] INFO
sonia.scm.user.xml.XmlUserManager - modify user mark.ward of type ldap
10:03:44.316 [1948703724@qtp-1189367926-3] INFO
sonia.scm.user.xml.XmlUserManager - modify user mark.ward of type ldap
547124 [1084010740@qtp-1189367926-1] WARN org.mortbay.log - EXCEPTION
javax.net.ssl.SSLException: java.security.ProviderException:
sun.security.pkcs11.wrapper.PKCS11Exception: CKR_DOMAIN_PARAMS_INVALID
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:
1665)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:
1628)
at
sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:
1611)
at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1192)
at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1169)
at org.mortbay.jetty.security.SslSocketConnector
$SslConnection.run(SslSocketConnector.java:675)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.security.ProviderException:
sun.security.pkcs11.wrapper.PKCS11Exception: CKR_DOMAIN_PARAMS_INVALID
at
sun.security.pkcs11.P11KeyPairGenerator.generateKeyPair(P11KeyPairGenerator.java:
323)
at java.security.KeyPairGenerator
$Delegate.generateKeyPair(KeyPairGenerator.java:673)
at sun.security.ssl.ECDHCrypt.<init>(ECDHCrypt.java:63)
at
sun.security.ssl.ServerHandshaker.setupEphemeralECDHKeys(ServerHandshaker.java:
991)
at
sun.security.ssl.ServerHandshaker.trySetCipherSuite(ServerHandshaker.java:
872)
at
sun.security.ssl.ServerHandshaker.chooseCipherSuite(ServerHandshaker.java:
801)
at
sun.security.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:
576)
at
sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:
170)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:
609)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:
545)
at
sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:913)
at
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:
1158)
at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1185)
... 3 more
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception:
CKR_DOMAIN_PARAMS_INVALID
at sun.security.pkcs11.wrapper.PKCS11.C_GenerateKeyPair(Native
Method)
at
sun.security.pkcs11.P11KeyPairGenerator.generateKeyPair(P11KeyPairGenerator.java:
314)
... 15 more
10:03:44.679 [Thread-29] WARN sonia.scm.web.cgi.DefaultCGIExecutor -
Traceback (most recent call last):
File "/usr/share/jetty/.scm/cgi-bin/hgweb.py", line 47, in <module>
wsgicgi.launch(application)
File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/wsgicgi.py",
line 76, in launch
content = application(environ, start_response)
File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/
hgweb_mod.py", line 91, in __call__
...........
............
return protocol.call(self.repo, req, cmd)
File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/protocol.py",
line 75, in call
rsp = wireproto.dispatch(repo, p, cmd)
File "/usr/lib/python2.7/dist-packages/mercurial/wireproto.py", line
340, in dispatch
return func(repo, proto, *args)
File "/usr/lib/python2.7/dist-packages/mercurial/wireproto.py", line
573, in unbundle
lock=lock)
File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line
1833, in addchangegroup
url=url, pending=p)
File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line
224, in hook
return hook.hook(self.ui, self, name, throw, **args)
File "/usr/lib/python2.7/dist-packages/mercurial/hook.py", line 164,
in hook
r = _pythonhook(ui, repo, name, hname, hookfn, args, throw) or r
File "/usr/lib/python2.7/dist-packages/mercurial/hook.py", line 75,
in _pythonhook
r = obj(ui=ui, repo=repo, hooktype=name, **args)
File "/usr/share/jetty/.scm/cgi-bin/scmhooks.py", line 54, in
callback
conn = urllib.urlopen(url, data);
File "/usr/lib/python2.7/urllib.py", line 86, in urlopen
return opener.open(url, data)
File "/usr/lib/python2.7/urllib.py", line 207, in open
return getattr(self, name)(url, data)
File "/usr/lib/python2.7/urllib.py", line 435, in open_https
h.endheaders(data)
File "/usr/lib/python2.7/httplib.py", line 951, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 811, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 773, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 1158, in connect
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
File "/usr/lib/python2.7/ssl.py", line 372, in wrap_socket
ciphers=ciphers)
File "/usr/lib/python2.7/ssl.py", line 134, in __init__
self.do_handshake()
File "/usr/lib/python2.7/ssl.py", line 296, in do_handshake
self._sslobj.do_handshake()
IOError: [Errno socket error] [Errno 1] _ssl.c:503: error:14077438:SSL
routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
10:03:44.680 [135370635@qtp-1189367926-2] WARN
sonia.scm.web.cgi.DefaultCGIExecutor - process ends with exit code 1


On Nov 12, 10:11 am, Sebastian Sdorra <s.sdo...@gmail.com> wrote:
> You could copy the logback.xml from the /var/cache/jetty folder to an other location, change the log level to trace and start your jetty-server with the java property logback.configurationFile (-Dlogback.configurationFile=/path/to/logback.xml). Note that this setting affects all webapplications that uses logback. For more informations have a look athttp://logback.qos.ch/manual/configuration.html#configFileProperty.
>
> Sebastian
>
>
>
>
>
>
>
> On Saturday, November 12, 2011 at 17:00, Mark Ward wrote:
> > With the Jetty setup that I have on Ubuntu it does not extract the war file in the webapps folder. It opens the war file into /var/cache/jetty/ I have tried editing the file there but it seems to overwrite the file each time I start jetty. Although I am not sure if editing the file after jetty has started will work.
>
> > Just wondering if I am doing things correctly or if there is somewhere else I should be finding the logback.xml.
>
> > On Sat, Nov 12, 2011 at 2:27 AM, Sebastian Sdorra <s.sdo...@gmail.com (mailto:s.sdo...@gmail.com)> wrote:
> > > Hi,
> > > Have you checked the permissions of your repositories? Have a look at section 8.2 ofhttp://mercurial.selenic.com/wiki/PublishingRepositories. Could you set the logging of scm-manager to trace level and post the output of a push?

Sebastian Sdorra

unread,
Nov 12, 2011, 11:26:02 AM11/12/11
to scmma...@googlegroups.com
Could you check .scm/cgi-bin/scmhooks.py for baseurl variable? is this
variable correct? Could you test a push with disabled hooks (just
uncomment the hooks in the hgrc of the repository)? Maybe this issue
is related to https://bitbucket.org/sdorra/scm-manager/issue/71/scmhookspy-refers-to-wrong-baseurl-commit
which is not fixed in this version.

2011/11/12 .Mark <ward...@gmail.com>:

.Mark

unread,
Nov 12, 2011, 11:40:51 AM11/12/11
to scmmanager
I commented out the hoods in the hgrc and it worked.

I am not sure exactly what I should check in the URL in the
scmhooks.py. when I checked the variable it matches the ssl port 8443
and i have renamed the war to be scm-webapp to access the app.

On Nov 12, 10:26 am, Sebastian Sdorra <s.sdo...@gmail.com> wrote:
> Could you check .scm/cgi-bin/scmhooks.py for baseurl variable? is this
> variable correct? Could you test a push with disabled hooks (just
> uncomment the hooks in the hgrc of the repository)? Maybe this issue
> is related tohttps://bitbucket.org/sdorra/scm-manager/issue/71/scmhookspy-refers-t...
> which is not fixed in this version.
>
> 2011/11/12 .Mark <ward.m...@gmail.com>:
> >> > > > > > 'https://..urltorepo...............'doesnot appear to be an hg
> >> > > > > > repository:
> >> > > > > > ---%<--- (no content-type)
>
> >> > > > > > ---%<---
>
> >> > > > > > I can Pull from the repository. I can check push changes
>
> ...
>
> read more »

.Mark

unread,
Nov 12, 2011, 11:59:44 AM11/12/11
to scmmanager
The baseUrl in the scmhooks.py is set to "https://localhost:8443/scm-
webapp/hook/hg/"

I access SCM via "https://hgserver:8443/scm-webapp/"

In the general settings I have the Base URL set to "https://hgserver:
8443/scm-webapp"
> ...
>
> read more »

.Mark

unread,
Nov 12, 2011, 12:02:37 PM11/12/11
to scmmanager
I also want to add that I am not using a proxy or apache in the
setup. It is just SCM and Jetty.
> ...
>
> read more »

.Mark

unread,
Nov 12, 2011, 2:26:26 PM11/12/11
to scmmanager
I have my repositories to save in /data/scm/repositories/ instead of
the default jetty/.scm/repositories/  Would this cause any problems
related to the issue I am having?  I am thinking about installing
ubuntu 10.4 LTS and see if things run smoother for me.
> ...
>
> read more »

.Mark

unread,
Nov 13, 2011, 12:15:16 AM11/13/11
to scmmanager
To follow up. I have Ubuntu Server 10.4 and things are currently
working. I did have to manually create the .scm directory and change
the owner to jetty before scm-webapp would start in jetty.

Instead of moving my repositories between the servers I am going to
create the repository and then push them into the new server.
> ...
>
> read more »

Sebastian Sdorra

unread,
Nov 14, 2011, 4:43:58 AM11/14/11
to scmma...@googlegroups.com
Does it now work with https and changed repository path?

2011/11/13 .Mark <ward...@gmail.com>:

.Mark

unread,
Nov 14, 2011, 9:03:43 AM11/14/11
to scmmanager
The SCM-Manager is working with push over https with the repositories
in a /data/scm/repositories location on the Ubuntu 10.04 server. One
thing I did differently is I am creating each repository in the SCM
manager and will push the old server's repositories into it.

On Nov 14, 3:43 am, Sebastian Sdorra <s.sdo...@gmail.com> wrote:
> Does it now work with https and changed repository path?
>
> 2011/11/13 .Mark <ward.m...@gmail.com>:
> ...
>
> read more »

Sebastian Sdorra

unread,
Nov 18, 2011, 4:35:44 AM11/18/11
to scmma...@googlegroups.com
Hi,
Had you "Force Base Url" enabled on your old system? I found a bug
with "Force Base Url" and mercurial repositories in this version. Had
you time to test the group functionality?

Sebastian

2011/11/14 .Mark <ward...@gmail.com>:

Mark Ward

unread,
Nov 18, 2011, 3:15:22 PM11/18/11
to scmma...@googlegroups.com
I did not test with force base Url disabled.
Reply all
Reply to author
Forward
0 new messages