Return_gateway_groups_array undefined in 20120603-1959 build



  • I just downloaded http://snapshots.pfsense.org/FreeBSD_RELENG_8_3/i386/pfSense_HEAD/nanobsd/pfSense-2.1-DEVELOPMENT-2g-i386-nanobsd-20120603-1959.img.gz and wrote it to a CF card and put it in my test ALIX box. On logging in and starting the wizard I get:

    Fatal error: Call to undefined function return_gateway_groups_array() in /etc/inc/interfaces.inc on line 4774

    If I try again and don't use the wizard, and go to System:General Setup , same error message. Almost anything selected from the menu gives this error, including Diagnostics:Edit File - making it difficult to try and fix things up. The GUI is as good as useless.

    It looks like a number of files might need:
    require_once("gwlb.inc");

    like the recent change to rc.banner, which is in this build.
    Then interfaces.inc will be able to find return_gateway_groups_array()

    I think this will be a problem for anyone updating to this build?



  • I had this also, but I have loaded up the latest snap and it seems to be working as expected now.



  • I have this problem too



  • I used "ee" editor from the console to edit /etc/inc/interfaces.inc and comment out the offending chunk of code in get_failover_interface :

    $a_groups = return_gateway_groups_array();
    if(is_array($a_groups[$interface])) {
     /* we found a gateway group, fetch the interface or vip */
     if($a_groups[$interface][0]['vip'] <> "")
       $wanif = $a_groups[$interface][0]['vip'];
     else
       $wanif = $a_groups[$interface][0]['int'];

    return $wanif;
    }

    Removing this recently-added call to return_gateway_groups_array prevents the fatal error, and so I can now use the GUI Wizard and configure things.



  • same bug here



  • @podilarius:

    I had this also, but I have loaded up the latest snap and it seems to be working as expected now.

    Uhm ..

    but the one mentioned as 'broken' seems to be the latest (build yesterday 19:11 PM)  ;D
    I hate to do an russian-roulette to an earlier version earlier which does basiclly work ..

    Removing the offending part does work for now though.



  • The commit "Always add a link-local of fe80::1:1 when the interface is set to track" has also short-circuited some of the code in get_failover_interface - so I guess that has got into the snap http://snapshots.pfsense.org/FreeBSD_RELENG_8_3/i386/pfSense_HEAD/nanobsd/pfSense-2.1-DEVELOPMENT-2g-i386-nanobsd-20120604-0057.img.gz that just appeared.

    But I suspect that if the code runs down into the call to return_gateway_groups_array in future, then the undefined function fatal error can happen again, depending on if the calling path knows about gwlb.inc

    I see that smos has made a few other changes since that, including one which had a 1-char typo that was quickly fixed. So I'm not too sure what got into that latest snap. I'll look again for a later snapshot that I can be confident has a consistent good set of commits in it.



  • me too. I haveto re-install pf system.



  • To smos/databeestje: if you notice this post, when you are finished doing the group of changes you are currently committing and have what you think is a good consistent point to snapshot, can you kick off a build and reply here?
    I am happy to try it out tomorrow (Tuesday 5/6 Nepal time) on a test system - I just would like to know that the snapshot build has a consistent set of code to test, and that you are not half-way through doing something.



  • @phil.davis:

    I used "ee" editor from the console to edit /etc/inc/interfaces.inc and comment out the offending chunk of code in get_failover_interface :

    $a_groups = return_gateway_groups_array();
    if(is_array($a_groups[$interface])) {
     /* we found a gateway group, fetch the interface or vip */
     if($a_groups[$interface][0]['vip'] <> "")
       $wanif = $a_groups[$interface][0]['vip'];
     else
       $wanif = $a_groups[$interface][0]['int'];

    return $wanif;
    }

    Removing this recently-added call to return_gateway_groups_array prevents the fatal error, and so I can now use the GUI Wizard and configure things.

    thanx, i change this file too ))
    its work



  • This was already fixed. If you don't have the latest, please try that. If you cannot get to the autoupdate, it is also available from the console menu. After upgrade to the latest, I didn't have any problems.



  • Just realized I have gitsync turned on. So that after a new binary pull, I have it sync up with the git repos.



  • just added the include to gwlb.inc in interfaces.inc.

    Really not sure what is up with PHP and it's including of files and somehow ending up not finding the function. Very weird. I wasn't expecting this much fallout… wow.



  • My test Alix system is running:
    2.1-BETA0 (i386)
    built on Mon Jun 4 17:06:08 EDT 2012
    FreeBSD 8.3-RELEASE-p2

    I have been installing Squid and SquidGuard. Some error occurred that the dashboard wanted to tell me about:
    pfSense has detected a crash report or programming bug. Click here for more information.

    I click on the link and it tries to go to the crash_reporter code at:
    https://192.168.1.1/crash_reporter.php

    But gets the following error:
    Fatal error: Call to undefined function return_gateway_groups_array() in /etc/inc/interfaces.inc on line 4774

    I have all the code that I can see committed in GitHub. Including:
    require_once("gwlb.inc");
    in the top part of interfaces.inc

    So, there are still ways that the system cannot find return_gateway_groups_array()



  • Also in system_firmware_check.php.



  • Fatal error: Call to undefined function return_gateway_groups_array() in /etc/inc/interfaces.inc on line 4774 
    

    Also when going to system_gateways.php

    ;D

    pfSense Build Above

    2.1-BETA0 (i386)
    built on Tue Jun 5 03:06:23 EDT 2012
    FreeBSD router 8.3-RELEASE-p2 FreeBSD 8.3-RELEASE-p2 #1: Tue Jun 5 04:09:00 EDT 2012 root@FreeBSD_8.3_pfSense_2.1.snaps.pfsense.org:/usr/obj./usr/pfSensesrc/src/sys/pfSense_SMP.8 i386



  • I am running the same version and I am not having these troubles. Are you syncing with git?


  • Rebel Alliance Developer Netgate

    I am also on the latest snap and not having any issues at all.

    Be sure you clear the cache or force a page reload after getting an error like that.


Locked