14 Replies Latest reply on Oct 5, 2016 3:46 PM by networkbro

    Trying to add a node with the add_node.py script

    networkbro

      I get the following errors:

       

      Add an SNMP v2c node:

      /usr/lib/python2.7/site-packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html

        InsecureRequestWarning)

      Adding node 127.0.0.1... DONE!

      Traceback (most recent call last):

        File "add_node2.py", line 71, in <module>

          main()

        File "add_node2.py", line 33, in main

          nodeid = re.search('(\d+)$', results).group(0)

        File "/usr/lib64/python2.7/re.py", line 142, in search

          return _compile(pattern, flags).search(string)

      TypeError: expected string or buffer

       

      Any ideas?

        • Re: Trying to add a node with the add_node.py script
          tdanner

          After the "print('DONE')" line, add a line like this:

           

          print(results)

           

          So we can see what that string looks like. It should be a SWIS Uri, but maybe something went wrong.

            • Re: Trying to add a node with the add_node.py script
              networkbro

              {u'Message': u"Unable to create Node. Details : Information : Assigned default value 'Orion.Nodes' for EntityType.\r\nInformation : Assigned default value 'False' for DynamicIP.\r\nInformation : Assigned default value '' for Caption.\r\nError : In property EngineID. Reason : Invalid EngineID. Value : 1.\r\nInformation : Assigned default value '0' for Status.\r\nInformation : Assigned default value '' for Location.\r\nInformation : Assigned default value '' for Contact.\r\nInformation : Assigned default value '' for NodeDescription.\r\nInformation : Assigned default value '' for IOSImage.\r\nInformation : Assigned default value '' for IOSVersion.\r\nInformation : Assigned default value 'False' for UnManaged.\r\nInformation : Assigned default value 'True' for Allow64BitCounters.\r\nInformation : Assigned default value '' for SysObjectID.\r\nInformation : Assigned default value 'Unknown' for MachineType.\r\nInformation : Assigned default value 'Unknown' for Vendor.\r\nInformation : Assigned default value 'Unknown.gif' for VendorIcon.\r\nInformation : Assigned default value '120' for PollInterval.\r\nInformation : Assigned default value '2880' for RediscoveryInterval.\r\nInformation : Assigned default value '5' for StatCollection.\r\nInformation : Assigned default value '-2' for BufferBgMissThisHour.\r\nInformation : Assigned default value '-2' for BufferBgMissToday.\r\nInformation : Assigned default value '-2' for BufferHgMissThisHour.\r\nInformation : Assigned default value '-2' for BufferHgMissToday.\r\nInformation : Assigned default value '-2' for BufferLgMissThisHour.\r\nInformation : Assigned default value '-2' for BufferLgMissToday.\r\nInformation : Assigned default value '-2' for BufferMdMissThisHour.\r\nInformation : Assigned default value '-2' for BufferMdMissToday.\r\nInformation : Assigned default value '-2' for BufferNoMemThisHour.\r\nInformation : Assigned default value '-2' for BufferNoMemToday.\r\nInformation : Assigned default value '-2' for BufferSmMissThisHour.\r\nInformation : Assigned default value '-2' for BufferSmMissToday.\r\n\r\n----------------------------------", u'ExceptionType': u'System.IO.InvalidDataException', u'FullException': u"System.IO.InvalidDataException: Unable to create Node. Details : Information : Assigned default value 'Orion.Nodes' for EntityType.\r\nInformation : Assigned default value 'False' for DynamicIP.\r\nInformation : Assigned default value '' for Caption.\r\nError : In property EngineID. Reason : Invalid EngineID. Value : 1.\r\nInformation : Assigned default value '0' for Status.\r\nInformation : Assigned default value '' for Location.\r\nInformation : Assigned default value '' for Contact.\r\nInformation : Assigned default value '' for NodeDescription.\r\nInformation : Assigned default value '' for IOSImage.\r\nInformation : Assigned default value '' for IOSVersion.\r\nInformation : Assigned default value 'False' for UnManaged.\r\nInformation : Assigned default value 'True' for Allow64BitCounters.\r\nInformation : Assigned default value '' for SysObjectID.\r\nInformation : Assigned default value 'Unknown' for MachineType.\r\nInformation : Assigned default value 'Unknown' for Vendor.\r\nInformation : Assigned default value 'Unknown.gif' for VendorIcon.\r\nInformation : Assigned default value '120' for PollInterval.\r\nInformation : Assigned default value '2880' for RediscoveryInterval.\r\nInformation : Assigned default value '5' for StatCollection.\r\nInformation : Assigned default value '-2' for BufferBgMissThisHour.\r\nInformation : Assigned default value '-2' for BufferBgMissToday.\r\nInformation : Assigned default value '-2' for BufferHgMissThisHour.\r\nInformation : Assigned default value '-2' for BufferHgMissToday.\r\nInformation : Assigned default value '-2' for BufferLgMissThisHour.\r\nInformation : Assigned default value '-2' for BufferLgMissToday.\r\nInformation : Assigned default value '-2' for BufferMdMissThisHour.\r\nInformation : Assigned default value '-2' for BufferMdMissToday.\r\nInformation : Assigned default value '-2' for BufferNoMemThisHour.\r\nInformation : Assigned default value '-2' for BufferNoMemToday.\r\nInformation : Assigned default value '-2' for BufferSmMissThisHour.\r\nInformation : Assigned default value '-2' for BufferSmMissToday.\r\n\r\n----------------------------------\r\n   at SolarWinds.Data.Providers.Orion.CrudHandlers.NodeCrudHandler.Validate(IDictionary`2 columns, IEntityValidator validator, Boolean isCreate, IDictionary`2 columnsToUpdate)\r\n   at SolarWinds.Data.Providers.Orion.CrudHandlers.NodeCrudHandler.Create(IEnumerable`1 infos, Func`2 baseCall)\r\n   at SolarWinds.InformationService.Core.CrudProcessor.CreateInternal(String entityType, IDictionary`2 properties, IQueryExecutionContext context)\r\n   at SolarWinds.InformationService.Core.CrudProcessor.Create(IServiceHost serviceHost, String entityType, IDictionary`2 properties, IQueryExecutionContext context)\r\n   at SolarWinds.InformationService.Core.InformationService.Create(String entityType, IDictionary`2 properties)"}

              Traceback (most recent call last):

                File "add_node2.py", line 72, in <module>

                  main()

                File "add_node2.py", line 34, in main

                  nodeid = re.search('(\d+)$', results).group(0)

                File "/usr/lib64/python2.7/re.py", line 142, in search

                  return _compile(pattern, flags).search(string)

              TypeError: expected string or buffer