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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Server.xml is missing

Hi

 

I've just successfully installed Confluence with docker, but when I try to access it over the web I get this warning message:

Tomcat config is incorrect

The Tomcat server.xml has an incorrect configuration:

scheme should be 'https'
proxyName should be 'foo.bar'
proxyPort should be '443'

Troubleshoot

 

Okay I follow the troubleshoot link - easy I thought ! But the problem is there is no server.xml file and there is no config folder either. Where do I update the info?

 

Thank you.

4 answers

1 vote

If there's no server.xml or config directory, then we have to question why you (or something on your system) has deleted them, or why your server refused to let the installer create them, while allowing other parts to be created.

What do you have in <confluence install> and <confluence install>/conf ?

Same here, followed the standard procedure of installing the confluence docker image, the whole wiki is installed and connection to db setup and works but the conf folder and server.xml file is missing :(

This is the structure after installation:

2019-05-22 13:54:54.png

That's the home directory.  Try looking in the installation directory.

Like # people like this

Many thanks @Nic Brough _Adaptavist_ . this solves it for me, I was looking for this file in the wrong path.

For others, the server.xml in the container lies in:

/opt/atlassian/confluence/conf/server.xml

Like Justin Storfinger likes this

How should this file be preserved across container creation? The data files are preserved as they are in a volume but as /opt/atlassian/confluence/conf is not inside of a volume each time the container is recreated the configuration is lost.

Note that the bitbucket-server configuration file IS inside of the application data folder so it is properly preserved across image upgrades and container creation if you've correctly added a volume for that directory.

Like Matt Cavanagh likes this

I too am hitting the issue where the tomcat configuration is being overriden on run time. I suspect this warning is a result of this happening:

confluence | 02-Sep-2019 18:38:33.469 WARNING [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'proxyPort' to '' did not find a matching property.

After that line is emitted, my config is malformed and changed from what I supply via a docker volume.

Updated to 6.15.9, double-checked properties and still see this warning. Any guesses how to debug?

I had this problem too, turned our my docker run command wasn't correct. I was not specifying the environment variables correctly.

Here is the run command I used (with URL removed)

docker run --env CATALINA_CONNECTOR_PROXYNAME=YOURCONFLUENCEURL --env CATALINA_CONNECTOR_PROXYPORT=443 --env CATALINA_CONNECTOR_SCHEME=https --env CATALINA_CONNECTOR_SECURE=true -v /data/your-confluence-home:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server:latest

Notice that the environment variables are specified each behind a --env flag.

Hopefully this is useful to anyone else struggling as I was. 

Had the same Issue with Container: teamatldocker/confluence:latest

I changed the following ENV with portainer to:

CONFLUENCE_PROXY_SCHEME - https

CONFLUENCE_PROXY_NAME - <My URL>

 

Issue solved. :)

I have already updated server.xml and added env. variable, but I still got error message

 

Tomcat config is incorrect

The Tomcat server.xml has an incorrect configuration:

....

 

env. variable

CONFLUENCE_PROXY_SCHEME - https

CONFLUENCE_PROXY_NAME - subdomain.domain.com

 

server.xml

==============================

<Connector connectionTimeout="20000"
redirectPort="8443"
maxThreads="48"
minSpareThreads="10"
enableLookups="false"
acceptCount="10"
debug="0"
URIEncoding="UTF-8"
protocol="org.apache.coyote.http11.Http11NioProtocol"
scheme="https"
secure="true"
proxyName="subdomain.domain.com"
proxyPort="443"/>

==============================

That section looks ok, your error is somewhere else in the file.

Many thanks @Nic Brough _Adaptavist_ 

I updated my server.xml by following steps, am I correct?

1. Download server.xml template file from container "/opt/atlassian/etc/server.xml.j2"

2. Update my mentioned section into server.xml.j2 and upload into container

3.  Restart container

4. As checked /opt/atlassian/confluence/conf/server.xml, my updated section exists

Looks ok.  The problem is that your file contains an error.

Seems no error in server.xml, because of I downloaded the original file and just updated the values:

scheme="https"
secure="true"
proxyName="subdomain.domain.com"
proxyPort="443"

 

By the way, I just downloaded log files in Confluence administration > Troubleshooting and support tools > Create support zip. I found the above setting have not apply into Confluence_support_2020-05-25-02-19-09\tomcat-config\server.xml

Do I need to update server.xml in tomcat too? this file seems different with /opt/atlassian/confluence/conf/server.xml in Confluence

So your new file copied from the original, no longer has the error in it that is causing "the tomcat configuration is incorrect". 

I'm now lost on what you're asking about or what you're doing because you now seem to have a valid file and hence should have a working system.

Yes, I have a working system, but keep popup the error message "Tomcat config is incorrect....."

Error Msg.PNG

Then, I try to fix this problem by update the server.xml template file and restart container, and confirmed /opt/atlassian/confluence/conf/server.xml have been updated, but the above message still keep to popup

server_xml2.PNG

 

After that, I downloaded log file in Confluence administration > Troubleshooting and support tools > Create support zip.

In the downloaded zip file, I found server.xml in "Confluence_support_2020-05-25-07-57-02\tomcat-config", which is no scheme / proxyName / proxyPort exists

server_xml.PNG

Right, so this is screaming that you are looking at the wrong server.xml file.

Could you

  • Log into Confluence as an admin and go to Admin -> General Configuration -> System information
  • Find the line that says "catalina.home" and note the value is a directory
  • Log into the server and go to the directory
  • Descend into "conf" under that
  • The server.xml file in here is the one that Confluence is reading (unless you've configured something really unusual).  Forget copies or templates, just look at this file.

As checked in Admin -> General Configuration -> System information

Confluence_Server_Info.PNG

After the following step, same error popup

1. Download server.xml file by command:

"docker cp 516deeb60341:/opt/atlassian/confluence/conf/server.xml server.xml"

2. Edit the values for elements secure / scheme / proxyName / proxyPort in Connector section

3. Upload updated server.xml into server by command:

"docker cp server.xml 516deeb60341:/opt/atlassian/confluence/conf/server.xml"

4. Restart container by command: "docker restart 516deeb60341"

 

Below content is my server.xml downloaded from /opt/atlassian/confluence/conf/server.xml (proxyName marksed here)

=====================

<?xml version="1.0" encoding="utf-8"?>

<Server port="8000"
shutdown="SHUTDOWN">

<Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on"/>
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>

<Service name="Catalina">

<Connector port="8090"
maxThreads="100"
minSpareThreads="10"
connectionTimeout="20000"
enableLookups="false"
protocol="HTTP/1.1"
redirectPort="8443"
acceptCount="10"
secure="true"
scheme="https"
proxyName="subdomain.domain.com"
proxyPort="443"

relaxedPathChars="[]|"
relaxedQueryChars="[]|{}^\`&quot;&lt;&gt;"
bindOnInit="false"
maxHttpHeaderSize="8192"
useBodyEncodingForURI="true"
disableUploadTimeout="true" />

<Engine name="Standalone"
defaultHost="localhost"
debug="0">
<Host name="localhost"
debug="0"
appBase="webapps"
unpackWARs="true"
autoDeploy="false"
startStopThreads="4">
<Context path=""
docBase="../confluence"
debug="0"
reloadable="false"
useHttpOnly="true">
<!-- Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
<Manager pathname=""/>
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve"
threshold="60"/>

</Context>

<Context path="${confluence.context.path}/synchrony-proxy"
docBase="../synchrony-proxy"
debug="0"
reloadable="false"
useHttpOnly="true">
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve"
threshold="60"/>
</Context>

</Host>
</Engine>

</Service>

</Server>

=====================

Problem fixed by add server.xml into config map in Openshift

So you reverted to a copy of a working file and configured the right one to be deployed?  Is that what you mean?

I created the config file in Openshift by the content of server.xml, and mount it to "opt/atlassian/confluence/conf/server.xml" with read/write permission 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

494 views 24 9
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you