Question
Does TeamCity use the JMX port (5000)? Does the JMX port need to be open on the TeamCity Server?
Answer
TeamCity doesn't use the JMX port (5000).
If, for some reason, it is open on the TeamCity server, this is caused by custom Java Virtual Machine (JVM) startup properties and is not a default behavior. There are also no known cases where TeamCity would require opening the JMX port, and it is not mentioned in the documentation.
To close the JMX port
-
Check TeamCity Configuration Files:
- On Linux/Unix: Verify the
teamcity-server.shfile located in"your TeamCity Home"/bin/. - On Windows: Examine the
teamcity-server.batfile in the same directory. - Look into the
/conffolder (e.g.,"TeamCity Home">/conf/wrapper.conf) to verify if JMX was configured as a service wrapper. - Refer to the specially marked configuration directories as mentioned in the TeamCity documentation: TeamCity Home Directory.
- On Linux/Unix: Verify the
-
Inspect Environmental Variables for Custom JVM Settings:
- Log in to the host where the TeamCity server is running.
- Investigate the following environment variables for any strings containing
jmxremoteproperties:TEAMCITY_SERVER_MEM_OPTSTEAMCITY_SERVER_OPTS
- If
jmxremoteproperties are present, remove them.
-
Restart TeamCity Server:
- After removing the
jmxremotesettings, restart the TeamCity server to apply the changes.
- After removing the
-
Review Additional Documentation:
- To understand more about configuring custom JVM options in TeamCity, consult the Server Startup Properties documentation.
-
Downtime Consideration:
- Perform the changes during scheduled downtime to ensure no disruption to services and to mitigate the risk of unexpected issues.
-
Verify Changes:
- Post-restart, confirm that port 5000 is no longer open and the JMX is successfully disabled.
If any issues arise during these steps, reach out to TeamCity Support for additional guidance.
Comments
0 comments
Please sign in to leave a comment.