Changing MC or agent ports

When you configure MC, the Configuration Wizard sets up the following default ports:.

When you configure MC, the Configuration Wizard sets up the following default ports:

  • 5450—Used to connect a web browser session to MC and allows communication from Vertica cluster nodes to the MC application/web server

  • 5444—Provides MC-to-node and node-to-node (agent) communications for database create/import and monitoring activities

If you need to change the MC default ports

A scenario might arise where you need to change the default port assignments for MC or its agents. For example, perhaps one of the default ports is not available on your Vertica cluster, or you encounter connection problems between MC and the agents. The following topics describe how to change port assignments for MC or its agents.

Changing the MC port

Use this procedure to change the default port for MC's application server from 5450 to a different value.

  1. Open a web browser and connect to MC as a user with MC ADMIN privileges.

  2. On the MC Home page, navigate to MC Settings > Configuration and change the Application server running port value from 5450 to a new value.

  3. In the change-port dialog, click OK.

  4. Restart MC.

  5. Reconnect your browser session using the new port. For example, if you changed the port from 5450 to 5555, use one of the following formats:

    https://00.00.00.00:5555/
    

    OR

    https://hostname:5555/
    

Changing the agent port

Changing the agent port takes place in two steps: at the command line, where you modify the config.py file and through a browser, where you modify MC settings.

Change the agent port in config.py

  1. Log in as root on any cluster node and change to the agent directory:

    $ cd /opt/vertica/oss/python3/lib/python3.9/site-packages/vertica/agent/
    
  2. Use any text editor to open config.py.

  3. Scroll down to the agent_port = 5444 entry and replace 5444 with a different port number.

  4. Save and close the file.

  5. Copy config.py to the /opt/vertica/oss/python3/lib/python3.9/site-packages/vertica/agent/ directory on all nodes in the cluster.

  6. Restart the agent process by running the following command:

    $ /etc/init.d/vertica_agent restart
    
    $ /opt/vertica/sbin/vertica_agent restart
    
  7. Repeat (as root) Step 6 on each cluster node where you copied the config.py file.

Change the agent port on MC

  1. Open a web browser and connect to MC as a user with MC ADMIN privileges.

  2. Navigate to MC Settings > Configuration.

  3. Change Default Vertica agent port from 5444 to the new value you specified in the config.py file.

  4. Click Apply and click Done.

  5. Restart MC so MC can connect to the agent at its new port. See Restarting MC.

See also