Cluster startup failure while running proxy-configured init script with other init scripts

Modify the proxy init script to bypass local addresses.

Written by guruprasad.bn

Last published at: December 10th, 2024

Problem

Your cluster fails to start when you execute a proxy-configured init script and another init script (for example, an init script for installing libraries using requirements.txt) simultaneously.

 

Cause

The proxy-configured init script applies proxy settings to all outgoing network requests, including requests to local services necessary for accessing the workspace file system. 

 

When you also execute the pip install -r requirements.txt command within the cluster-scoped init script, the request to access the local workspace file system is routed through the proxy server. 

 

Due to the proxy configuration, the server blocks these local requests, causing the cluster startup to fail.

 

Solution

Add the following line to your proxy init script. This configuration bypasses the proxy for local addresses (localhost and 127.0.0.1), allowing the cluster to access the workspace file system directly.

 

export no_proxy=localhost,127.0.0.1

 

Restart the cluster to apply the changes.