Warning: Cannot use a scalar value as an array in /etc/inc/util.inc on line 326



  • Hi guys,

    running into a problem right now:

    just updated the "arping" package from the GUI with package reinstall. Now the GUI issnt working any more. Restating it via SSH I am getting the following errors:

    
    Restarting webConfigurator...pw: empty password read on file descriptor 0
    pw: empty password read on file descriptor 0
     done.
    
    *** Welcome to pfSense 1.2.3-RELEASE-pfSense on  ***
    
    Warning: Cannot use a scalar value as an array in /etc/inc/util.inc on line 326
    
    Warning: Invalid argument supplied for foreach() in /etc/inc/util.inc on line 326
    
    

    The WebGUI config is completely gone, I tried to reset the PW - no success. I cant log in; admin:pfsense issnt working; as well as an empty password. Is even on port 80; even though it should be at 443.

    Everything else is working fine. Any tip to solve this other then brute force (factory reset or reinstall)?

    Thanks,
    Helge


  • Rebel Alliance Developer Netgate

    It looks more like the filesystem is corrupt - those are typically errors you see if the passwd file is missing, and if the config is corrupt.

    The array error indicates that the "interfaces" array is empty, which can't happen unless the entire config was tossed out as corrupt/unloadable.



  • I have run into the same problem …

    I also have updated the arping package this same thing as happened to me. I have been able to view the xml remotely through ssh and can confirm that everything is there.

    My webGUI defaulted back to the "standard" theme from a fresh install after this happened as well. The machine is still functioning properly. Have not restarted anything yet .. wanted to do some poking around first.

    -Josh


  • Rebel Alliance Developer Netgate

    The system log should contain something to explain why it happened.



  • Feb  8 11:33:26 fsc-pfsense php: /antivirus.php: Antivirus: Starting file '/var/squid' scanner. Log file is '/var/log/clamscan.log'. Wait 5-10 minutes.
    Feb  8 11:34:53 fsc-pfsense php: /pkg_mgr_install.php: Beginning package installation for Dashboard Widget: Antivirus Status.
    Feb  8 11:35:06 fsc-pfsense php: /pkg_mgr_install.php: Beginning package installation for Dashboard Widget: HAVP.
    Feb  8 11:32:29 fsc-pfsense last message repeated 3 times
    Feb  8 11:39:19 fsc-pfsense php: /antivirus.php: Antivirus: Starting file '/var/squid' scanner. Log file is '/var/log/clamscan.log'. Wait 5-10 minutes.
    Feb  8 11:43:22 fsc-pfsense php: /pkg_mgr_install.php: cd /var/db/pkg && pkg_delete ls | grep
    Feb  8 11:43:22 fsc-pfsense php: /pkg_mgr_install.php: cd /var/db/pkg && pkg_delete ls | grep arping
    Feb  8 11:43:23 fsc-pfsense php: /pkg_mgr_install.php: Beginning package installation for arping.
    Feb  8 11:43:25 fsc-pfsense php: /pkg_mgr_install.php: XML error: not well-formed (invalid token) at line 731
    Feb  8 11:42:53 fsc-pfsense dnsmasq[768]: reading /var/dhcpd/var/db/dhcpd.leases
    
    

    I also installed the AV status widget .. and HAVP widget for the "Dashboard".

    Come to think of it now … i think that this actually happened when I hit the save setting on the "dashboard" to save the widget layout.

    Any suggestions as to what to do next?

    Thanks,
    Josh


  • Rebel Alliance Developer Netgate

    I don't see any way that the arping package could have changed anything in that way, and it hasn't been updated (aside from correcting some minor text-only formatting) in several months.

    The system log is complaining about a specific line in the config that isn't formatted properly - you should see what is on that line.



  • @jimp:

    The system log is complaining about a specific line in the config that isn't formatted properly - you should see what is on that line.

    You are referring to my config.xml correct?

    -Josh


  • Rebel Alliance Developer Netgate

    yes



  • @jimp:

    yes

    
    723 <package>724                        <name>arping</name>
    725                        <descr>Broadcasts a who-has ARP packet on the network and prints answers.</descr>
    726                        <website>http://www.habets.pp.se/synscan/programs.php?prog=arping</website>
    727                        <category>Services</category>
    728                        <version>2.06.1</version>
    729                        <status>Stable</status>
    730                        <pkginfolink>731                                <0>http://doc.pfsense.org/index.php/Arping_package
    732                                <1>http://doc.pfsense.org/index.php/Arping
    733</pkginfolink> 
    734                       <required_version>1.0.1</required_version>
    735                        <config_file>http://www.pfsense.com/packages/config/arping/arping.xml</config_file>
    736                        <configurationfile>arping.xml</configurationfile>
    737                        <depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url>
    738                       <depends_on_package>arping-2.06.tbz</depends_on_package>
    739</package> 
    
    

    Here is the lines in the area that it was complaining about … this is straight out of the config read through ssh.

    @psychosematic:

    Come to think of it now … i think that this actually happened when I hit the save setting on the "dashboard" to save the widget layout.

    I also attached a couple screens of what is happening with the webgui along with the config history too. I am not totally sure what caused this to happen … like you said though I don't believe that the arping was the direct cause. It may have been the dashboard widgets after I clicked "save settings" is when everything happened.

    Thanks for all the help and patience!

    Josh





  • Rebel Alliance Developer Netgate

    ah ha. Caught the little bugger… there shouldn't be two pkginfolinks... that shouldn't have been an array, hence the explosion.

    Should be fixed in ~5 minutes once the repo syncs up with my commit.



  • @jimp:

    ah ha. Caught the little bugger… there shouldn't be two pkginfolinks... that shouldn't have been an array, hence the explosion.

    Should be fixed in ~5 minutes once the repo syncs up with my commit.

    So should I just restart the webgui from console … does that fix the gui problem as well?


  • Rebel Alliance Developer Netgate

    you could use viconfig from the console and delete this:

    730                        <pkginfolink>731                                <0>http://doc.pfsense.org/index.php/Arping_package
    732                                <1>http://doc.pfsense.org/index.php/Arping
    733</pkginfolink> 
    

    And it should be ok, then reinstall arping again.



  • @jimp:

    you could use viconfig from the console and delete this:

    730                        <pkginfolink>731                                <0>http://doc.pfsense.org/index.php/Arping_package
    732                                <1>http://doc.pfsense.org/index.php/Arping
    733</pkginfolink> 
    

    And it should be ok, then reinstall arping again.

    I have edited to config .. lines no longer there.

    I apologize for the newbness here, longtime user of pfsense but I don't really know too much about the inner workings for console commands, as I am unable to use the webgui .. would you be so kind as to let me know the syntax to install arping from console?

    Thanks again for your help!

    Josh


  • Rebel Alliance Developer Netgate

    You don't install it from the console, after you fix the config you can get back into the GUI and do it there. :)



  • @jimp:

    You don't install it from the console, after you fix the config you can get back into the GUI and do it there. :)

    AHH yes .. I just figured that out and was coming back to post … helps if I think before i speak! I appreciate the help Jim!

    Josh

    :D

    SOLVED


Log in to reply