Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,856
Community Members
 
Community Events
176
Community Groups

need to change the port for accessing synchrony

This question is in reference to Atlassian Documentation: Administering Collaborative Editing

Hello all,

if we use the default config for synchrony, the internal proxy has problems to access the localhost because confluence is running in a docker and internal proxy should prefer confluence:8091/... for localhost:8091 to access the synchrony. If we proxy the requests to synchrony via nginx and disable the internal confluence proxy, such config works as expected with the one exception: confluence generates synchrony urls with port :8091 and this port should be opened extra on a host machine. The responses from :8091/synchrony and :80/synchrony are now the same and both work well, but the web pages want to go to :8091.

We would like either to say the confluence to access  synchrony via internal proxy under the specific hostname (eg. confluence:8091) or to say what port should be used to access the synchrony, if the internal proxy is disabled (in our case 80).

We use confluence 6.0.1 in Docker + Oracle JDK 8

Any hints would be appreciated!

Kind regard,

Gena

 

3 answers

1 accepted

0 votes
Answer accepted

Port is configurable by adding the following line (say your preferred port is 9004) to /bin/setenv.sh

CATALINA_OPTS="-Dsynchrony.port=9004 ${CATALINA_OPTS}"

Cheers,

Zlatko 

Synchrony's port can be specified with -Dreza.port (not -Dsynchrony.port - see https://jira.atlassian.com/browse/CONF-45565).

I'm not sure I follow re. confluence:8091. Synchrony binds to :8091 on all interfaces by default. Confluence (6.0.2 anyway) hardcodes 'localhost' in its 'Synchrony Internal Service URL' - see https://jira.atlassian.com/browse/CONF-45567

We are on 6.0.3 in a docker now. The synchrony proxy is enabled. Following nginx configuration works (important is the location /synchrony-proxy):

location /synchrony-proxy {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://confluence:8091/synchrony;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }
 
 
 
 location / {
                proxy_set_header Host $http_host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_redirect off;
                proxy_pass http://confluence-backend;
        }
 
}

Hi Sir @gbatalski 

May I ask if you manage to change the port of your confluence synchrony? We have a problem on synchrony on our confluence and I already did this code to setenv.sh

CATALINA_OPTS="-Dsynchrony.port=8092 ${CATALINA_OPTS}"

 

but still nothing happens. Do you have any idea on this sir? Thank you!

Deleted user Nov 16, 2021

Hi Neil,

we use the current 7.x version in a docker without any changes in a config files. We setup following parameter (docker compose example): 

compose:

service:

 confluence:

.....

 environment:
- 'ATL_JDBC_URL=jdbc:postgresql://<db>'
- 'ATL_JDBC_USER=<user>'
- 'ATL_JDBC_PASSWORD=<pass>'
- 'ATL_PROXY_NAME=<you.wiki.fqdn>'
- 'ATL_DB_TYPE=postgresql'
- 'ATL_TOMCAT_SCHEME=https'
- 'ATL_PROXY_PORT=443'
- 'ATL_TOMCAT_CONTEXT_PATH=/'
- 'ATL_DB_POOLMAXSIZE=150'
- 'JVM_MAXIMUM_MEMORY=<XX>G'
- 'http_proxy=${proxy if you need}'
- 'https_proxy=${proxy if you need}'
- 'CONFLUENCE_LOG_STDOUT=true'

 

Nginx reverse proxy config:

server {
listen 443 ssl;
server_name <you.wiki.fqdn>;
ssl_certificate ssl.crt;
ssl_certificate_key ssl.key;
ssl_protocols TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;


add_header 'Access-Control-Allow-Origin' 'https://<you.wiki.fqdn>';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';


location / {
resolver 127.0.0.11;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
set $upstream http://confluence:8090;
proxy_pass $upstream;
proxy_set_header X-Forwarded-Proto "https";

}
}

 

 

hope, it hepls

 

Regards

Hi Sir @[deleted]

 

I am a little bit confused on this instructions and codes. Sorry but I am just a Newbie on this field of IT. 

Sorry to ask sir, can I contact you thru email or any other platforms for some questions? Thank you in advance sir!

Best regards,

Neil Morada

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events