Changing MC or agent 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.
-
Open a web browser and connect to MC as a user with MC ADMIN privileges.
-
On the MC Home page, navigate to MC Settings > Configuration and change the Application server running port value from 5450 to a new value.
-
In the change-port dialog, click OK.
-
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
-
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/
-
Use any text editor to open
config.py
. -
Scroll down to the
agent_port = 5444
entry and replace 5444 with a different port number. -
Save and close the file.
-
Copy
config.py
to the/opt/vertica/oss/python3/lib/python3.9/site-packages/vertica/agent/
directory on all nodes in the cluster. -
Restart the agent process by running the following command:
$ /etc/init.d/vertica_agent restart
Note
If you are using Red Hat Enterprise Linux/CentOS 7, use the following command instead:$ /opt/vertica/sbin/vertica_agent restart
-
Repeat (as root) Step 6 on each cluster node where you copied the
config.py
file.
Change the agent port on MC
-
Open a web browser and connect to MC as a user with MC ADMIN privileges.
-
Navigate to MC Settings > Configuration.
-
Change Default Vertica agent port from 5444 to the new value you specified in the
config.py
file. -
Click Apply and click Done.
-
Restart MC so MC can connect to the agent at its new port. See Restarting MC.