[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Ament Build with Proxy Setup

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Ament Build with Proxy Setup

Saurabh Bansal via ros-users


Hey Guys,


How do you get ament to bypass a proxy/firewall during the build process?

I am installing ament dependencies and I found that I keep failing when building ros2 particularly in building poco:

```bash
downloading...
     src='https://github.com/pocoproject/poco/archive/poco-1.7.7-release.tar.gz'
     dst='/home/lex/ros2_ws/build/poco_vendor/poco-1.7.7-prefix/src/poco-1.7.7-release.tar.gz'
     timeout='600 seconds'
CMake Error at poco-1.7.7-stamp/download-poco-1.7.7.cmake:27 (message):
  error: downloading
  'https://github.com/pocoproject/poco/archive/poco-1.7.7-release.tar.gz'
  failed

    status_code: 7
    status_string: "Couldn't connect to server"
    log:   Trying 192.30.253.113...

  connect to 192.30.253.113 port 443 failed: Connection timed out

    Trying 192.30.253.112...

  connect to 192.30.253.112 port 443 failed: Connection timed out

  Failed to connect to github.com port 443: Connection timed out

  Closing connection 0

```





---
[Visit Topic](https://discourse.ros.org/t/ament-build-with-proxy-setup/2913/1) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Ament Build with Proxy Setup

Saurabh Bansal via ros-users


To help you effectively I'll need a little more information. Can you clarify what sort of proxy/firewall you're using? Is it a transparent proxy or are you blocked from outbound connections by a firewall and require all requests to use the proxy? If you're firewalled, how are you configuring your machine to use the proxy?





---
[Visit Topic](https://discourse.ros.org/t/ament-build-with-proxy-setup/2913/2) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Ament Build with Proxy Setup

Saurabh Bansal via ros-users
In reply to this post by Saurabh Bansal via ros-users


It's a firewall proxy, yes.

To allow the machine to use the internet, I uncommented the relevant lines in `/etc/wget` like so:

```bash
http_proxy =http://user@password@...:3128
http_proxy = http://user@password@...:3128
ftp_proxy = http://user@password@...:3128

```

While building with ament, it seems there is a wget instruction that is trying to run. Somehow it's not able to route downloads through the proxy. What do you have in mind?





---
[Visit Topic](https://discourse.ros.org/t/ament-build-with-proxy-setup/2913/3) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Ament Build with Proxy Setup

Saurabh Bansal via ros-users
In reply to this post by Saurabh Bansal via ros-users


If you're only changing `/etc/wget` (Hopefully `/etc/wgetrc` actually according to the docs I can see for wget) that will only effect the wget program. CMake's ExternalProject_Add [uses libcurl](https://cmake.org/pipermail/cmake/2015-October/061850.html) under the hood you you will need to set the proxy settings for curl not wget.

Curl uses the standard environment variables `http_proxy` and `https_proxy`: See [here](https://stackoverflow.com/questions/9445489/performing-http-requests-with-curl-using-proxy) for how to set them.





---
[Visit Topic](https://discourse.ros.org/t/ament-build-with-proxy-setup/2913/4) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Ament Build with Proxy Setup

Saurabh Bansal via ros-users
In reply to this post by Saurabh Bansal via ros-users


Relying only on environment variables is tricky for such things.

I remember when I built ROS for Yocto, there were so many meta-build systems involved that, at some point, the info got lost and then the download didn't work. I believe it had to do with the way python distutils were called from catkin, or something the like. Also, some version control systems like SVN and also some dependency resolution systems like maven don't look at the environment variables.

If possible, it would be preferable if we could have configuration variables for that directly within ament, which are filled from http_proxy and https_proxy by default. This way, they could be passed on to to the downstream tools in the proper way.





---
[Visit Topic](https://discourse.ros.org/t/ament-build-with-proxy-setup/2913/5) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS/Troubleshooting] Ament Build with Proxy Setup

Saurabh Bansal via ros-users
In reply to this post by Saurabh Bansal via ros-users


It would be great to avoid relying on the environment variables. However this is libcurl, being called by a [standard CMake function](https://cmake.org/cmake/help/v3.0/module/ExternalProject.html) from a [pure CMake package](https://github.com/ros2/poco_vendor). And the top searches for cmake and proxy seem to suggest that they also recommend the environment varialbe approach too. [1](https://cmake.org/pipermail/cmake/2009-May/029537.html) [2](https://cmake.org/pipermail/cmake/2010-March/035772.html)  There's some recent traffic for making it a setting in the cmake-gui but that's also been stated as [unlikely](https://gitlab.kitware.com/cmake/cmake/issues/17182). As far as I know there's no standard way besides using an environment variable to use a proxy within a CMake build. It also appears to be the [recommended approach to for distutils](https://mail.python.org/pipermail/distutils-sig/2008-October/010421.html) or [setuptools](https://stackoverflow.com/a/13733377/604099)in
  python.

When we integrate a tool that doesn't use/respect the environment variables we should definitely make sure to pass it through appropriately but until then I don't think we'll want to increase the complexity and just let the environment variables pass through, and that can likely be specific to that buildsystem's integration implementation.





---
[Visit Topic](https://discourse.ros.org/t/ament-build-with-proxy-setup/2913/6) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>