You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/06/07 21:32:16 UTC

[GitHub] [netbeans] jgneff commented on pull request #4206: Make one connection to download a file, not three

jgneff commented on PR #4206:
URL: https://github.com/apache/netbeans/pull/4206#issuecomment-1149189736

   I discovered this issue while trying to build NetBeans on [Launchpad](https://launchpad.net/~jgneff/+snap/strictly-netbeans), which uses a local proxy server for all external connections. The bug report [Bug 1948501](https://bugs.launchpad.net/launchpad-buildd/+bug/1948501), "HTTPS proxy returns 503 Service Unavailable," describes the original problem.
   
   For my local tests, I ran [Tinyproxy](https://tinyproxy.github.io) on my workstation at `192.168.1.11` and built NetBeans in an LXD container at `10.203.206.244`. I ran Ant with the target `download-all-extbins` after removing any previously downloaded files. Each build ran with none, both, or one of the following environment variables defined in the container:
   
   ```console
   $ printenv | grep http
   https_proxy=http://192.168.1.11:8888/
   http_proxy=http://192.168.1.11:8888/
   ```
   
   On my workstation, I modified the Tinyproxy configuration at `/etc/tinyproxy/tinyproxy.conf` as follows:
   
   ```diff
   120c120
   < LogLevel Info
   ---
   > LogLevel Connect
   224a225
   > Allow 10.203.206.0/24
   ```
   
   A row in each of the tables below represents a build with:
   
   * **None** - No proxy environment variables
   * **Both** - Both proxy environment variables
   * **HTTP** - Only the `http_proxy` environment variable
   * **HTTPS** - Only the `https_proxy` environment variable
   
   Note that all connections made to an external host used a secure HTTPS connection. The type of connection in the columns below indicates only which proxy was used: HTTP for the proxy defined by the `http_proxy` environment variable, and HTTPS for the proxy defined by the `https_proxy` environment variable.
   
   ### Before the fix
   
   The table below shows the number and types of connections made before the fix.
   
   **Connections made:**
   
   | Variables | Made | Direct | HTTP | HTTPS |
   |-----------|-----:|-------:|-----:|------:|
   | None      |  565 |    565 |    0 |     0 |
   | Both      | 1263 |    565 |  349 |   349 |
   | HTTP      | 1130 |    565 |  565 |     0 |
   | HTTPS     | 1130 |    565 |    0 |   565 |
   
   The table below shows the types of connections actually used before the fix.
   
   **Connections used:**
   
   | Variables | Used | Direct | HTTP | HTTPS |
   |-----------|-----:|-------:|-----:|------:|
   | None      |  565 |    565 |    0 |     0 |
   | Both      |  565 |    550 |   14 |     1 |
   | HTTP      |  565 |    119 |  446 |     0 |
   | HTTPS     |  565 |    550 |    0 |    15 |
   
   ### After the fix
   
   The table below shows the number and types of connections made after the fix.
   
   **Connections made:**
   
   | Variables | Made | Direct | HTTP | HTTPS |
   |-----------|-----:|-------:|-----:|------:|
   | None      |  565 |    565 |    0 |     0 |
   | Both      |  565 |      0 |  565 |     0 |
   | HTTP      |  565 |      0 |  565 |     0 |
   | HTTPS     |  565 |      0 |    0 |   565 |
   
   After the fix, each of the 565 connections made were in fact used to transfer a file.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists