What Is the Default Port to Which the Web Interface of the Spark History Server Binds?


Larry Thompson

The Spark History Server is a component of Apache Spark that allows users to view the logs and metrics of completed Spark applications. It provides a web interface for easy access to this information. One important aspect of the Spark History Server is the port to which its web interface binds by default.

Default Port

The default port to which the web interface of the Spark History Server binds is 18080. This means that, unless configured otherwise, you can access the Spark History Server’s web interface by navigating to http://hostname:18080 in your web browser.

Changing the Default Port

If you want to change the default port, you can do so by modifying the configuration file of your Spark installation. The configuration file is usually located in the $SPARK_HOME/conf/ directory and is named spark-defaults.conf.

To change the default port, open the spark-defaults.conf file in a text editor and add or modify the following line:

# Set custom port for Spark History Server web interface
spark.history.ui.port  <new-port-number>

Note: Replace <new-port-number> with your desired port number. Make sure that the chosen port is not already in use by another application on your system.

Saving and Restarting

After making changes to the configuration file, save it and restart your Spark History Server for the changes to take effect. Once it restarts, it will bind its web interface to the new port you specified.

Accessing the Web Interface

To access the Spark History Server’s web interface with the new port, navigate to http://hostname:<new-port-number> in your web browser. Remember to replace <new-port-number> with the actual port number you configured.


If you encounter any issues accessing the web interface of the Spark History Server, make sure that:

  • The Spark History Server is running and has not encountered any errors.
  • The specified port is not blocked by a firewall or another application.
  • You have correctly restarted the Spark History Server after modifying its configuration file.

By following these steps, you can easily configure and access the web interface of the Spark History Server using a custom port if needed. This allows you to monitor and analyze completed Spark applications more conveniently.

Discord Server - Web Server - Private Server - DNS Server - Object-Oriented Programming - Scripting - Data Types - Data Structures

Privacy Policy