Menu

Can't use string ("0") as a...

Help
Radek
2012-02-22
2012-09-14
  • Radek

    Radek - 2012-02-22

    During first run of Switchmap version 12.3 I've got error

    2012/02/22 07:38:28 WriteSwitchesDirectory::WriteSwitchesFiles: writing
    /var/www/switchmap/switches/Mysia.html

    2012/02/22 07:38:28 WriteSwitchesDirectory::WriteSwitchHtmlData: called

    2012/02/22 07:38:28 WriteSwitchesDirectory::BuildSections: called

    Can't use string ("0") as a HASH ref while "strict refs" in use at
    /var/local/switchmap/WriteSwitchesDirectory.pm line 137.

    There is also warrning

    2012/02/22 07:38:28 WriteSwitchesDirectory::BuildSections: PortName = "Vl378"

    2012/02/22 07:38:28 SwitchUtils::MakeHtmlRow: called for Vl378

    2012/02/22 07:38:28 SwitchUtils::GetPortInfoCells: called

    2012/02/22 07:38:28 SwitchUtils::GetVlanNbr: called,
    DepthBelowDestinationDirectory = 1

    2012/02/22 07:38:28 SwitchUtils::GetVlanNbr: returning "routed"

    2012/02/22 07:38:28 SwitchUtils::GetPortInfoCells: returning

    2012/02/22 07:38:28 SwitchUtils::GetPortConnectedToCells: called for port
    "Vl378"

    2012/02/22 07:38:28 SwitchUtils::GetWhatViaCdp: called

    2012/02/22 07:38:28 SwitchUtils::GetWhatViaCdp: returning

    2012/02/22 07:38:28 SwitchUtils::GetPortConnectedToCells: NbrMacs = 4

    Use of uninitialized value $ThisSite::PortMacLimit in numeric gt (>) at
    /var/local/switchmap/SwitchUtils.pm line 747.

    2012/02/22 07:38:28 SwitchUtils::GetPortConnectedToCells: returning

    Perl v5.10.1, ubuntu 10.04.4 LTS 64bit

     
  • Radek

    Radek - 2012-02-22

    Helped commenting out line:

    push @LocalSwitches, '---Mysia';

     
  • Pete Siemsen

    Pete Siemsen - 2012-02-22

    I don't understand why you get the error. Might you have a 'Mysia' and a '---
    Mysia" line in your ThisSite.pm fine? If it's ok with you, please email me
    your ThisSite.pm file, to siemsen@ucar.edu.

    For the warning, it looks like your ThisSite.pm file doesn't define
    $PortMacLimit. The new ThisSite.pm file in version 12.3 defines 5 new
    variables. The quick fix is to add these 5 lines to the bottom of your
    ThisSite.pm:

    %ManufacturersApprovedForPoe = ();

    $ShowCdpName = 0;

    $ShowOnlyActiveNonTrunkPortsInCsv = 0;

    $ArpWatchFile = 0;

    $PortMacLimit = 1000;

     
  • Radek

    Radek - 2012-02-24

    I will mail you shortly.

    I added missing config lines and warring is gone.

    Can I have one suggestion? Can you add another one config value to decide if i
    want to use DNS for switches ip or not?

    Now I have to edit SwitchMap.pl and change

    MacIpTables::initialize(1); # read MacList file or OpenView file

    to

    MacIpTables::initialize(0); # read MacList file or OpenView file

     
  • Radek

    Radek - 2012-02-24

    SwitchMap 12.4 have this problem fixed.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.