Fog IP Address change



  • Hi all
    I’ve changed my fog ip address and I can’t rerun the installer to pick up the updated settings because I’m behind a proxy
    Installing required packages, if this fails
    make sure you have an active internet connection.

    • Adding needed repository…Failed!

    Any way to get past this, all the packages have already been installed and should just work. I had this problem last time I looked at fog, my storage nodes wouldn’t work properly.


  • Moderator

    @Wayne-Workman Sure

    The content of /etc/subversion/servers on my servers are like this:

    [global]
    http-proxy-host = 192.168.1.56
    http-proxy-port = 3128
    

    for git you can issue the following commands (from stackoverflow.com):
    git config --global http.proxy http://192.168.1.56:3128
    git config --global https.proxy https://192.168.1.56:3128

    If you really wanted to not use env variables, then wget has proxy settings in /etc/wgetrc just uncomment the proxy lines and add the appropriate values and save.


  • Moderator

    @george1421 said:

    For FOG (proper) you need to update the proxy server settings in the fog management console.

    FOG Web Interface -> FOG Configuration -> FOG Settings -> Proxy Settings

    These include FOG, svn (I assume git too),
    For SVN you need to create a file in /etc/subversion called servers and then populate it with the required settings.

    Do you have examples of these?


  • Moderator

    Since most companies that have a proxy server in their environment restrict direct internet access we have to configure linux (and fog) to communicate with the internet over the company authorized proxy server(s).

    Most command line utilities will inspect the environment variables to check to see if they need to use the proxy protocol when attempting to access files and services on the internet.

    These environment variables are http_proxy, https_proxy, and ftp_proxy (I’ve also seen these variables referenced in all upper case like HTTP_PROXY, HTTPS_PROXY and so on. To date I’ve only use the lower case env variables so I can’t say if case is important for all linux distros)

    You could add these env variables to each command invocation, but typically system admins will add them to a common logon script so they are available to anyone who logs into the linux system. Most common is to add them to the bash shell logon script /etc/bashrc To make these variables persistent in the environment they must be defined with the export function as below.

    export http_proxy=http://<proxy_server_ip>:<proxy_server_port>
    export https_proxy=http://<proxy_server_ip>:<proxy_server_port>
    export ftp_proxy=http://<proxy_server_ip>:<proxy_server_port>

    In the case of the fog installer, we need to tell the fog installer to not use the proxy protocol when attempting to connect to the fog server directly. So we must also include this env variable.

    export no_proxy="<fog_server_ip>"

    During the fog installation the installer script makes wget calls back into the running fog server for specific actions. Without the no_proxy setting the installer script would make that request to the proxy server. Some proxy servers won’t proxy requests to internal networks. So this setting is required.

    There are some command line commands that don’t inspect the env variables but require specific settings in their config files. These include FOG, svn (I assume git too), cpan, and pear. For these you will need to update the appropriate config file. For FOG (proper) you need to update the proxy server settings in the fog management console. For SVN you need to create a file in /etc/subversion called servers and then populate it with the required settings.


  • Moderator

    @george1421 Not the why part. Just the how for Linux & FOG part. :-) I know why already.


  • Moderator

    @Wayne-Workman Just to be sure I understand, you want to know about and why we use proxy servers. And then how to configure linux to use them (??).


  • Moderator

    @george1421 Could you explain the proxy stuff more? I’ve never actually had to do this, but it sounds involved after I just re-read it. I’m wanting to get this stuff into the wiki.


  • Moderator

    @george1421 said:

    @Pikmin You didn’t mention the FOG host system OS.

    But my fog servers are behind proxy servers.

    For fog itself there are proxy settings inside the FOG management gui that you need to set.

    From the OS level you need to do a few things.

    for rhel based systems you need to update bashrc and add the following to the very end.

    export http_proxy=http://<proxy_server_ip>:<proxy_server_port>
    export https_proxy=http://<proxy_server_ip>:<proxy_server_port>
    export ftp_proxy=http://<proxy_server_ip>:<proxy_server_port>
    export no_proxy="<fog_server_ip>"
    

    You also need to enabled and update the proxy settings in /etc/wgetrc

    If you are using subversion behind a proxy you will need to update the /etc/subversion/servers file with the proxy server settings.

    If you log out and back in once these changes are made FOG will download correctly and install correctly, without a bunch of crazy command line switches every time you ugrade fog.

    The key is getting wgetrc updated and then setting the environment variable to tell wget to not use the proxy for the FOG servers IP address.

    Going in the #wiki for sure.



  • It reinstalled okay by using Tom’s settings, sorry Ubuntu 14.04 and fog Version: 5666
    When I try to click on the Log Viewer from the web interface I am still receiving an error

    Fatal error: Uncaught exception ‘Exception’ with message ‘FOGFTP: Login failed. Host: 192.168.158.10, Username: fog, Password: Uwzuif0chcH5, Error: ftp_login(): Login incorrect.’ in /var/www/html/fog/lib/fog/fogftp.class.php:29 Stack trace: #0 /var/www/html/fog/lib/pages/fogconfigurationpage.class.php(635): FOGFTP->connect() #1 [internal function]: FOGConfigurationPage->log() #2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(67): call_user_func(Array) #3 /var/www/html/fog/management/index.php(24): FOGPageManager->render() #4 {main} thrown in /var/www/html/fog/lib/fog/fogftp.class.php on line 29

    I have also used your script in bashrc and specified my proxy username pass ip and port


  • Moderator

    @Pikmin You didn’t mention the FOG host system OS.

    But my fog servers are behind proxy servers.

    For fog itself there are proxy settings inside the FOG management gui that you need to set.

    From the OS level you need to do a few things.

    for rhel based systems you need to update bashrc and add the following to the very end.

    export http_proxy=http://<proxy_server_ip>:<proxy_server_port>
    export https_proxy=http://<proxy_server_ip>:<proxy_server_port>
    export ftp_proxy=http://<proxy_server_ip>:<proxy_server_port>
    export no_proxy="<fog_server_ip>"
    

    You also need to enabled and update the proxy settings in /etc/wgetrc

    If you are using subversion behind a proxy you will need to update the /etc/subversion/servers file with the proxy server settings.

    If you log out and back in once these changes are made FOG will download correctly and install correctly, without a bunch of crazy command line switches every time you ugrade fog.

    The key is getting wgetrc updated and then setting the environment variable to tell wget to not use the proxy for the FOG servers IP address.



  • I have found another topic by george 1421

    Tom suggested to use something like this:

    you could simplify the script for yourself.

    run:

    http_proxy=http://<proxy_server_ip>:<proxy_port> https_proxy=$http_proxy ftp_proxy=$http_proxy no_proxy=“localhost” ./installfog.sh -y

    So far it works, need to test storage
    Thanks


  • Moderator

    The easiest solution I’ve heard of so far is to white list your FOG’s IP in your proxy to have access to everything.

    You could also modify the code so that FOG continues even if parts of the installer fails. Look in trunk/lib/functions/common There’s some posts here about it too. I opt for white-listing the IP.


Log in to reply
 

379
Online

39197
Users

10848
Topics

103263
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.