Hi,
I've changed our Bitbucket Server to https some weeks ago.
Now I noticed that my Backups are not running. This is in first place due to a new commit on the git Repo. So I pulled the new changes into my bitbucket diy backup Repo on the server.
Now the next Problem is that curl doesn't know the certificate and stops working. So I changed the CURL_OPTIONS in "bitbucket.diy-backup.vars.sh" and added a "-k" to ignore the verification of the Certificate.
The Verification is off now but I can't get a lock from the bitbucket server.
I try this first on my VM. I get the same error when I request the https address. This call here uses a redirection...
My output:
user@tuxtestvm:/home/atlassian/backups/bitbucket-backup$ curl -v -L -s -f -k -u StashBackupUser:****** http://tuxtestvm:7990/mvc/maintenance/lock
* Trying 192.168.69.38...
* Connected to tuxtestvm (192.168.69.38) port 7990 (#0)
* Server auth using Basic with user 'StashBackupUser'
> GET /mvc/maintenance/lock HTTP/1.1
> Host: tuxtestvm:7990
> Authorization: Basic U3Rhc2hCYWNrdXBVc2VyOmF0bGFzc2lhbjRqaXJh
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 302
< Cache-Control: private
< Expires: Thu, 01 Jan 1970 01:00:00 CET
< Location: https://tuxtestvm:7991/mvc/maintenance/lock
< Content-Length: 0
< Date: Mon, 26 Feb 2018 10:06:56 GMT
<
* Connection #0 to host tuxtestvm left intact
* Issue another request to this URL: 'https://tuxtestvm:7991/mvc/maintenance/lock'
* Found bundle for host tuxtestvm: 0x561009f550c0 [can pipeline]
* Trying 192.168.69.38...
* Connected to tuxtestvm (192.168.69.38) port 7991 (#1)
* found 151 certificates in /etc/ssl/certs/ca-certificates.crt
* found 608 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
* server certificate verification SKIPPED
* server certificate status verification SKIPPED
* common name: tuxtestvm (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #1
* subject: C=DE,ST=B,L=STATE,O=COMP GmbH,OU=COMP SEC,CN=tuxtestvm
* start date: Tue, 23 Jan 2018 13:55:18 GMT
* expire date: Wed, 23 Jan 2019 13:55:18 GMT
* issuer: C=DE,O=jenkinsvm,CN=Root CA
* compression: NULL
* ALPN, server did not agree to a protocol
* Server auth using Basic with user 'StashBackupUser'
> GET /mvc/maintenance/lock HTTP/1.1
> Host: tuxtestvm:7991
> Authorization: Basic U3Rhc2hCYWNrdXBVc2VyOmF0bGFzc2lhbjRqaXJh
> User-Agent: curl/7.47.0
> Accept: */*
>
* The requested URL returned error: 503
* Closing connection 1
Can anyone help me with that please?
Thanks & kind regards
Andreas
Hi Andreas,
I'd fire off another request for https://tuxtestvm:7991/mvc/maintenance/lock and then immediately check the logs in <BitbucketHome>/log to see which (if any) error occurs.
Cheers,
Christian
Premier Support Engineer
Atlassian
Hi Christian,
thanks for your help.
I've printed the log file of bitbucket after I did this Request:
c.a.p.n.c.m.c.c.RestCapabilitiesClient Failed to request capabilities from 'http://tuxtestvm:8081/rest/capabilities': Connect to tuxtestvm:8081 [tuxtestvm/192.168.69.38] failed: Connection refused (Connection refused)
This Portnumber 8081 refers to my Jira Instance on this Virtual Machine. But I haven't started Jira yet. But this may be the problem.
I tried this on our Productive Instance and I also just changed the Portnumber & Protocol in the "bitbucket.diy-backup.vars.sh". Also I needed to change the CURL Options with "-k" in the same file. On this productiv server I did't had a Problem with that since Jira was running anyway. So this worked now.
So for me this Issue is done.
Thanks.
Kind regards
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.