Open simont26 opened 10 months ago
not even for 8.9
not even for 8.9
sorry. I had to change java version for bitbucket to 1.8 in /opt/java and now it works for me on version 8.9
brilliant Marrowsh, does it matter which docker image is used?
brilliant Marrowsh, does it matter which docker image is used?
hey @simont26. I tried the official one from Atlassian on docker hub. now I used 8.17 version and it still works. but with a warning for java 1.8 deprecation.
@marrowsh how did you go about updating the java?
I added using docker run -it --name java8 -v /opt/java8 openjdk:8
this is my docker file
#
# __ _ __ __ __ __ ____ _____
# / / (_) /_/ / __ ______/ /_____ / /_ / __/__ / _/ /__ _____ ________
# / _ \/ / __/ _ \/ // / __/ '_/ -_) __/ _\ \/ _ \/ _/ __/ |/|/ / _ `/ __/ -_)
#/_.__/_/\__/_.__/\_,_/\__/_/\_\\__/\__/ /___/\___/_/ \__/|__,__/\_,_/_/ \__/
#
# Docker Compose for Run bitbucket
# Test for bitbucket Server 7.x
# Need "my-net" Network for Run this File
# docker network create --driver bridge --subnet=150.50.50.0/24 my-net
version: '3.4'
services:
bitbucket:
image: 'atlassian/bitbucket-server:8.17' # Use the custom image you built
container_name: bitbucket
hostname: bitbucket
restart: always
environment:
JAVA_HOME: /opt/java8
BITBUCKET_HOME: /var/atlassian/application-data/bitbucket/
JAVA_OPTS: '-javaagent:/atlassian-agent.jar'
JDBC_DRIVER: org.postgresql.Driver
JDBC_URL: 'jdbc:postgresql://db:5432/bitbucket'
JDBC_USER: bitbucket
JDBC_PASSWORD: 'XXX'
SERVER_SCHEME: 'https'
SERVER_SECURE: 'true'
SERVER_PROXY_PORT: '443'
SERVER_PROXY_NAME: 'XXX'
JVM_MINIMUM_MEMORY: 2048m
JVM_MAXIMUM_MEMORY: 6000m
volumes:
- bitbucket-Data:/var/atlassian/application-data/bitbucket
- ./agent/atlassian-agent.bak:/atlassian-agent.jar:ro
- java8:/opt/java8
networks:
my-net:
aliases:
- bit
ports:
- 7990:7990
- 7999:7999
db:
image: postgres:15
container_name: bitbucket-database
hostname: bitbucket-database
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: 'X&/LmRJDsw3wJf<30j39'
POSTGRES_USER: bitbucket
POSTGRES_DB: bitbucket
volumes:
- bitbucketDbVolume:/var/lib/postgresql/data
networks:
my-net:
aliases:
- bit-db
volumes:
bitbucket-Data:
name: bitbucket-Data
bitbucketDbVolume:
name: bitbucketDbVolume
networks:
my-net:
external: true
When its setting up i keep getting the same error
any help is greatly appreciated!
@simont26 This is the part in my compose file that I made changes: you won't need to define JAVA_HOME just download the tar file of openjdk 1.8 and extract it on root of the cloned repo. then change its name to java and : cd java mkdir openjdk =>the reason for making such a dir is because when you run the docker image you find this path>/opt/java/openjdk mv * openjdk now run the compose file for bitbucket.
version: '3.4'
services:
bitbucket:
image: "atlassian/bitbucket-server:8.17"
container_name: bitbucket
hostname: bitbucket
restart: always
environment:
BITBUCKET_HOME: /var/atlassian/application-data/bitbucket/
JAVA_OPTS: '-javaagent:/atlassian-agent.jar'
JDBC_DRIVER: org.postgresql.Driver
JDBC_URL: 'jdbc:postgresql://db:5432/bitbucket'
JDBC_USER: bitbucket
JDBC_PASSWORD: 'X&/LmRJDsw3wJ'
#SERVER_SCHEME: 'https'
#SERVER_SECURE: 'true'
#SERVER_PROXY_PORT: '443'
#SERVER_PROXY_NAME: 'bitbucket.mysite.com'
JVM_MINIMUM_MEMORY: 512m
JVM_MAXIMUM_MEMORY: 2048m
volumes:
- bitbucket-Data:/var/atlassian/application-data/bitbucket
- ./agent/atlassian-agent.bak:/atlassian-agent.jar:ro
- ./java:/opt/java
networks:
my-net:
aliases:
- bit
ports:
- 7990:7990
- 7999:7999
with @marrowsh instruction 8.16 works but 8.17 and up does not work. The issue is "A fatal error has occurred The following problem occurred, which prevents Atlassian Bitbucket from starting:
Signing of system created Git objects is enabled but there was an issue loading the signing key. Please see the logs for more details." "Caused by: java.security.InvalidKeyException: Illegal key size or default parameters"
agent doesnt generate valid key for 8.16