How can I access pmm server from port other than 443/80. As they are pre-occupied by the Apache Web-Server

Description:

[Detailed description of the issue or question]

I’m using port no 30009. How can I access pmm-server? I dont want https. I want to access it on 30009. But unable to do so, I’m getting 302 status code. And at port number 80/443 apache is already running. I’m not very good with web server so I don’t want to change anything on stage web-server.

Steps to Reproduce:

[Step-by-step instructions on how to reproduce the issue, including any specific settings or configurations]

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a9ab45b629bb percona/pmm-server:2 “/opt/entrypoint.sh” 18 hours ago Up 18 hours (healthy) 80/tcp, 0.0.0.0:30009->443/tcp, :::30009->443/tcp pmm-server

#netstat
tcp 0 0 0.0.0.0:30009 0.0.0.0:* LISTEN 325952/docker-proxy

Version:

[Insert the version number of the software]

Latest

Logs:

[If applicable, include any relevant log files or error messages]

#Docker Logs
2024-07-01 11:45:51,163 INFO Included extra file “/etc/supervisord.d/alertmanager.ini” during parsing
2024-07-01 11:45:51,164 INFO Included extra file “/etc/supervisord.d/dbaas-controller.ini” during parsing
2024-07-01 11:45:51,164 INFO Included extra file “/etc/supervisord.d/grafana.ini” during parsing
2024-07-01 11:45:51,164 INFO Included extra file “/etc/supervisord.d/pmm.ini” during parsing
2024-07-01 11:45:51,164 INFO Included extra file “/etc/supervisord.d/prometheus.ini” during parsing
2024-07-01 11:45:51,164 INFO Included extra file “/etc/supervisord.d/qan-api2.ini” during parsing
2024-07-01 11:45:51,164 INFO Included extra file “/etc/supervisord.d/supervisord.ini” during parsing
2024-07-01 11:45:51,164 INFO Included extra file “/etc/supervisord.d/victoriametrics.ini” during parsing
2024-07-01 11:45:51,164 INFO Included extra file “/etc/supervisord.d/vmalert.ini” during parsing
2024-07-01 11:45:51,164 INFO Included extra file “/etc/supervisord.d/vmproxy.ini” during parsing
2024-07-01 11:45:51,164 INFO Set uid to user 0 succeeded
2024-07-01 11:45:51,171 INFO RPC interface ‘supervisor’ initialized
2024-07-01 11:45:51,172 INFO supervisord started with pid 1
2024-07-01 11:45:52,176 INFO spawned: ‘pmm-update-perform-init’ with pid 11
2024-07-01 11:45:52,180 INFO spawned: ‘postgresql’ with pid 12
2024-07-01 11:45:52,185 INFO spawned: ‘clickhouse’ with pid 16
2024-07-01 11:45:52,189 INFO spawned: ‘grafana’ with pid 18
2024-07-01 11:45:52,202 INFO spawned: ‘nginx’ with pid 21
2024-07-01 11:45:52,224 INFO spawned: ‘victoriametrics’ with pid 22
2024-07-01 11:45:52,241 INFO spawned: ‘vmalert’ with pid 23
2024-07-01 11:45:52,258 INFO spawned: ‘alertmanager’ with pid 27
2024-07-01 11:45:52,287 INFO spawned: ‘vmproxy’ with pid 29
2024-07-01 11:45:52,306 INFO spawned: ‘qan-api2’ with pid 34
2024-07-01 11:45:52,319 INFO spawned: ‘pmm-managed’ with pid 38
2024-07-01 11:45:52,465 INFO exited: qan-api2 (exit status 1; not expected)
2024-07-01 11:45:53,319 INFO success: pmm-update-perform-init entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-01 11:45:53,319 INFO success: postgresql entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-01 11:45:53,319 INFO success: clickhouse entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-01 11:45:53,320 INFO success: grafana entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-01 11:45:53,320 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-01 11:45:53,320 INFO success: victoriametrics entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-01 11:45:53,320 INFO success: vmalert entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-01 11:45:53,320 INFO success: alertmanager entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-01 11:45:53,320 INFO success: vmproxy entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-01 11:45:53,321 INFO success: pmm-managed entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-01 11:45:53,475 INFO spawned: ‘qan-api2’ with pid 79
2024-07-01 11:45:53,628 INFO exited: qan-api2 (exit status 1; not expected)
2024-07-01 11:45:55,850 INFO spawned: ‘qan-api2’ with pid 425
2024-07-01 11:45:56,574 INFO exited: qan-api2 (exit status 1; not expected)
2024-07-01 11:45:58,071 INFO spawned: ‘pmm-agent’ with pid 460
2024-07-01 11:45:59,245 INFO success: pmm-agent entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-01 11:45:59,835 INFO spawned: ‘qan-api2’ with pid 500
2024-07-01 11:46:00,857 INFO success: qan-api2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-01 11:46:12,534 INFO exited: pmm-update-perform-init (exit status 0; expected)
2024-07-01 11:56:30,499 INFO reaped unknown pid 3660 (terminated by SIGKILL

Expected Result:

[What the user expected to see or happen before the issue occurred]

It should be accessible at http://:30009

Actual Result:

[What actually happened when the user encountered the issue]

#curl -k https://localhost:30009

302 Found

302 Found


nginx

#curl http://localhost:30009

400 The plain HTTP request was sent to HTTPS port

400 Bad Request

The plain HTTP request was sent to HTTPS port
nginx

Additional Information:

[Include any additional information that could be helpful to diagnose the issue, such as browser or device information]

Hi @Mantresh_Kumar, please check Resolve issues - Percona Monitoring and Management and also review the logs.zip file from your server, as it may provide more insights into the issue you are experiencing.

Hi @Roma_Novikov , is there any way I can use ports other then 443/80? I’m using docker for pmm-server.

Yes, it’s supported.

docker run --detach --restart always
–publish 30009:443
-v pmm-data:/srv
–name pmm-server
percona/pmm-server:2

should be the command for you to use

Hi @Mantresh_Kumar as far as I see it’s accessible in 30009 and returning HTTP status code 302 which is completely correct response. Can you curl https://localhost:30009/v1/readyz ?

Thanks @Roma_Novikov and @nurlan . It is sorted. Got my answers cleared. You’re awesome.

2 Likes