Fog - Unable to capture images - no route to host



  • Hi all,

    I’ve been researching this topic through this tech section and trying to figure out the reason behind my issue.
    For reference for this issue: Running fog on an Ubuntu client, with a separate Ubuntu client and a Windows 10 client in a virtual environment using VMWare. All vm’s can communicate with each other through pings and I have registered both clients as hosts in the fog management in the browser.

    When I try and capture an image of Ubuntu, I get a error stating "could not mount images folder (/bin/fog.upload) Can't mount image folder.PNG
    Going through the other threads I have found, I have disabled the firewall, tried changing the folder from /images to /home/fog/images and changing the permissions of the folders to fog:root.

    I followed this thread (https://forums.fogproject.org/topic/9823/mounting-images-dev-on-images-failed-permissions-denied/12) that I found from a couple of years ago since it shows the same issue as mine, but everything I have tried in there hasn’t worked for me.

    NFS-Server status NFS server status.PNG

    showmount -e showmount e.PNG

    status firewalld firewalld status.PNG im not sure if this is supposed to have the warnings. This is after I tried to disable the iptables after making a fw.stop file from another thread.

    /opt/fog/.fogsettings fogsettings file.PNG

    Fog storage settings fog server storage settings.PNG

    I’m not too sure where to go with this now since I’m not great with Linux. Any help would be appreciated.



  • @Sebastian-Roth It works! Thank you for your help.

    Starting deploying and image and ended up not having enough hard disk space (oops) but its all working correctly now. Learnt quite a bit from this experience as well. Thanks again


  • Senior Developer

    @Chimpish You might have messed with the FTP credentials while trying to fix this. Make sure you never use the account named fog (called fogproject from version 1.5.6 on) for login and working on your server as this will cause issues.

    https://wiki.fogproject.org/wiki/index.php/Troubleshoot_FTP

    Make sure you have the same password in /opt/fog/.fogsettings as well as in /var/www/html/fog/lib/fog/config.class.php and set for the fog Linux account. The password in /opt/fog/.fogsettings will be set in config.class.php and reset on the Linux account if you re-run the FOG installer.



  • @Sebastian-Roth Hi Sebastian. Thanks for going over it all again. I have some good and bad news for you this time.

    I followed the instructions in the wiki link you sent me and still had the same issue. After re-reading all your replies in order, I went back through everything. I moved the images directory back to /images in the /opt/fog/.fogsettings and /etc/exports as well as in the storage node settings.

    On the machine running fog server, i opened /etc/systemd/resolved.conf and set the dns in that to my server address.
    I also went into the host machine and removed that from a manually input IP address and set it to automatic.

    When I was in the /etc/exports file, I noticed my strings read:
    /images *(ro,async,no_wdelay,insecure_locks,no_root_squash,insecure,FSID=0)
    and
    /images/dev *(rw,async,no_wdelay,no_root_squash,insecure,FSID=1)
    so i removed the FSID parts from the strings.

    After all this, I ran the capture task again and got to this screenCapture Process.PNG

    I let it run through the capture process, then right before the end I got this pop up

    Capture process failing.PNG

    The bottom of capture process says “updating database - failed”. This pointed at /var/www/fog/lib/fog/fogftp.class.php so i opened it and took a picture of line 464 (i believe i read this right) (cursor next to the line in question) -

    fogftp line 464.PNG

    Any ideas on this one?


  • Senior Developer

    @Chimpish Sorry, had lots of work over the last days and not much time to take a thorough look at this. Re-reading the whole thread I see that I have missed an important piece of information. Changing the images directory is kind of an advanced thing within FOG because there are various places where you need to change the setting. Seems like you have properly changed /opt/fog/.fogsettings as well as the storage node settings in the web UI but the NFS exports are still pointing to the old location. Should have been fixed when you re-run the installer script after changing /opt/fog/.fogsettings but you can also do it manually. Just edit /etc/exports and restart your FOG server after that.

    I am just wondering why you decided to change the image location. Probably because your Ubuntu system was setup with a separate partition mounted to /home with more available space. Sure you can move your images to /home/fog/images to use that space but a proper way of extending your images space (moving the images to a different partition) is described in the wiki: https://wiki.fogproject.org/wiki/index.php/Add_%26_Extend_a_2nd_Virtual_HDD

    Not saying one way is correct and the other is wrong. I just think that it’s worth knowing both and having 15+ years of hands on experience with Linux I’d definitely go the way described in the wiki article.



  • @Sebastian-Roth Hi Sebastian, got a few images here to make sure i got everything covered. The network is set up to use host-only due to trialing it in a virtual environment first. Hopefully these cover everything you asked.

    VMWare virtual network settings.PNG - This is the virtual adapter for the environment the host and clients run in

    Ubuntu Client network setup.PNG - this is the clients settings

    Ubuntu Client network settings.PNG - clients settings according to the network adapter when running

    fog server network settings.PNG - fog server network settings

    Fog server DHCP Config 1.PNG - Fog server DHCP config

    Looking at the image of the DHCP config, it says “for systems with two or more ethernet devices. subnet 136.165.0.0” This would have been caused from me running the adapter as a bridged setup so I could get Fog and all the updates I needed.


  • Senior Developer

    @Chimpish Can you please post a picture of the VMware network settings of the client VM you are trying to capture?

    The fog server is serving as the dhcp server on the network, had some trouble getting it set up

    If you select the right options the FOG installer will to that for you. No need to manually do that. And from the fogsettings output you posted it looks like you have chosen to let the installer setup DHCP server for you. Can you please post the contents of your DHCP server configuration here as well. Just to make sure there is no issue in that.



  • @Sebastian-Roth the client is set to 192.168.1.2. The fog server is serving as the dhcp server on the network, had some trouble getting it set up but that was my fault for not recognising what the dhcp service was called in ubuntu. Using the systemctl stop firewalld command didn’t work, got the same screen pop-up

    @george1421 I set it so the fog server runs as the dhcp and the dns, so everything on the network should point back to it. not sure if this is correct though. As for the selinux being set to permissive, I don’t believe I have done this step yet


  • Moderator

    If the firewall is still running then did you do the other prerequisite of setting selinux to permissive? That will be you next hurdle.

    The other thing I find strange is that your FOG server/router/dns server is at the same IP address (192.168.1.1) is that accurate?


  • Senior Developer

    @Chimpish On the other hand I am wondering about the No route to host error message. That usually means that the client is in a different network subnet than the server and there is no route set on the client that would make it possible to reach the FOG server.

    What IP address is assigned to the client?? And what is serving DHCP in your network?? The FOG server or a Windows DHCP server?


  • Senior Developer

    @Chimpish Shutdown the firewall (systemctl stop firewalld) on the FOG server and try again.


Log in to reply
 

281
Online

7.4k
Users

14.5k
Topics

136.5k
Posts