Forums

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

How do you comment and uncomment in the server.xml file?

Sean McCann
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!
June 6, 2023

I'm baffled as to how to uncomment and comment connectors in the server.xml file.

 

Regardless of the edits I make the service fails to restart.

3 answers

1 vote
Najjar _Innovura_
Atlassian Partner
June 6, 2023

To comment or uncomment connectors in the server.xml file, you need to follow these steps:

  1. Open the server.xml file in a text editor. The server.xml file is typically located in the conf directory of your server installation.
  2. Locate the connector that you want to comment or uncomment. Connectors are typically defined using <Connector> tags in the server.xml file.
  3. To comment out a connector, simply add <!-- at the beginning of the line where the connector is defined and --> at the end of the line. For example:
<!-- <Connector port="8080" protocol="HTTP/1.1" ... /> -->

To uncomment a connector, remove the <!-- and --> comment markers from the beginning and end of the line, respectively. For example:

<Connector port="8080" protocol="HTTP/1.1" ... />

Save the server.xml file after making the necessary changes.

After modifying the server.xml file, you need to restart your server for the changes to take effect. If the service fails to restart, there might be other issues in the configuration or dependencies that need to be addressed.

Check the server logs in the installation folder for any error messages 

<jira-installation-directory>/logs/catalina.out

0 votes
Tim Perrault
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2023

Text that is in between <!--  TEXTTEXTTEXT --> is commented out. To uncomment it you would remove the <!-- --> part.

0 votes
Steve Long -Evelon-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2023

Hi @Sean McCann

Typically in Linux/Windows you would comment an XML file using '<!--' at the start of the line and end it with '-->'

I can't comment exactly on why the service won't start, but that's how you would comment out lines of a file.

Hope that helps - Steve.

Suggest an answer

Log in or Sign up to answer