When you start with "-b 0.0.0.0", 4.2.2 is binding to to all IP addresses on your machine, including localhost. Which means that both 4.2.2 and 4.0.4 listen to localhost.
How many IP addresses does your system have? If only one (other than localhost), bind to that specific IP address. If your system has multiple IP addresses, then change the port assignment for 4.0.4 (see the file docs/exemples/bindingmanager/sample-bindings.xml for an easy way to do this)