Fog 1.1.0 multicast sits at "Starting to restore image (-) to device (/dev/sda1)



  • I am working with 2 machines

    Regular unicast works perfectly fine.
    Group unicast works perfectly fine

    The two machines are different types of hardware, but they have the same image attached to each host and the group has the correct image attached to it.

    When i put them into their own groups (like each group has 1 machine in it), multicast works fine
    When i try to multicast to the group of 2, thats when it doesnt work.

    The machines get to The blue screen with
    [B]PartClone v0.2.69 [url]http://partclone.org[/url] [/B]
    [B]Starting to restore image (-) to device (/dev/sda1)[/B]

    They just hang there. Im on ubuntu server 12.04.

    In my apache log, i do see the following:
    [Wed Jun 11 12:00:46 2014] [error] [client 10.103.50.145] PHP Warning: mysqli::mysqli(): (HY000/2002): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /var/www/fog/lib/db/MySQL.class.php on line 64
    [Wed Jun 11 12:00:46 2014] [error] [client 10.103.50.145] PHP Warning: mysqli::select_db(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 165
    [Wed Jun 11 12:00:46 2014] [error] [client 10.103.50.145] PHP Warning: mysqli::query(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 89
    [Wed Jun 11 12:00:46 2014] [error] [client 10.103.50.145] PHP Warning: MySQL::sqlerror(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 180
    [Wed Jun 11 12:00:46 2014] [error] [client 10.103.50.145] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/fog/lib/db/MySQL.class.php on line 150

    I set up mysql with a blank password, so not sure what this could be. I have changed the fog password (on the web interface, for tftp, and with linux command line).
    I do note that i have to manually start the FogMulticastManager service when i want to try anything with multicast (even the group with 1 machine wont multicast unless i do this). Unfortunately it doesnt fix the group multicast with 2 machines.

    I had ran the following command on ther server for testing purposes:
    cat “/images/hp4000/rec.img.000”|/usr/local/sbin/udp-sender --min-receivers 2 --portbase 60512 --interface eth0 --full-duplex --ttl 32 --nokbd;cat “/images/hp4000/sys.img.000”|/usr/local/sbin/udp-sender --min-receivers 2 --portbase 60512 --interface eth0 --full-duplex --ttl 32 --nokbd;

    Note the hp4000 folder is where my image is. the port was a port i used before. When I put the clients into debug mode, I ran the following on them:
    udp-receiver --portbase 60512 --mcast-rdv-address 10.1.1.242
    On the server, it did see that it got a connection:
    New connection from 10.103.50.145 (#0) 00000009
    New connection from 10.103.50.29 (#1) 00000009
    Starting transfer: 00000009
    Timeout notAnswered=[0,1] notReady=[0,1] nrAns=0 nrRead=0 nrPart=2 avg=10000
    Timeout notAnswered=[0,1] notReady=[0,1] nrAns=0 nrRead=0 nrPart=2 avg=10000
    Timeout notAnswered=[0,1] notReady=[0,1] nrAns=0 nrRead=0 nrPart=2 avg=10000
    Timeout notAnswered=[0,1] notReady=[0,1] nrAns=0 nrRead=0 nrPart=2 avg=10000
    Bad command 0200
    Bad command 0200

    So i ran the command on one machine and got the first line. Then i ran on second and got second line
    At that point it started the transfer on its own. On the clients, it said “press any key to receive data”. I hadnt pressed that yet. When i did, i got the “Bad command” lines. The Timeout notAnswered lines showed up on their own.

    When i try the actual deploy task in fog web console, here is what i see from my multicast.log log:
    [06-11-14 2:53:29 pm] | Task (17) Multicast Group Quick Deploy is new!
    [06-11-14 2:53:29 pm] | Task (17) Multicast Group Quick Deploy image file found.
    [06-11-14 2:53:29 pm] | Task (17) Multicast Group Quick Deploy client(s) found.
    [06-11-14 2:53:29 pm] | Task (17) Multicast Group Quick Deploy sending on base port: 60512
    [06-11-14 2:53:29 pm] CMD: cat “/images/hp4000/rec.img.000”|/usr/local/sbin/udp-sender --min-receivers 2 --portbase 60512 --interface eth0 --full-duplex --ttl 32 --nokbd;cat “/images/hp4000/sys.img.000”|/usr/local/sbin/udp-sender --min-receivers 2 --portbase 60512 --interface eth0 --full-duplex --ttl 32 --nokbd;
    [06-11-14 2:53:29 pm] | Task (17) Multicast Group Quick Deploy has started.
    [06-11-14 2:53:39 pm] | Task (17) Multicast Group Quick Deploy is already running PID 2628
    [06-11-14 2:53:49 pm] | Task (17) Multicast Group Quick Deploy is already running PID 2628

    I see the “is already running” every 10 seconds until i delete the task. Nothing else pops up, even when clients try to multicast.
    Im hoping someone has seen this same problem. Until then, group unicast works fine, and i will probably have people use the capone deploy.
    Thanks again devs for making this, I know i only show up when i have problems, but this is really great software
    Let me know if you need picturs, or you want other log data.


  • Senior Developer

    Yes, there’s a syntactically incorrect sql stament.

    The statement should be:
    [code]delete from tasks where taskTypeID=‘8’;[/code]


  • Developer

    Syntax should be:
    [CODE]delete from tasks WHERE taskTypeID=‘8’;[/CODE]

    Be aware that this sql statement deletes stuff from your database and you won’t be able to get those entries back easily! I am not saying that you should not delete. Just want to make sure you know what you do!



  • I tried this and get an error when running the delete commands after successfully running the truncate commands. "error 1064 (42000): you have an error in your sql syntax…check … for the right syntax to use near ‘* from tasks WHERE taskTypeID=‘8’’

    I was just copying from the post so not sure if there was a typo.

    Thanks,
    Caleb


  • Senior Developer

    I’m aware that people are still having issues.

    As such,

    If you add the necessary components to the rc.local file for your particular OS, things should work as expected.

    The first steps seem to me that you would need to disable services to don’t start properly at boot time.

    These services, in my knowledge, consists of:

    tftpd-hpa (ubuntu), mysql (ubuntu), FOGMulticastManager, FOGSnapinReplicator, FOGImageReplicator, and FOGScheduler.

    I’d also like to state that this issue only appears (from the capabilities I’ve found) to happen with OS’s that deal with startup scripts through the use of systemd (e.g. systemctl) and does not seem to affect sysvinit as programs are started on a priority list rather than dependent upon the startup of devices/networking while the main program starts first.

    The step’s I’d take to do this:

    For Ubuntu/Debian based on systemd run
    [code]sudo update-rc.d mysql remove
    sudo update-rc.d tftpd-hpa remove
    sudo update-rc.d FOGMulticastManager remove
    sudo update-rc.d FOGImageReplicator remove
    sudo update-rc.d FOGScheduler remove

    only if on current version of SVN that contains snapinreplicator

    sudo update-rc.d FOGSnapinReplicator remove

    #Run these just to ensure things are truly off
    sudo sysv-rc-conf tftpd-hpa off
    sudo sysv-rc-conf mysql off
    sudo sysv-rc-conf FOGMulticastManager off
    sudo sysv-rc-conf FOGImageReplicator off
    sudo sysv-rc-conf FOGScheduler off

    Only if on current version of SVN that contains SnapinReplicator

    sudo sysv-rc-conf FOGSnapinReplicator off
    [/code]

    Then edit the /etc/rc.local so it looks like:
    [code]#!/bin/bash
    sleep 30
    systemctl start tftpd-hpa
    systemctl start mysql
    systemctl start FOGMulticastManager
    systemctl start FOGScheduler
    systemctl start FOGSnapinReplicator
    systemctl start FOGImageReplicator
    exit 0[/code]

    Then edit the /etc/rc.local (on ubuntu) or /etc/rc.d/rc.local (Fedora/Maybe Centos/Redhat 7?)
    Add the lines (before exit 0). If the file is being created you’ll need to add the exit 0 as the last line.

    For Fedora/CentOS/Redhat
    [code]systemctl disable FOG{MulticastManager,Scheduler,SnapinReplicator,ImageReplicator}[/code]
    Edit /etc/rc.d/rc.local (unless /etc/rc.local exists in which case us /etc/rc.local)
    If /etc/rc.local does not exist, first run:
    [code]touch /etc/rc.d/rc.local;chmod +x /etc/rc.d/rc.local[/code]
    Then edit the file and make it look like:
    [code]#!/bin/bash
    sleep 30
    systemctl start FOGMulticastManager
    systemctl start FOGScheduler
    systemctl start FOGSnapinReplicator
    systemctl start FOGImageReplicator
    exit 0[/code]



  • Hey Guys, Just wondering if people are still having this problem with newer versions of svn (2923). Tom is this something you have time to look at amongst everything else you do?

    Thanks



  • This works for me on svn 2765 as suggested by Tom but this is not permanent. Multicast always breaks when the server restarted and clients stuck at “Starting to restore image screen…” Does anyone know how to make it permanent? Thank you.
    [QUOTE]sudo service FOGMulticastManager stop && sleep 30 && sudo service FOGMulticastManager start[/QUOTE]



  • Thanks for the suggestion Bobfrid, but unfortunattely i had my FOG_UDPCAST_INTERFACE set to eth0 ,and this is the correct interface.



  • Not sure this is related to any of the previous issues in the thread, but I had several Ubuntu 14.04 Fog servers using 1.2.0 that would unicast perfectly but get “starting to restore image” when multicasting.

    I finally found that the FOG_UDPCAST_INTERFACE value under Multicast Settings was wrong. It was set to eth0 while my adapter was eth1. Not sure how I managed that, but hope it helps someone.



  • [quote=“Tom Elliott, post: 36435, member: 7271”]I’m aware of a problem with multicast starting and the only work around I have found is to truncate your multicastSessions and multicastSessionsAssoc tables. On the fog server, kill all the current udp-sender processes.

    [code]mysql -u root [ -p’PASSWORDHERE’ #only if you have a mysql password] fog
    truncate table multicastSessions;
    truncate table multicastSessionsAssoc;
    delete * from tasks WHERE taskTypeID=‘8’;
    exit;
    sudo killall udp-sender; sudo killall udp-sender; sudo killall udp-sender
    sudo service FOGMulticastManager restart;[/code]

    Then recreate your multicast task (not the one to “join” session). All should work.[/quote]
    Hi

    I tried it but without success, it stays blocked at “starting to restore image”



  • Has there been any news on this on development point of view?



  • No sorry i had no luck. multicast still not working. unicast for create/deploy an image are working. he still hangs at the same point at the partclone screen. I also tried debug mode - everything looks fine, no errors on screen until this point.


  • Senior Developer

    I’m aware of a problem with multicast starting and the only work around I have found is to truncate your multicastSessions and multicastSessionsAssoc tables. On the fog server, kill all the current udp-sender processes.

    [code]mysql -u root [ -p’PASSWORDHERE’ #only if you have a mysql password] fog
    truncate table multicastSessions;
    truncate table multicastSessionsAssoc;
    delete * from tasks WHERE taskTypeID=‘8’;
    exit;
    sudo killall udp-sender; sudo killall udp-sender; sudo killall udp-sender
    sudo service FOGMulticastManager restart;[/code]

    Then recreate your multicast task (not the one to “join” session). All should work.



  • Hi,

    i made a complete fresh installation with Ubuntu Server 12.04.5 (and also Debian 7.5) and the lastest FOG SVN 2270 (yesterday) with in a NAT VM. I can´t do a multicast deploy of an image. I created a group and assigned one single client (NAT VM too) to this group. its not working (multicast deploy with a group to a single client also not working) . It´s starts up until it cames to the partclone screen. After this it hangs and nothing happens. With Unicast everything works fine and i can create and deploy an image.

    In the LOG-Viewer i found serveral entrys about

    [CODE][09-10-14 7:18:25 am] | Task (1) mcgroup-with-one-client is already running PID 3999
    [09-10-14 7:18:35 am] | Task (1) mcgroup-with-one-client is already running PID 3999
    [09-10-14 7:18:45 am] | Task (1) mcgroup-with-one-client is already [/CODE]

    I´m also noticed that the time is incorrect. I tried to correct it with the hints i found in the forum but it shows still the wrong time. I´am also tried to apply the patches i found here in the thread but it looks like they are already there.

    With the new SVN i found the Option Multicast-Image under “Image-Management”. When i create with this an multicast session, start the clients over pxe and select “Join Multicast Session” the multicast restore working. This is really confusing that it is working this way but not the way through the group management.

    Here the install Log:

    [CODE]Script started on Di 09 Sep 2014 13:58:57 CEST
    Debian

      ..#######:.    ..,#,..    .::##::. 
    

    .:###### .:;####:…;#;…
    …##… …##;,;##::::.##…
    ,# …##…##:::## …::
    ## .::###,##. . ##.::#.:######::.
    …##:::###::…#. … .#…#. #…#:::.
    …:####:… …##…##::## … #
    # . …##:,;##;:::#: … ##…
    .# . .:;####;::::.##:::;#:…
    # …:;###…

    ###########################################

    FOG

    Free Computer Imaging Solution

    http://www.fogproject.org/

    Developers:

    Chuck Syperski

    Jian Zhang

    Peter Gilchrist

    Tom Elliott

    GNU GPL Version 3

    ###########################################

    Version: 1.3.0 Installer/Updater

    • Found FOG Settings from previous install at: /opt/fog/.fogsettings
    • Performing upgrade using these settings…

    Starting Debian / Ubuntu / Kubuntu / Edubuntu Installtion.

    #####################################################################

    FOG now has everything it needs to setup your server, but please
    understand that this script will overwrite any setting you may
    have setup for services like DHCP, apache, pxe, tftp, and NFS.

    It is not recommended that you install this on a production system
    as this script modifies many of your system settings.

    This script should be run by the root user on Redhat or with sudo on Ubuntu.

    ** Notice ** Redhat users will need to disable SELinux and iptables in
    order to use FOG
    Please see our wiki for more information at http://www.fogproject.org/wiki

    Here are the settings FOG will use:
    Base Linux: Debian
    Detected Linux Distribution: Debian
    Installation Type: Normal Server
    Server IP Address: 192.168.83.134
    DHCP router Address: 192.168.83.2
    DHCP DNS Address: 192.168.83.2
    Interface: eth0
    Using FOG DHCP: 1
    Internationalization: 0
    Image Storage Location: /images
    Donate: 0

    Are you sure you wish to continue (Y/N) y

    Installation Started…

    Installing required packages, if this fails
    make sure you have an active internet connection.

    • Preparing apt-get

    • Installing package: apache2

    • Installing package: php5

    • Installing package: php5-json

    • Installing package: php5-gd

    • Installing package: php5-cli

    • Installing package: php5-mysql

    • Installing package: php5-curl

    • Installing package: mysql-server

      We are about to install MySQL Server on
      this server, if MySQL isn’t installed already
      you will be prompted for a root password.

      Press enter to acknowledge this message.

    Paketlisten werden gelesen…
    Abhängigkeitsbaum wird aufgebaut…
    Statusinformationen werden eingelesen…
    mysql-server ist schon die neueste Version.
    0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

    • Installing package: mysql-client
    • Installing package: isc-dhcp-server
    • Installing package: tftpd-hpa
    • Installing package: tftp-hpa
    • Installing package: nfs-kernel-server
    • Installing package: vsftpd
    • Installing package: net-tools
    • Installing package: wget
    • Installing package: xinetd
    • Installing package: sysv-rc-conf
    • Installing package: tar
    • Installing package: gzip
    • Installing package: build-essential
    • Installing package: cpp
    • Installing package: gcc
    • Installing package: g++
    • Installing package: m4
    • Installing package: htmldoc
    • Installing package: lftp
    • Installing package: openssh-server
    • Installing package: php-gettext

    Confirming package installation.

    • Checking package: apache2…OK
    • Checking package: php5…OK
    • Checking package: php5-json…OK
    • Checking package: php5-gd…OK
    • Checking package: php5-cli…OK
    • Checking package: php5-mysql…OK
    • Checking package: php5-curl…OK
    • Checking package: mysql-server…OK
    • Checking package: mysql-client…OK
    • Checking package: isc-dhcp-server…OK
    • Checking package: tftpd-hpa…OK
    • Checking package: tftp-hpa…OK
    • Checking package: nfs-kernel-server…OK
    • Checking package: vsftpd…OK
    • Checking package: net-tools…OK
    • Checking package: wget…OK
    • Checking package: xinetd…OK
    • Checking package: sysv-rc-conf…OK
    • Checking package: tar…OK
    • Checking package: gzip…OK
    • Checking package: build-essential…OK
    • Checking package: cpp…OK
    • Checking package: gcc…OK
    • Checking package: g++…OK
    • Checking package: m4…OK
    • Checking package: htmldoc…OK
    • Checking package: lftp…OK
    • Checking package: openssh-server…OK
    • Checking package: php-gettext…OK

    Configuring services.

    • Setting up and starting MySql…OK

    • Backing up user reports…OK

    • Setting up and starting Apache Web Server…OK
      You still need to install/update your database schema.
      This can be done by opening a web browser and going to:

      http://192.168.83.134/fog/management

    Press [Enter] key when database is updated/installed.

    • Configuring Fresh Clam…OK
    • Setting up storage…OK
    • Setting up and starting NFS Server…OK
    • Setting up and starting DHCP Server…OK
    • Setting up and starting TFTP and PXE Servers…OK
    • Setting up and starting VSFTP Server…OK
    • Setting up sudo settings…OK
    • Setting up FOG Snapins…OK
    • Setting up and building UDPCast…OK
    • Installing init scripts…OK
    • Setting up FOG Services…OK
    • Starting FOG Multicast Management Server…OK
    • Starting FOG Image Replicator Server…OK
    • Starting FOG Task Scheduler Server…OK
    • Setting up FOG Utils…OK

    Setup complete!

    You can now login to the FOG Management Portal using
    the information listed below. The login information
    is only if this is the first install.

    This can be done by opening a web browser and going to:

      http://192.168.83.134/fog/management
    
      Default User:
            Username: fog
            Password: password
    

    Script done on Di 09 Sep 2014 13:59:59 CEST
    [/CODE]

    I hope you can help me :)


  • Senior Developer

    [quote=“phm2000, post: 36243, member: 24664”]Hi Mentaloid

    I tried your files but same issue.
    I tried svn, same issue.
    The multicast task dissapear from list after 1 minute but individual tasks stays on active task list.[/quote]

    Have you tried making sure FOGMulticastManager service is actually running properly?

    [code]sudo service FOGMulticastManager stop && sleep 30 && sudo service FOGMulticastManager start[/code]



  • Hi Mentaloid

    I tried your files but same issue.
    I tried svn, same issue.
    The multicast task dissapear from list after 1 minute but individual tasks stays on active task list.



  • I have the same setup as phm2000 and same issue. I tried the SVN tree following this instructions [url]http://www.fogproject.org/wiki/index.php/SVN[/url]

    Unfortunattely the issue is still there.



  • 1.2.0 stock has the known issue above… if you don’t wish to use the SVN tree, then the above scripts in my previous post could be applied manually.



  • Hi

    I have the same problem with fog 1.2 and ubuntu 10.04.
    It stays at : Starting to restore image (-) to device (/dev/sda1) on my 8 computers
    Any idea

    Thanks


  • Senior Developer

    I’ve added the Daemon class and the edited FOG Service files. I appreciate the assist.


Log in to reply
 

431
Online

39184
Users

10832
Topics

103133
Posts

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