I install the bitbucket by
`helm install bitbucket -n bitbucket -f values ./bitbucket`
I use helm pull to pull the chart to ./bitbucket
the values i use :
```
additionalContainers: []
additionalFiles: []
additionalInitContainers: []
additionalLabels: {}
affinity: {}
bitbucket:
additionalBundledPlugins: []
additionalEnvironmentVariables: []
additionalJvmArgs:
- '-XX:ActiveProcessorCount=2'
additionalVolumeMounts: []
clustering:
enabled: false
elasticSearch:
baseUrl: null
credentials:
passwordSecretKey: password
secretName: null
usernameSecreyKey: username
license:
secretKey: license-key
secretName: null
ports:
hazelcast: 5701
http: 7990
ssh: 7999
resources:
container:
requests:
cpu: '2'
memory: 2G
jvm:
maxHeap: 1g
minHeap: 512m
securityContext:
enabled: true
gid: '2003'
service:
annotations: {}
port: 80
type: ClusterIP
setPermissions: false
shutdown:
command: /shutdown-wait.sh
terminationGracePeriodSeconds: 35
sshService:
annotations: {}
enabled: false
port: 22
type: LoadBalancer
sysadminCredentials:
displayNameSecretKey: displayName
emailAddressSecretKey: emailAddress
passwordSecretKey: password
secretName: null
usernameSecretKey: username
database:
credentials:
passwordSecretKey: password
secretName: bitbucket-postgres
usernameSecretKey: username
driver:
- org.postgresql.Driver
url:
- >-
jdbc:postgresql://postgres-postgresql-ha-pgpool.bitbucket.svc.cluster.local:5432/bitbucket
fluentd:
command: null
customConfigFile: false
elasticsearch:
enabled: true
hostname: elasticsearch
enabled: false
extraVolumes: []
fluentdCustomConfig: {}
imageName: fluent/fluentd-kubernetes-daemonset:v1.11.5-debian-elasticsearch7-1.2
image:
pullPolicy: IfNotPresent
repository: atlassian/bitbucket
tag: ''
ingress:
annotations: {}
create: true
host: bitbucket.demo.com
https: false
maxBodySize: 250m
nginx: true
path: /
tlsSecretName: null
nodeSelector: {}
podAnnotations: {}
replicaCount: 1
serviceAccount:
clusterRole:
create: true
name: null
clusterRoleBinding:
create: true
name: null
create: true
imagePullSecrets: []
name: null
tolerations: []
volumes:
additional: []
localHome:
customVolume: {}
mountPath: /var/atlassian/application-data/bitbucket
persistentVolumeClaim:
create: false
resources:
requests:
storage: 100Gi
storageClassName: local-nfs
sharedHome:
customVolume: {}
mountPath: /var/atlassian/application-data/shared-home
nfsPermissionFixer:
command: |
chown -R 2003:2003 /shared-home
enabled: true
mountPath: /shared-home
persistentVolume:
create: false
mountOptions: []
nfs:
path: ''
server: ''
persistentVolumeClaim:
create: true
resources:
requests:
storage: 300Gi
storageClassName: nfs-client
volumeName: null
subPath: null
```
when the pod start, i get the errors from log
```
021-09-17 12:28:07,002 INFO [main] c.a.b.i.b.BitbucketServerApplication Starting BitbucketServerApplication v7.15.1 using Java 11.0.11 on bitbucket-0 with PID 119 (/opt/atlassian/bitbucket/app/WEB-INF/classes st
arted by bitbucket in /var/atlassian/application-data/bitbucket)
2021-09-17 12:28:07,015 INFO [main] c.a.b.i.b.BitbucketServerApplication No active profile set, falling back to default profiles: default
2021-09-17 12:28:09,283 INFO [main] c.a.b.i.boot.log.BuildInfoLogger Starting Bitbucket 7.15.1 (18445d7 built on Tue Aug 10 21:24:20 GMT 2021)
2021-09-17 12:28:09,292 INFO [main] c.a.b.i.boot.log.BuildInfoLogger JVM: AdoptOpenJDK OpenJDK 64-Bit Server VM 11.0.11+9
2021-09-17 12:28:11,324 ERROR [main] c.a.s.i.j.HomeApplicationEventCheck Bitbucket Shared Home [/var/atlassian/application-data/shared-home] exists but is not writable by Bitbucket
2021-09-17 12:28:11,877 INFO [main] c.a.b.i.b.BitbucketServerApplication Started BitbucketServerApplication in 7.074 seconds (JVM running for 9.223)
2021-09-17 12:28:18,770 INFO [spring-startup] c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /var/atlassian/application-data/bitbucket
2021-09-17 12:28:19,370 ERROR [spring-startup] com.zaxxer.hikari.HikariConfig Failed to load driver class [org.postgresql.Driver] from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClas
sLoader@44e81672
2021-09-17 12:28:20,289 ERROR [spring-startup] com.zaxxer.hikari.HikariConfig Failed to load driver class [org.postgresql.Driver] from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClas
sLoader@44e81672
2021-09-17 12:28:20,574 ERROR [spring-startup] com.zaxxer.hikari.HikariConfig Failed to load driver class [org.postgresql.Driver] from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClas
sLoader@44e81672
2021-09-17 12:28:20,586 ERROR [spring-startup] com.zaxxer.hikari.HikariConfig Failed to load driver class [org.postgresql.Driver] from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClas
sLoader@44e81672
2021-09-17 12:28:20,630 ERROR [spring-startup] com.zaxxer.hikari.HikariConfig Failed to load driver class [org.postgresql.Driver] from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClas
sLoader@44e81672
2021-09-17 12:28:20,654 ERROR [spring-startup] com.zaxxer.hikari.HikariConfig Failed to load driver class [org.postgresql.Driver] from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClas
sLoader@44e81672
2021-09-17 12:28:20,669 ERROR [spring-startup] com.zaxxer.hikari.HikariConfig Failed to load driver class [org.postgresql.Driver] from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClas
sLoader@44e81672
2021-09-17 12:28:20,680 ERROR [spring-startup] com.zaxxer.hikari.HikariConfig Failed to load driver class [org.postgresql.Driver] from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClas
sLoader@44e81672
2021-09-17 12:28:20,685 ERROR [spring-startup] com.zaxxer.hikari.HikariConfig Failed to load driver class [org.postgresql.Driver] from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClas
sLoader@44e81672
2021-09-17 12:28:20,688 ERROR [spring-startup] com.zaxxer.hikari.HikariConfig Failed to load driver class [org.postgresql.Driver] from HikariConfig class classloader org.springframework.boot.loader.LaunchedURLClas
sLoader@44e81672
2021-09-17 12:28:20,689 WARN [spring-startup] o.s.w.c.s.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDepe
ndencyException: Error creating bean with name 'crowdAliasDao': Unsatisfied dependency expressed through method 'setSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationExc
eption: Error creating bean with name 'sharedHomeLockAcquirer' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'licenseHelper' while setting constructor argument; nested excepti
on is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'licenseHelper' defined in URL [jar:file:/opt/atlassian/bitbucket/app/WEB-INF/lib/bitbucket-service-impl-7.15.1.
jar!/com/atlassian/stash/internal/license/DefaultLicenseHelper.class]: Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyEx
ception: Error creating bean with name 'databaseSupplier' defined in URL [jar:file:/opt/atlassian/bitbucket/app/WEB-INF/lib/bitbucket-dao-impl-7.15.1.jar!/com/atlassian/stash/internal/db/DefaultDatabaseSupplier.cla
ss]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path r
esource [stash-context.xml]: Cannot create inner bean 'dataSourceFactory$created#7eed24bd' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error crea
ting bean with name 'dataSourceFactory$created#7eed24bd' defined in class path resource [stash-context.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantia
tionException: Failed to instantiate [javax.sql.DataSource]: Factory method 'create' threw exception; nested exception is java.lang.RuntimeException: Failed to load driver class [org.postgresql.Driver] in either of
HikariConfig class loader or Thread context classloader
```
it said the shared-home permission and the postgresql driver is error!
I check the folder by `kubectl exec`, it seem ok
```
drwxrwxrwx 1 bitbucket bitbucket 48 Sep 17 12:26 shared-home
```
I also check the `/opt/atlassian/bitbucket/app/WEB-INF/lib/` , it has the driver jar
```
root@bitbucket-0:/opt/atlassian/bitbucket/app/WEB-INF/lib# ls post*
postgresql-42.2.20.jar
```
I donnot know what happend and how to fix it.
More Info, I found that when I use manual pvc, its ok!
the nfs server i use is synology!
I solve the error by modify the root nfs server path 's permission.
Glad to hear it @tianxia y !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @tianxia y ,
This does look like a permissions issue with shared-home. I can see from your values.yaml that you are providing your own custom command to the nfsPermissionFixer. As a test can you remove your command (chown -R 2003:2003 /shared-home) and then re-deploy Bitbucket. When you do this the Helm charts will use the default nfsPermissionFixer command i.e. https://github.com/atlassian/data-center-helm-charts/blob/main/src/main/charts/bitbucket/templates/_helpers.tpl#L122.
The alternative is to modify what you have supplied to mimic the default.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For anyone else who stumbles upon this issue, I also hit this issue by hastily following the documented steps in the values.yaml of the helm chart. Please take note of the following:
database:
# -- The jdbc URL of the database. If not specified, then it will need to be provided
# via the browser during manual configuration post deployment. Example URLs include:
# - 'jdbc:postgresql://<dbhost>:5432/<dbname>'
# - 'jdbc:mysql://<dbhost>/<dbname>'
# - 'jdbc:sqlserver://<dbhost>:1433;databaseName=<dbname>'
# - 'jdbc:oracle:thin:@<dbhost>:1521:<SID>'
#
url:
# -- The Java class name of the JDBC driver to be used. If not specified, then it will
# need to be provided via the browser during manual configuration post deployment.
# Valid drivers are:
# - 'org.postgresql.Driver'
# - 'com.mysql.jdbc.Driver'
# - 'oracle.jdbc.OracleDriver'
# - 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
#
driver:
The comments denote that the value should be a value in an array - this is not the case.
In the above thread the user also fell into this trap:
driver:
- org.postgresql.Driver
url:
- >-
jdbc:postgresql://postgres-postgresql-ha-pgpool.bitbucket.svc.cluster.local:5432/bitbucket
The correct usage is to set as a string value, as follows:
driver: 'org.postgresql.Driver'
url: 'jdbc:postgresql://postgres-postgresql-ha-pgpool.bitbucket.svc.cluster.local:5432/bitbucket'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.