I am using podman-compose and ran into a behaviour, I don't understand yet. Respectively I know how to solve the problem, but I don't get it..I have a compose file, which starts Apache NiFi and some other services like nginx, zookeeper etc. It does not matter if I start all services or only NiFi with podman-compose, all the time I get the same error. And the setting of podman-compose is by default to run all containers in one single pod.
After 10 seconds podman logs this: Received trapped signal, beginning shutdown... for NiFi container. The bootstrap logging of NiFi logs a bit more like this, but enough to understand I think: ERROR [NiFi logging handler] org.apache.nifi.StdErr Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: 4986270786f1: 4986270786f1: Name or service not known podman-compose creates the pod like this: podman pod create --name=<project-name> --share net -p <some-ports> It uses --share net to only share this specific kernel namespace. It can be found at this line. If I create a pod without --share net , podman shares all kernel namespaces (including net) and the problem is solved. It is also solved, if I run --share ipc,pid,uts (cgroups is automatically shared without specifying, I figured out), so without net.
My first question is, why podman-compose has hard coded this parameter?
And my second question is, why a network error is raised if the pod shares only network namespace and does not raise it, when every namespace is shared, as well as every namespace except net is shared? I would expect that it does not raise an error, if only net namespace is shared and raises one if it does not shared..I hope you get it :-)
btw: it runs with docker-compose without any problem..
$ podman version
Version: 1.9.1
RemoteAPI Version: 1
Go Version: go1.11.6
OS/Arch: linux/amd64
I am using podman-compose and ran into a behaviour, I don't understand yet. Respectively I know how to solve the problem, but I don't get it..I have a compose file, which starts Apache NiFi and some other services like nginx, zookeeper etc. It does not matter if I start all services or only NiFi with podman-compose, all the time I get the same error. And the setting of podman-compose is by default to run all containers in one single pod.
After 10 seconds podman logs this:
Received trapped signal, beginning shutdown...
for NiFi container. The bootstrap logging of NiFi logs a bit more like this, but enough to understand I think:ERROR [NiFi logging handler] org.apache.nifi.StdErr Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: 4986270786f1: 4986270786f1: Name or service not known
podman-compose creates the pod like this:podman pod create --name=<project-name> --share net -p <some-ports>
It uses--share net
to only share this specific kernel namespace. It can be found at this line. If I create a pod without--share net
, podman shares all kernel namespaces (including net) and the problem is solved. It is also solved, if I run--share ipc,pid,uts
(cgroups is automatically shared without specifying, I figured out), so without net.My first question is, why podman-compose has hard coded this parameter?
And my second question is, why a network error is raised if the pod shares only network namespace and does not raise it, when every namespace is shared, as well as every namespace except net is shared? I would expect that it does not raise an error, if only net namespace is shared and raises one if it does not shared..I hope you get it :-)
btw: it runs with docker-compose without any problem..
I installed podman-compose via downloading master-branch and install it with
pip3 install podman-compose-master.zip
because of this issue https://github.com/containers/podman-compose/issues/54If you need more information, let me know :-)