I have configured confluence docker image to run behind NGINX using postgreSQL and I get this error
Tomcat config is incorrect
The Tomcat server.xml has an incorrect configuration:
scheme should be 'http'
proxyName should be 'wiki.dwfa.ca'
proxyPort should be '80'
I have set the environment variables in the script that starts docker according to the documentation for confluence docker image.
ATL_PROXY_NAME=wiki.dwfa.ca
ATL_PROXY_PORT=80
ATL_TOMCAT_PORT=8090
Why is this occurring?
I did not alter the tomcat server.xml since it is inside the docker image. As for NGINX:
worker_processes 1;
events { worker_connections 1024; }
http
{
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server
{
listen 80;
server_name localhost;
location /
{
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html
{
root /usr/share/nginx/html;
}
}
server
{
listen 80;
server_name wiki.dwfa.ca;
location /
{
proxy_pass http://localhost:8090/;
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the nginx config looks good,
based on the docker documentation the shared variables should also be fine.
Are you using docker-compose to start the container or how does your docker call look like?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
docker run -v /usr/local/data/confluence/v7.3:/var/atlassian/application-data/confluence --name=confluence -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you configured your docker image to make the needed changes to server.xml?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am going to say no since the Atlassian documentation did not mention that. I am going to a assume I will have to do the following
OR
Either way a learning experience for me :-) Do I have that right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure why you need to do all of that when all that's needed is to edit the server.xml, but yes, if you want to do it that way, it will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I looked for an editor when I issued
docker exec -it <containerID> /bin/sh
but could not find vim, vi, nor nano - and I do not think emacs is loaded into the image :-). Other suggestions would be appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I updated server.xml file (/opt/atlassian/confluence/conf) inside the container with the appropriate settings and restarted the container. I got the same error message, so I looked at the server.xml file and my changes were gone. It seems the files was revereted or it was regenerated (looked at the DTS of the file and it was the time the container started up) ...
Ugh ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got it working - thx for the support. I needed to change the /opt/atlassian/etc/server.xml.j2 file
it look like this
proxyName="{{ atl_proxy_name | default(catalina_connector_proxyname) | default('') }}"
proxyPort="{{ atl_proxy_port | default(catalina_connector_proxyport) | default('') }}"
and I changed it to look like this
proxyName="{{ atl_proxy_name | default(catalina_connector_proxyname) | default('wiki.dwfa.ca') }}"
proxyPort="{{ atl_proxy_port | default(catalina_connector_proxyport) | default('80') }}"
That kinda tells there there is a bug in how the boot up process works. Guess I have to go over and report a defect :-). Unless I am not understanding something ...
dwfa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am going to close this as answered - there is enough info in this to help someone else I hope :-).
On the other hand, I have no way of opening a defect to indicate the docker image does not utilize the environment variables.
Thanks for all your help ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This also applies to our case, even though we used Traefik as a Proxy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You'll need to amend the server.xml file to include the scheme, proxyName and proxyPort in the connector settings.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't know, I've not looked at that image.
All I know is that if you want to run it behind a proxy, those three things need to be added into the connector settings in server.xml
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.