Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Bitbucket server on VPS - Can't connect to 7990 in order to finish configuration

Valentin Chareyre July 11, 2018

Dear Bitbucket community,

I am currently struggling with Bitbucket installation on my VPS.

I have followed the steps indicated in the guide, but when I try to connect to the server, on the port 7990, my browser (on my own computer) indicates the website is inaccessible.

 

Here is all the relevant information I currently have, don't hesitate to ask for more :

 

Hosting solution

 

OVH : https://www.ovh.com

 

VPS

Debian 9 (Stretch) 64 bits

CPU : 2 virtual cores

RAM : 8 Go

ROM : 80 Go

 

Network

Ports 7990, 7992, and 7993 are free (according to netstat)

 

Before starting Bitbucket :

# netstat --listen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN
tcp        0      0 localhost:postgresql    0.0.0.0:*               LISTEN
tcp        0      0 localhost:mysql         0.0.0.0:*               LISTEN
tcp6       0      0 [::]:http               [::]:*                  LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
udp        0      0 0.0.0.0:bootpc          0.0.0.0:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     22383    /var/run/postgresql/.s.PGSQL.5432
unix  2      [ ACC ]     STREAM     LISTENING     11915    /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     644516   /var/run/mysqld/mysqld.sock
unix  2      [ ACC ]     STREAM     LISTENING     9383     /run/systemd/private
unix  2      [ ACC ]     SEQPACKET  LISTENING     9388     /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     9434     /run/systemd/fsck.progress
unix  2      [ ACC ]     STREAM     LISTENING     9443     /run/systemd/journal/stdout

After starting Bitbucket

# netstat --listen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN
tcp        0      0 localhost:postgresql    0.0.0.0:*               LISTEN
tcp        0      0 localhost:mysql         0.0.0.0:*               LISTEN
tcp6       0      0 [::]:http               [::]:*                  LISTEN
tcp6       0      0 [::]:7990               [::]:*                  LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
tcp6       0      0 localhost:7992          [::]:*                  LISTEN
tcp6       0      0 ip6-localhost:7992      [::]:*                  LISTEN
tcp6       0      0 localhost:7993          [::]:*                  LISTEN
tcp6       0      0 ip6-localhost:7993      [::]:*                  LISTEN
udp        0      0 0.0.0.0:bootpc          0.0.0.0:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     22383    /var/run/postgresql/.s.PGSQL.5432
unix  2      [ ACC ]     STREAM     LISTENING     11915    /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     644516   /var/run/mysqld/mysqld.sock
unix  2      [ ACC ]     STREAM     LISTENING     9383     /run/systemd/private
unix  2      [ ACC ]     SEQPACKET  LISTENING     9388     /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     9434     /run/systemd/fsck.progress
unix  2      [ ACC ]     STREAM     LISTENING     9443     /run/systemd/journal/stdout

Rule added to the firewall in order to allow requests on port 7990

# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:7990

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

 

Database

PostgreSQL v10.4

User and database set up :

# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+---------------+----------+-------------+-------------+-----------------------
bitbucket | bitbucketuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |

 

Git

git version 2.11.0

 

 

Directories owner (recursive)

# ls -l /opt/atlassian/
total 8
drwxr-xr-x  3 atlbitbucket root 4096 Jul  9 15:35 bitbucket
# ls -l /var/atlassian/application-data/
total 8
drwxr-xr-x 12 atlbitbucket atlbitbucket 4096 Jul 11 15:33 bitbucket

 

Logs

2018-07-11 15:33:32,525 INFO  [main]  o.s.boot.SpringApplication
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::       (v1.5.12.RELEASE)


2018-07-11 15:33:33,195 INFO  [main]  c.a.b.i.b.BitbucketServerApplication Starting BitbucketServerApplication on vps533567 with PID 25461 (/opt/atlassian/bitbucket/5.11.1/app/WEB-INF/classes started by atlbitbucket in /var/atlassian/application-data/bitbucket)
2018-07-11 15:33:33,195 INFO  [main]  c.a.b.i.b.BitbucketServerApplication No active profile set, falling back to default profiles: default
2018-07-11 15:33:36,094 INFO  [main]  c.a.b.i.boot.log.BuildInfoLogger Starting Bitbucket 5.11.1 (ca3ded2 built on Sat May 26 08:25:16 CEST 2018)
2018-07-11 15:33:36,094 INFO  [main]  c.a.b.i.boot.log.BuildInfoLogger JVM: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 1.8.0_172-b11
2018-07-11 15:33:39,076 INFO  [main]  c.a.b.i.b.BitbucketServerApplication Started BitbucketServerApplication in 9.436 seconds (JVM running for 13.445)
2018-07-11 15:33:43,204 INFO  [spring-startup]  c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /var/atlassian/application-data/bitbucket
2018-07-11 15:33:48,390 INFO  [spring-startup]  c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /var/atlassian/application-data/bitbucket/shared
2018-07-11 15:33:50,519 WARN  [spring-startup]  com.hazelcast.instance.Node [51.38.50.77]:5701 [atlbitbucket] [3.7.4-atlassian-43] No join method is enabled! Starting standalone.
2018-07-11 15:34:12,147 INFO  [spring-startup]  c.a.s.i.hook.DefaultHookService Hook callback socket listening on 127.0.0.1:34197
2018-07-11 15:34:14,206 INFO  [spring-startup]  c.a.s.i.s.g.t.DefaultTranscodeServer Callback socket listening at 127.0.0.1:44817
2018-07-11 15:34:24,956 WARN  [ThreadPoolAsyncTaskExecutor::Thread 19]  c.a.p.s.s.util.ProductFilterUtil Couldn't detect product, will use ProductFilter.ALL
2018-07-11 15:34:26,966 WARN  [ThreadPoolAsyncTaskExecutor::Thread 13]  c.a.p.s.s.util.ProductFilterUtil Couldn't detect product, will use ProductFilter.ALL
2018-07-11 15:34:27,191 WARN  [ThreadPoolAsyncTaskExecutor::Thread 33]  c.a.p.s.s.util.ProductFilterUtil Couldn't detect product, will use ProductFilter.ALL
2018-07-11 15:34:41,658 WARN  [spring-startup]  c.a.s.i.p.s.OsgiBundledPathScanner Cannot scan directory /com/atlassian/oauth/shared/servlet/ in bundle com.atlassian.oauth.atlassian-oauth-service-provider-plugin; it does not exist
2018-07-11 15:34:43,155 WARN  [spring-startup]  c.a.s.i.p.s.OsgiBundledPathScanner Cannot scan directory /com/atlassian/oauth/shared/servlet/ in bundle tac.bitbucket.languages.de_DE; it does not exist
2018-07-11 15:34:43,162 WARN  [spring-startup]  c.a.s.i.p.s.OsgiBundledPathScanner Cannot scan directory /com/atlassian/oauth/shared/servlet/ in bundle tac.bitbucket.languages.fr_FR; it does not exist
2018-07-11 15:34:43,170 WARN  [spring-startup]  c.a.s.i.p.s.OsgiBundledPathScanner Cannot scan directory /com/atlassian/oauth/shared/servlet/ in bundle tac.bitbucket.languages.ja_JP; it does not exist
2018-07-11 15:34:43,302 INFO  [spring-startup]  c.a.s.internal.scm.PluginScmService Bitbucket is using /usr/bin/git version 2.11.0
2018-07-11 15:34:43,363 INFO  [spring-startup]  c.a.s.i.hazelcast.HazelcastLifecycle Updating Hazelcast instance capabilities
2018-07-11 15:39:34,746 ERROR [Caesium-1-3]  c.a.scheduler.core.JobLauncher Scheduled job with ID 'IndexingAnalyticsJob' failed
rx.exceptions.OnErrorNotImplementedException: null
        at rx.observables.BlockingObservable$8.call(BlockingObservable.java:642)
        at rx.observables.BlockingObservable$8.call(BlockingObservable.java:639)
        at rx.observables.BlockingObservable$9.onError(BlockingObservable.java:673)
        at rx.internal.operators.NotificationLite.accept(NotificationLite.java:147)
        at rx.observables.BlockingObservable.subscribe(BlockingObservable.java:528)
        at rx.observables.BlockingObservable.subscribe(BlockingObservable.java:665)
        at rx.observables.BlockingObservable.subscribe(BlockingObservable.java:639)
        at com.atlassian.bitbucket.internal.search.indexing.analytics.IndexingAnalyticsJob.runJob(IndexingAnalyticsJob.java:50)
        at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:153)
        at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:118)
        at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:97)
        at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:443)
        at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJob(CaesiumSchedulerService.java:438)
        at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJobWithRecoveryGuard(CaesiumSchedulerService.java:462)
        at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:390)
        at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:285)
        at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:282)
        at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:65)
        at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:59)
        at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:34)
        at java.lang.Thread.run(Thread.java:748)
Caused by: com.atlassian.bitbucket.internal.search.client.ElasticsearchClientNotConfiguredException: null
        at com.atlassian.bitbucket.internal.search.client.DefaultConfigurableElasticsearchClient.lambda$execute$2(DefaultConfigurableElasticsearchClient.java:35)
        at java.util.Optional.orElseGet(Optional.java:267)
        at com.atlassian.bitbucket.internal.search.client.DefaultConfigurableElasticsearchClient.execute(DefaultConfigurableElasticsearchClient.java:35)
        ... 14 common frames omitted

 

Similar question

https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-will-not-start-after-new-Installation/qaq-p/710486

1 answer

1 accepted

1 vote
Answer accepted
Alexis Robert
Community Champion
July 11, 2018

Hi @Valentin Chareyre

 

what provider do you use for your VM ? Have you checked that the security scheme allows for inbound connections from outside ?

 

Let me know if this helps, 

 

--Alexis

Valentin Chareyre July 11, 2018

Thanks for you reply @Alexis Robert.

 

OVH hosts my VPS.

 

I ran the command following command to allow connection on the 7990 port :

sudo iptables -I INPUT -p tcp --dport 7990 -j ACCEPT

I don't know how to check the security scheme. Can I do this from the SSH? I don't see any option in the administration panel.

 

If it's relevant, I have installed Apache (and Wordpress), and I am able to reach the server on the port 80 (IPv4 address).

Alexis Robert
Community Champion
July 11, 2018

@Valentin Chareyre

 

very often providers will not allow non-standard ports (like 7990 for Bitbucket) to be reached from outside as a security measure.

I am not familiar with OVH, but Amazon EC2 or Azure for instance will let you manually open a port on a VPS on the security panel.

What OVH service are you using for your VM ?

Valentin Chareyre July 11, 2018

I have found the interface to manage the firewall rules for my VPS.

 

Dedicated > IP, then click on the menu next to the IP address of the VPS, and select "Manage firewall"

 

I have created the following rule :

- Protocol : TCP

- Source IP address : all

- Source port : all

- Destination port : 7990

 

And .... IT WORKS ! Thank you @Alexis Robert ! After three days on this problem, two full reinstallations of the VPS, I was so delighted to see the logo of Bitbucket !

PaoloFernandez August 24, 2018

This was very helpful!!! Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events