EA-Podman fails to create a container with the error "Must have X ports" Print

  • 0

ymptoms

When creating a container using ea-podman, the container fails to be created with an error similar to the following:

Must have 2 ports (/home/USER/ea-podman.d/ea-CONTAINER.USER.01) :0: at /opt/cpanel/ea-tomcat101/ea-podman-local-dir-setup line 22.

 

Description

Each Podman container that is created is bound to one of the "ephemeral" ports, which is normally reserved to start at port 10,000. If the ip_local_port_range system setting is set to be at or below 10,000, then no ports are able to be allocated by the cPanel tools even if the max port value surpasses this.

We've opened an internal case for our development team to investigate this further. For reference, the case number is CPANEL-50275. Follow this article to receive an email notification when a solution is published in the product. 

 

Workaround

Set the ephemeral ports back to the default value:

echo "32768   60999" > /proc/sys/net/ipv4/ip_local_port_range

Do note the above is only temporary, though once the container is created the port allocation will continue to work for the container; the issue is only when the container is being initially created. To set this permanently, please see the following:

How to modify sysctl settings


Was this answer helpful?
Back

Send Message