Problems with multicast task



  • Hi guys,
    I’m doing some test with multicast function in FOG but… at moment, I don’t have had a good start… :(
    I have read the posts about this issue (configuration, troubleshooting, some problems …) but I don’t have find some that helpful.

    For start, when I try to restart the MulticastFOG service this get me a error:

    PHP Fatal error: Call to undefined method MulticastManager::getBanner() in /opt/fog/service/FOGMulticastManager/FOGMulticastManager on line 13

    In the log (/opt/fog/log/multicast.log) isn’t writing nothing on this day… Only I have some entries for dates ago like this:

    [03-31-16 9:54:02 am] * No tasks found!
    [03-31-16 9:54:12 am] * No tasks found!
    [03-31-16 9:54:22 am] * No tasks found!
    [03-31-16 9:54:32 am] * No tasks found!
    [03-31-16 9:54:42 am] | StorageNode Not found on this system.

    My Multicast settings in GUI are by default and the FOG_UDPCAST_INTERFACE it’s correct (I only have a interface in this server, eth0).

    0_1463138780680_Captura.PNG

    When I start a task multicast, it seems that starts successfully but when it comes to the deployment I get this error:

    0_1463138210686_FullSizeRender.jpg

    My FOG server is installed in a CentOS 6.5, the base version is 1.2.0 and SVN version is 7599.

    Any idea?

    Thank you!


  • Senior Developer

    @habu what I’m saying is its copying data that should not be there. Modifying core files only works around the issue. What I’m suggest will fix the issue permanently for you.



  • @Tom-Elliott
    But it seems to wrongly use the one in lib/fog in some cases (and so I get GetBanner() errors, and, if i comment getBanner() call out in service code, then error happens at next method invocation wait_…). After I changed its name (and its file’s name), Reflection find necessary the right class, no errors, all services started again, and multicast is working.

    Best regards,
    Javier


  • Senior Developer

    So based on that information, I suspect the copy back original files broke this for you.

    Basically copy back works by taking the backup copy and placing back. The installer then copies the new files which simply overwrites same named files.

    I think this is where things went funny in your case. Multicast manager used to reside in lib/fog and for modularity I moved Linux service files into lib/service.

    What I can try to do, then, is iterate directories and only allow my files over everything else within those folders.

    For the time being, would you mind confirming by reinstalling.

    Then remove the lib/fog/multicastmanager.class.php, then rerun the installer again

    This should fix the issue you were seeing. Or better yet would simply be to remove the /var/www/html/fog and /var/www/fog folders. Remove the backup folders with rm -rf /home/fog*BACKUP and rerun the installer.

    I prefer the latter because it will ensure no unwanted remnants will be present as it can’t create a backup and the original backup of the same name won’t be able to operate either.

    Of course if you have custom files in your fog web root, make a backup first.


  • Moderator

    I wouldn’t advise trying to modify RC1’s code base. I would advise updating to the latest RC.


  • Senior Developer

    @habu there is only one multicast manager class. That is the one supposed to be in lib/service

    The one in lib/fog should read multicast sessions, multicast sessions manager, multicast sessions association, and multicast sessions association manager. Of course without the spaces.



  • This post is deleted!


  • @Tom-Elliott
    I solved this question in my case, perhaps it may help someone.

    • FOG 1.3-RC1 on CentOS 7.0.
    • Unicast deploy working.
    • Even multicast was working.

    After a system reboot, MulticastManager didn’t start again:

    Sep 4 06:01:28 clonacion FOGMulticastManager: PHP Fatal error: Call to undefined method MulticastManager::getBanner() in /opt/fog/service/FOGMulticastManager/FOGMulticastManager on line 13

    It didn’t matter if I added a multicast task: udp-sender process didn’t start because service didn’t start before (you’ll see only one FOGMulticastManager in process list --ps–, it’s the parent which forks periodically one child process (but this one will die at GetBanned method invocation).

    If I commented GetBanner() invocation out at /opt/fog/service/FOGMulticastManager/FOGMulticastManager, then it failed at next method call to object MulticastManager.

    I found TWO “MulticastManager” class, one of them extends FOGBase (at lib/fog directory) and the other one extends FOGService (at lib/service directory). Only the last one has defined methods like GetBanner(), etc. By any reason, it uses in some cases wrongly the first one (even when it used the second one after installation because it worked before).

    So, I renamed MulticastManager class that extends FOGService to MulticastManagerService, and I changed the code to use that. After that, service FOGMulticastService starts with no problems, it works. I did the same thing with rest of services: FOGScheduler,…

    I resume (for service MulticastManager: repeat it with other services in /opt/fog/services directory):

    1. Edit /opt/fog/service/FOGMulticastManager/FogMulticastManager file: modify line 8 from $ServiceClass = FOGCore::getClass(‘MulticastManage’); to $ServiceClass = FOGCore::getClass(‘MulticastManagerService’);

    2. Rename file /var/www/html/fog/lib/service/multicastmanager.class.php to /var/www/html/fog/lib/service/multicastmanagerservice.class.php (/var/www/html/fog is the path to fog web service)

    3. Edit /var/www/html/fog/lib/service/multicastmanagerservice.class.php and modify the name of this class (line 2) from “class MulticastManager extends FOGService” to “class MulticastManagerService extends FOGService”



  • This post is deleted!


  • This post is deleted!


  • This post is deleted!


  • Seems to be a similar error than in my Thread (https://forums.fogproject.org/topic/7414/multicast-not-starting)
    array_map(): An error occurred while … …/fogcontroller.class.php
    => php settings? php version?



  • 0_1463563925271_a.PNG



  • @Tom-Elliott, I followed your instructions and all continued same :(
    Also I have tried to install the new update and not fix the problem…

    Thank you!


  • Senior Developer

    @Miguel-Palacios do me a favor and run

    mv /var/www/fog{,_back}
    ln -s /var/www/html/fog /var/www/fog
    

    Then rerun the installer please. Hopefully this will help.


  • Developer

    Anyone able to reproduce this on CentOS 6.5???



  • @Sebastian-Roth, yes… you can view here

    0_1463501789194_A.PNG

    [root@IMG-28V-LMES-20 fog]# ls -al /opt/fog/service/FOGMulticastManager/FOGMulticastManager
    -rwxr-xr-x. 1 root root 634 may 17 18:06 /opt/fog/service/FOGMulticastManager/FOGMulticastManager
    [root@IMG-28V-LMES-20 fog]# ls -al /var/www/fog/lib/service/fogservice.class.php
    -rw-r--r-- 1 apache apache 14782 may 17 17:59 /var/www/fog/lib/service/fogservice.class.php
    [root@IMG-28V-LMES-20 fog]# ls -al /var/www/fog/lib/service/multicastmanager.class.php
    -rw-r--r-- 1 apache apache 9832 may 17 17:59 /var/www/fog/lib/service/multicastmanager.class.php
    [root@IMG-28V-LMES-20 fog]# grep getBanner /var/www/fog/lib/service/fogservice.class.php
        public function getBanner() {
    

  • Developer

    Do you actually see the new version number (7659) in the blue cloud on the web interface after upgrading to the latest?

    Please run:

    ls -al /opt/fog/service/FOGMulticastManager/FOGMulticastManager
    ls -al /var/www/fog/lib/service/fogservice.class.php
    ls -al /var/www/fog/lib/service/multicastmanager.class.php
    grep getBanner /var/www/fog/lib/service/fogservice.class.php
    

    Possibly the www paths might be /var/www/html/fog/lib/...



  • @Sebastian-Roth

    [root@IMG-28V-LMES-20 fog]# rpm -qa | grep php
    php-5.6.21-1.el6.remi.x86_64
    php-common-5.6.21-1.el6.remi.x86_64
    php-fpm-5.6.21-1.el6.remi.x86_64
    php-pdo-5.6.21-1.el6.remi.x86_64
    php-mcrypt-5.6.21-1.el6.remi.x86_64
    php-process-5.6.21-1.el6.remi.x86_64
    php-cli-5.6.21-1.el6.remi.x86_64
    php-mbstring-5.6.21-1.el6.remi.x86_64
    php-pecl-zip-1.13.2-1.el6.remi.5.6.x86_64
    php-gd-5.6.21-1.el6.remi.x86_64
    php-mysqlnd-5.6.21-1.el6.remi.x86_64
    php-pecl-jsonc-1.3.9-1.el6.remi.5.6.x86_64
    

  • Developer

    @Miguel-Palacios Which version of PHP is installed? rpm -qa | grep php


Log in to reply
 

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