{"action":"created","issue":{"url":"https://api.github.com/repos/chef-partners/azure-chef-extension/issues/126","repository_url":"https://api.github.com/repos/chef-partners/azure-chef-extension","labels_url":"https://api.github.com/repos/chef-partners/azure-chef-extension/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/chef-partners/azure-chef-extension/issues/126/comments","events_url":"https://api.github.com/repos/chef-partners/azure-chef-extension/issues/126/events","html_url":"https://github.com/chef-partners/azure-chef-extension/issues/126","id":151199654,"number":126,"title":"Installation fails behind Squid Proxy","user":{"login":"Knappek","id":18685317,"avatar_url":"https://avatars.githubusercontent.com/u/18685317?v=3","gravatar_id":"","url":"https://api.github.com/users/Knappek","html_url":"https://github.com/Knappek","followers_url":"https://api.github.com/users/Knappek/followers","following_url":"https://api.github.com/users/Knappek/following{/other_user}","gists_url":"https://api.github.com/users/Knappek/gists{/gist_id}","starred_url":"https://api.github.com/users/Knappek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Knappek/subscriptions","organizations_url":"https://api.github.com/users/Knappek/orgs","repos_url":"https://api.github.com/users/Knappek/repos","events_url":"https://api.github.com/users/Knappek/events{/privacy}","received_events_url":"https://api.github.com/users/Knappek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-04-26T17:59:44Z","updated_at":"2016-05-18T04:40:00Z","closed_at":null,"body":"I am struggling with this for a while:\r\nI use this extension and it works pretty fine if I allow Outbound Internet connection with port 80 and 443. If I restrict the outbound connection where I route every connection to the internet via a Squid proxy the installation of chef-client does not work. \r\n\r\nI added proxy configuration for the Azure VM Agent in /etc/waagent.conf and I also exported environment variables http_proxy and https_proxy. The download of the Chef Extension works, but the installation fails\r\n`\r\n2016/04/26 17:01:42 Found RuntimeSettings for Chef.Bootstrap.WindowsAzure.LinuxChefClient V 1210.12.102.1000\r\n2016/04/26 17:01:42 Spawned install.sh PID 25047\r\n2016/04/26 17:05:23 Process 25047 returned non-zero exit code (1)\r\n2016/04/26 17:05:23 Installation failed for Chef.Bootstrap.WindowsAzure.LinuxChefClient-1210.12.102.1000\r\n2016/04/26 17:05:23 Processing completed for Chef.Bootstrap.WindowsAzure.LinuxChefClient-1210.12.102.1000\r\n2016/04/26 17:05:23 Finished processing ExtensionsConfig.xml\r\n`\r\n\r\nIf I check `/var/log/azure/custom.log`, it shows\r\n`\r\n[Tue Apr 26 17:00:45 UTC 2016] Installing Azure Chef Extension gem\r\n[Tue Apr 26 17:00:45 UTC 2016] Azure Chef Extension gem installation failed\r\n/var/lib/waagent/Chef.Bootstrap.WindowsAzure.LinuxChefClient-1210.12.102.1000\r\nCall for Checking linux distributor\r\nStarting installation process:\r\n17:01:43\r\nChecking for curl...\r\nDetected curl...\r\nReading chef-client version from settings file\r\nInstalling chef-client package\r\n[Tue Apr 26 17:05:18 UTC 2016] Unable to uninstall package Chef.\r\nEnd of installation:\r\n17:05:18\r\n`\r\n\r\nIf I check the network trace with tcpdump, I can see that all traffic to chef.io does not go through the proxy. What further adjustment do I need to make?\r\n\r\nAnyway, If I try to install manually using `/var/lib/waagent/Chef.Bootstrap.WindowsAzure.LinuxChefClient-1210.12.102.1000/install.sh` it gives me the error `gem: command not found`. \r\n\r\nif I install gem manually and execute the script again, I get the following output:\r\n`\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r\n  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0\r\n100 56.4M  100 56.4M    0     0  23.4M      0  0:00:02  0:00:02 --:--:-- 56.4M\r\nwarning: /tmp/tmp.LABP95F1eY/chef: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY\r\n`\r\n\r\nIf I check `/var/log/azure/custom.log` again, it shows\r\n`\r\n/var/lib/waagent/Chef.Bootstrap.WindowsAzure.LinuxChefClient-1210.12.102.1000\r\nCall for Checking linux distributor\r\nStarting installation process:\r\n17:40:20\r\nChecking for curl...\r\nDetected curl...\r\nReading chef-client version from settings file\r\nInstalling chef-client package\r\nPreparing...                          ########################################\r\nUpdating / installing...\r\nchef-12.7.2-1.el7                     ########################################\r\nThank you for installing Chef!\r\n[Tue Apr 26 17:40:29 UTC 2016] Package Chef installed successfully.\r\nEnd of installation:\r\n17:40:29\r\n[Tue Apr 26 17:40:29 UTC 2016] Installing Azure Chef Extension gem\r\nSuccessfully installed azure-chef-extension-0.0.1\r\n1 gem installed\r\n[Tue Apr 26 17:40:31 UTC 2016] Azure Chef Extension gem installation succeeded\r\n`\r\n\r\nAfter the enable script `enable.sh` is executed, finally chef-client converges successfully.\r\n\r\nSomehow, gem needs to be installed for installing Chef with this extension. But the `chef-install.sh` does not contain this part. Actually if I deploy a machine without using a proxy where I have internet connection (and where the chef extension installs chef successfully) gem will not be installed. So, how does this work? Do I really need to add a custom script extension in my ARM template where I install gem? \r\n\r\nLooking forward to hear from you :)\r\n\r\nThank you! \r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/chef-partners/azure-chef-extension/issues/comments/219923439","html_url":"https://github.com/chef-partners/azure-chef-extension/issues/126#issuecomment-219923439","issue_url":"https://api.github.com/repos/chef-partners/azure-chef-extension/issues/126","id":219923439,"user":{"login":"dheerajd-msys","id":17288094,"avatar_url":"https://avatars.githubusercontent.com/u/17288094?v=3","gravatar_id":"","url":"https://api.github.com/users/dheerajd-msys","html_url":"https://github.com/dheerajd-msys","followers_url":"https://api.github.com/users/dheerajd-msys/followers","following_url":"https://api.github.com/users/dheerajd-msys/following{/other_user}","gists_url":"https://api.github.com/users/dheerajd-msys/gists{/gist_id}","starred_url":"https://api.github.com/users/dheerajd-msys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dheerajd-msys/subscriptions","organizations_url":"https://api.github.com/users/dheerajd-msys/orgs","repos_url":"https://api.github.com/users/dheerajd-msys/repos","events_url":"https://api.github.com/users/dheerajd-msys/events{/privacy}","received_events_url":"https://api.github.com/users/dheerajd-msys/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T04:40:00Z","updated_at":"2016-05-18T04:40:00Z","body":"@Knappek,\r\nAre you facing this issue for windows also?"}}