Is there a way to restart a TeamCity server running on Windows from its web interface? I haven't found a button or documentation whether this is possible.
Restart TeamCity server via web interface
restartteamcity
Related Solutions
The most common ways to use the shutdown
command are:
shutdown -s
— Shuts down.shutdown -r
— Restarts.shutdown -l
— Logs off.shutdown -h
— Hibernates.Note: There is a common pitfall wherein users think
-h
means "help" (which it does for every other command-line program... exceptshutdown.exe
, where it means "hibernate"). They then runshutdown -h
and accidentally turn off their computers. Watch out for that.shutdown -i
— "Interactive mode". Instead of performing an action, it displays a GUI dialog.shutdown -a
— Aborts a previous shutdown command.
The commands above can be combined with these additional options:
-f
— Forces programs to exit. Prevents the shutdown process from getting stuck.-t <seconds>
— Sets the time until shutdown. Use-t 0
to shutdown immediately.-c <message>
— Adds a shutdown message. The message will end up in the Event Log.-y
— Forces a "yes" answer to all shutdown queries.Note: This option is not documented in any official documentation. It was discovered by these StackOverflow users.
I want to make sure some other really good answers are also mentioned along with this one. Here they are in no particular order.
- The
-f
option from JosephStyons - Using
rundll32
from VonC - The Run box from Dean
- Remote shutdown from Kip
Yes, it's possible:
Several agents can be installed on a single machine. They function as separate agents and TeamCity works with them as different agents, not utilizing the fact that they share the same machine. After installing one agent you can install additional one, providing the following conditions are met:
- the agents are installed in the separate directories
- they have distinctive work and temp directories
- buildAgent.properties is configured to have different values for name and ownPort properties
Make sure, there are no build configurations that have absolute checkout directory specified (alternatively, make sure such build configurations have "clean checkout" option enabled and they cannot be run in parallel).
Under Windows, to install additional agents as services, modify [agent dir]\launcher\conf\wrapper.conf to change the properties to have distinct name within the computer:
- wrapper.console.title
- wrapper.ntservice.name
- wrapper.ntservice.displayname
- wrapper.ntservice.description
Best Answer
This is now available in 2017.2 via the Diagnostics page of the admin area:
/admin/admin.html?item=diagnostics#serverRestart