Description of problem: cannot port-forward for DB's ports on scaling app Version-Release number of selected component (if applicable): devenv_2772 rhc-1.4.5 How reproducible: always Steps to Reproduce: 1.Create a scalable app rhc app create -a php0s0 -t php-5.3 --scaling 2. Add mysql to the application rhc app cartridge add -a php0s0 -c mysql-5.1 3. Add mongodb to the application rhc app cartridge add -a php0s0 -c mongodb-2.2 4. Add postgresql to the application rhc app cartridge add -a php0s0 -c postgresql-8.4 5. Port-forward rhc port-forward -a php0s0 Actual results: Checking available ports... Forwarding ports Service Connect to Forward to ======= ============== ==== ============== haproxy 127.1.2.2:8080 => 127.1.2.2:8080 haproxy 127.1.2.3:8080 => 127.1.2.3:8080 httpd 127.1.2.1:8080 => 127.1.2.1:8080 Press CTRL-C to terminate port forwarding Expected results: Should also show DB's ports, like: Checking available ports... Forwarding ports Service Connect to Forward to ======= ============== ==== ============== haproxy 127.1.2.2:8080 => 127.1.2.2:8080 haproxy 127.1.2.3:8080 => 127.1.2.3:8080 httpd 127.1.2.1:8080 => 127.1.2.1:8080 mongod 127.NNN.NNN.NNN:27017 => 127.NNN.NNN.NNN:27017 mysqld 127.NNN.NNN.NNN:3306 => 127.NNN.NNN.NNN:3306 postgres 127.NNN.NNN.NNN:5432 => 127.NNN.NNN.NNN:5432 Press CTRL-C to terminate port forwarding Additional info:
This bug should be a feature request to track port-forward features for database ports in scaling app since node bug https://bugzilla.redhat.com/show_bug.cgi?id=876247 is fixed now.
Adding jhonce to the CC, since he's fixing 876247.
https://bugzilla.redhat.com/show_bug.cgi?id=876247 is now ON_QA.
it's still not fixed on devenv_2779, since https://bugzilla.redhat.com/show_bug.cgi?id=876247 is fixed. [root@fedora17_ccy ~]# rhc app create -a php0s1 -t php-5.3 --scaling [root@fedora17_ccy ~]# rhc cartridge add mongodb-2.2 -a php0s1 [root@fedora17_ccy ~]# rhc cartridge add mysql-5.1 -a php0s1 [root@fedora17_ccy ~]# rhc cartridge add postgresql-8.4 -a php0s1 [root@fedora17_ccy ~]# rhc port-forward php0s1 Password: Checking available ports... Forwarding ports Service Connect to Forward to ======= ================ ==== ================ haproxy 127.0.252.2:8080 => 127.0.252.2:8080 haproxy 127.0.252.3:8080 => 127.0.252.3:8080 httpd 127.0.252.1:8080 => 127.0.252.1:8080 Press CTRL-C to terminate port forwarding
Ah, I see. I assumed numeric IPv4 address instead of FQDN, which 'rhc-list-ports' returns for the these DB servers. https://github.com/openshift/rhc/pull/297 addresses this problem.
Commit pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/663e07d6a1538073ff28555d0d5e28f705e2f051 Bug 907742 Fix port forwarding specification matching by relaxing the regular expression to match 'rhc-list-ports' output.
RE-assigned this bug, since it was reproduced in devenv_2786. Steps: 1. create a scalable app $ rhc app create sphp php-5.3 -s -p x 2. embed the three db cartridges (i.e., mysql, mongodb, postgresql) into this app $ rhc cartridge add postgresql-8.4 -a sphp -p x $ rhc cartridge add mysql-5.1 -a sphp -p x $ rhc cartridge add mongodb-2.2 -a sphp -p x 3. port-forward this app $ rhc port-forward sphp -p x Restuls: Forwarding ports Service Connect to Forward to ======= ================== ==== ================== haproxy 127.0.252.130:8080 => 127.0.252.130:8080 haproxy 127.0.252.131:8080 => 127.0.252.131:8080 httpd 127.0.252.129:8080 => 127.0.252.129:8080 Error forwarding some port(s). You can try to forward manually by running: ssh -N -L 5113117196-dev2786veri.dev.rhcloud.com:35566:5113117196-dev2786veri.dev.rhcloud.com:35566 -L 511312d596-dev2786veri.dev.rhcloud.com:35571:511312d596-dev2786veri.dev.rhcloud.com:35571 -L 5113130496-dev2786veri.dev.rhcloud.com:35576:5113130496-dev2786veri.dev.rhcloud.com:35576 5113106d9675515ef0000001.rhcloud.com Expected results: The DB's ports should be forwarded without errors.
client is rhc 1.4.7
Some ports are probably blocked by the firewall. I'll have to investigate which ports are usable.
After discussion with Clayton and Fabiano, we decided to use localhost for local port forwarding. https://github.com/openshift/rhc/pull/298 This will not make the dev cut for the current sprint. There is no ugly logic to differentiate the Mac OS X and the rest, but some documents may need to be updated as a result, since we are effectively changing the way it is done.
Prior to creating the pull request above, I tested the fix on the Mac OS X and Linux (Fedora 17). I have now set up a Windows VM, and confirmed that the fix also works on Windows.
Commit pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/5beaa188da1505998891aaaeb295f70886f4db8c Use 'localhost' exclusively for local port forwarding. This should fix bug 907742. The behavior change is large enough, however, that existing documents should be revised.
Seems this bug is fixed on devenv_2854.After marking it as ON_QA ,we will verify this bug. [root@ip-10-147-154-18 ~]# rhc port-forward -a phps -l wsun+3 -p x -k You have not yet configured the OpenShift client tools. Please run 'rhc setup'. Checking available ports... Forwarding ports Service Connect to Forward to ========== =============== ==== ============================================ haproxy localhost:8082 => 127.0.253.130:8080 haproxy localhost:8083 => 127.0.253.131:8080 httpd localhost:8084 => 127.0.253.129:8080 mongodb localhost:35576 => 512afe023a-wsundev2854.dev.rhcloud.com:35576 mysql localhost:35581 => 512afe543a-wsundev2854.dev.rhcloud.com:35581 postgresql localhost:35571 => 512afd583a-wsundev2854.dev.rhcloud.com:35571 Press CTRL-C to terminate port forwarding
This bug is recreated in INT (devenv_2876) Tested with scalable ruby-1.9 + mongodb-2.2, and the output of port-forwarding was: Checking available ports... Forwarding ports Service Connect to Forward to ======= =================== ==== =================== haproxy 127.3.253.130:8080 => 127.3.253.130:8080 haproxy 127.3.253.131:8080 => 127.3.253.131:8080 httpd 127.3.253.129:8080 => 127.3.253.129:8080 ruby 127.3.253.129:15256 => 127.3.253.129:15256 Error forwarding some port(s). You can try to forward manually by running: ssh -N -L 513064e86c-inttst.int.rhcloud.com:43801:513064e86c-inttst.int.rhcloud.com:43801 51304a5f6cec0ee1f00003af.rhcloud.com
Zhe, We are not forwarding remote ports. Along with https://bugzilla.redhat.com/show_bug.cgi?id=916122, we will be forwarding ports on 127.0.0.1, so that you will see: Forwarding ports Service Connect to Forward to ======= =================== ==== =================== haproxy 127.0.0.1:8080 => 127.3.253.130:8080 haproxy 127.0.0.1:8081 => 127.3.253.131:8080 httpd 127.0.0.1:8082 => 127.3.253.129:8080 ruby 127.0.0.1:15256 => 127.3.253.129:15256
Verified in INT(devnev_2886) with rhc-1.5.7 Tested with a scalable ruby app + mongodb-2.2 Result: Checking available ports... Forwarding ports Service Connect to Forward to ======= =============== ==== ===================================================== haproxy 127.0.0.1:8080 => 127.5.35.130:8080 haproxy 127.0.0.1:8081 => 127.5.35.131:8080 httpd 127.0.0.1:8082 => 127.5.35.129:8080 ruby 127.0.0.1:28970 => 127.5.35.129:28970 mongodb 127.0.0.1:46201 => 5134038703ef64f381000119-inttst.int.rhcloud.com:46201 Press CTRL-C to terminate port forwarding
*** Bug 979591 has been marked as a duplicate of this bug. ***