Forums

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

Install Confluence on Openshift4.4

Charles Li June 30, 2020

Dear Team

When I want to Install Confluence on Openshift4.4,the pod become crash status.

Here is the error log.

INFO:root:Generating /opt/atlassian/confluence/conf/server.xml from template server.xml.j2 INFO:root:Generating /opt/atlassian/confluence/confluence/WEB-INF/classes/seraph-config.xml from template seraph-config.xml.j2 INFO:root:Generating /opt/atlassian/confluence/confluence/WEB-INF/classes/confluence-init.properties from template confluence-init.properties.j2 INFO:root:Generating /var/atlassian/application-data/confluence/confluence.cfg.xml from template confluence.cfg.xml.j2 INFO:root:User is currently root. Will downgrade run user to confluence INFO:root:Running Confluence with command '/bin/su', arguments ['/bin/su', 'confluence', '-c', '/opt/atlassian/confluence/bin/start-confluence.sh -fg'] su: System error

We have try helm install https://hub.helm.sh/charts/mox/confluence-server

and install with yaml

here is the yaml file.

apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: confluence
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
run: confluence
name: confluence
spec:
replicas: 1
selector:
run: confluence
strategy:
type: Recreate
template:
metadata:
labels:
run: confluence
spec:
containers:
- env:
- name: JVM_XMX
value: '2048m'
- name: JVM_XMS
value: '1024m'
image: docker.io/atlassian/confluence-server:7.6
imagePullPolicy: IfNotPresent
name: confluence
volumeMounts:
- mountPath: /var/atlassian/confluence
name: volume-7iy6x
- mountPath: /opt/atlassian/confluence/logs
name: volume-zsyly
volumes:
- name: volume-7iy6x
persistentVolumeClaim:
claimName: confluence
- name: volume-zsyly
persistentVolumeClaim:
claimName: log
triggers:
- type: ConfigChange
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
run: mysql
name: mysql
spec:
replicas: 1
selector:
run: mysql
strategy:
type: Recreate
template:
metadata:
labels:
run: mysql
spec:
containers:
- env:
- name: MYSQL_USER
value: confluence
- name: MYSQL_PASSWORD
value: confluence
- name: MYSQL_DATABASE
value: confluence
- name: MYSQL_ROOT_PASSWORD
value: confluence
image: docker.io/mysql:5.6
imagePullPolicy: IfNotPresent
name: mysql
volumeMounts:
- mountPath: /var/lib/mysql
name: volume-uiwfa
volumes:
- name: volume-uiwfa
persistentVolumeClaim:
claimName: mysql-data
triggers:
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
labels:
run: confluence
name: confluence
spec:
ports:
- port: 8090
protocol: TCP
targetPort: 8090
selector:
run: confluence
type: ClusterIP
- apiVersion: v1
kind: Service
metadata:
labels:
run: mysql
name: mysql
spec:
ports:
- port: 3306
protocol: TCP
targetPort: 3306
selector:
run: mysql
type: ClusterIP
- apiVersion: v1
kind: Route
metadata:
annotations:
haproxy.router.openshift.io/timeout: 3000s
labels:
run: confluence
name: confluence
spec:
port:
targetPort: 8090
to:
kind: Service
name: confluence
weight: 100
wildcardPolicy: None
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
volume.beta.kubernetes.io/storage-class: managed-nfs-storage
volume.beta.kubernetes.io/storage-provisioner: fuseim.pri/ifs
name: confluence
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
volume.beta.kubernetes.io/storage-class: managed-nfs-storage
volume.beta.kubernetes.io/storage-provisioner: fuseim.pri/ifs
name: log
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
volume.beta.kubernetes.io/storage-class: managed-nfs-storage
volume.beta.kubernetes.io/storage-provisioner: fuseim.pri/ifs
name: mysql-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi

Aslo we have try many version.

The error is same System error.

Could you pls tell me how to fix this or how yo delpoy confluence on Openshift4.4

Thank you

Have a nice day!

1 answer

0 votes
Jay Flowers
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 13, 2020

This needs to be added to the container:

spec:
containers:
- name: confluence-server
image: "atlassian/confluence-server:7.3.4"
securityContext: # <--add this
capabilities: # <--add this
add: # <--add this
- AUDIT_WRITE # <--add this
imagePullPolicy: IfNotPresent

Also these scc policies are required:

oc adm policy add-scc-to-user privileged -z default
oc adm policy add-scc-to-user anyuid -z default

 Also boooo, insecure, booo. @Atlassian fix this, don't release insecure software!

Charles Li July 15, 2020

Hello Jay

Thank you for your help,I tried your method,and sure it can resolved su: System error.But when I want to setup confluence after config the DB. it comes another error.

截屏2020-07-16 下午2.10.04.png

Also i tried another way that write "USER confluence" into docker file and use

"oc new-app --docker-image=" to create pod. This way also can reslove su: System error.But also meet the error which is in the picture.

So if u konw the solution pls tell me.

Thank you

Have a good day!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events