Configuration & Administration

Expand all | Collapse all

Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

  • 1.  Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 04-25-2018 09:38 AM
      |   view attached
    I've installed Zenoss 6.1.1 and 6.1.2 both having the same results with the search bar error.  If i type in the device name correctly it will show the device.  If i type part of the name it may or may not provide a valid search result and may or may not provide that error...  AttributeError: 'NoneType' object has no attribute 'lower'

    In version 6.1.1 i imported a device list from our older 5.3.3 version however in the 6.1.2 deployment i did a network discovery and still experienced this issue.  Has anyone had a similar issue or is it something i did during install?

    You can see in the attachment the actual error that displays, again sometimes i can get an error but see results i was hoping for but other times it simply will not return the device in the search unless i have the exact full name of the device ID.

    ------------------------------
    Nick Barker
    Systems Administrator
    ------------------------------


  • 2.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 05-07-2018 02:44 PM
    same issues here. did you find a solution?

    ------------------------------
    Jonathan Colon
    Universidad del Turabo
    ------------------------------



  • 3.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 05-08-2018 04:55 PM
    https://jira.zenoss.com/browse/ZEN-30044

    ------------------------------
    Jonathan Colon
    Universidad del Turabo
    ------------------------------



  • 4.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 05-09-2018 08:15 AM
    I had never used the Zenoss JIRA before.  I created an account but it will not let me view what you sent along.  I have not found a fix for it, we've just had to either remember IP's or complete hostnames to search and it will usually find it.

    ------------------------------
    Nick Barker
    Systems Administrator
    ------------------------------



  • 5.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 05-16-2018 09:23 AM
    This is frustrating on JIRA.  I have been asking for years that JIRA tickets default to public viewing so others can see issues.  When Andrew was the community manager, we all used to send him a note as soon as we had opened a JIRA ticket and he had a more-or-less instant way to make this public.  @John - can you continue this service for the community?

    Thanks,
    jane​​​

    ------------------------------
    Jane Curry
    Skills 1st United Kingdom
    jane.curry@skills-1st.co.uk
    ------------------------------



  • 6.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 05-16-2018 09:44 AM

    Hello @Jane. As we have discussed numerous times​ the process has not changed. Email your ticket and I will have it made public. They key is emailing the ticket. Based on ZenMaster feedback I raised and continue to voice the need for these to be visible to the person that logged the ticket. But I have not received any JIRA ticket numbers from you or others in a while. So please leverage the process for new issues moving forward.

    As you already know...Zenoss Community Edition (Core) is the freemium version of Zenoss. Zenoss Support comes with Enterprise but we look at all JIRA issues since Core is release with and is a subset of the Enterprise feature set.



    ------------------------------
    John Boyle
    Technology Partnerships & Community Manager
    Zenoss
    Austin TX
    jboyle@zenoss.com
    http://www.zenoss.com
    ------------------------------



  • 7.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 05-16-2018 09:31 AM

    Hello @Nick! Open your ticket and shoot the JIRA number to me. Agreed these should be accessible to you and I voice this often internally. Key is to send me the link. This has not changed. Additionally I can track it them and review in the weekly meetings. My email is jboyle@zenoss.com. Always reach out to me with any questions.

    JB​



    ------------------------------
    John Boyle
    Technology Partnerships & Community Manager
    Zenoss
    Austin TX
    jboyle@zenoss.com
    http://www.zenoss.com
    ------------------------------



  • 8.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 05-16-2018 09:32 AM
    Thanks @John :)
    Cheers,
    jane​

    ------------------------------
    Jane Curry
    Skills 1st United Kingdom
    jane.curry@skills-1st.co.uk
    ------------------------------



  • 9.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 05-16-2018 09:45 AM
    @Jane Cheers back. Email me any you have on your list. Happy to help!

    JB​

    ------------------------------
    John Boyle
    Technology Partnerships & Community Manager
    Zenoss
    Austin TX
    jboyle@zenoss.com
    http://www.zenoss.com
    ------------------------------



  • 10.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 05-16-2018 09:46 AM
    Thank you for your time and the information.  @Jane and @John​​ I've created the JIRA ticket under my account.  ZEN-30076

    Please let me know if there is any information or anything i can test/try.  I can easily spin up a secondary system to play with.

    ------------------------------
    Nick Barker
    Systems Administrator
    ------------------------------



  • 11.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 05-16-2018 09:56 AM

    Thanks @Nick. I updated the ticket and added a question for you. Please make sure you can access the ticket ok.

    Cheers!

    JB​



    ------------------------------
    John Boyle
    Technology Partnerships & Community Manager
    Zenoss
    Austin TX
    jboyle@zenoss.com
    http://www.zenoss.com
    ------------------------------



  • 12.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 06-06-2018 01:24 PM

    Dear All,
    I currently have exactly same issue as Nick. I've migrated system from Zenoss Core 5.3.3 to Zenoss Core 6.1.2. I tried to re-index device directory however without success:

    serviced service attach zope su - zenoss
    zencatalog run --createcatalog --forceindex

    After successful re-index run, the search has been checked. Unfortunately nothing has changed. I'm still getting errors when I'm trying to search devices. When I enter full name in device search (top right corner) it works, but when device name is not completed error is displayed (similar to poskey errors - yellow bar). It looks to me that that issue concerns solr. I checked jira and issue is still open. Maybe I should remove solr database and try to recreate it. I will be grateful for help,

    Thanks in advance
    Best Regards

    J.K



    ------------------------------
    Janusz Kujawa
    Cloud Management System Administrator
    Wrocław
    ------------------------------



  • 13.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 06-11-2018 12:51 AM

    Dear All,
    From what I was able to notice above problem is focused on codding inside following ZenPacks.zenoss.DeviceSearch. Is there anyone who fixed this issue since now? I tried to solve issue without reprogram Zenpack like using such as tools: zodbscan,zenrelactionscan,findposkeyerror,zencatalogscan, reindex solr and zenoss catalog, but my story did not end well. Have any of you tried the earlier version DeviceSearch?

    Thank you!



    ------------------------------
    Janusz Kujawa
    Cloud Management System Administrator
    Wrocław
    ------------------------------



  • 14.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 06-29-2018 07:44 PM

    WARNING

    First, for others reading this thread, do not run the following commands unless you know what you are doing and expect downtime.

    serviced service attach zope su - zenoss
    zencatalog run --createcatalog --forceindex

    This rebuilds your catalog, during this time the catalog in not available and anything that uses the catalog will not work properly. (Which is almost everything)

    ------------------------------
    jstanley
    ------------------------------



  • 15.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 06-29-2018 07:51 PM
    I am not able to duplicate this problem in 6.2, 6.1.2 and 6.1.0.

    ZenPacks.zenoss.DeviceSearch is an old ZenPack and I do not think it is needed or supported in Zenoss 6.x (Not sure about 5.x, I dont use 5 anymore)

    @Nick, if you can duplicate the issue and then either look in Kibana for the full error and post it, I could help troubleshoot more.​

    ------------------------------
    jstanley
    ------------------------------



  • 16.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 06-30-2018 07:25 AM
    We actually never had the search issue in 4.x or 5.x

    It surfaced for me in 6.1 and 6.1.2, unfortunately it's going to be a while until I can upgrade to 6.2 and see if it fixes it but that's going to be my next step when my work schedule allows time to do so.

    Thanks everyone for your time and input.

    ------------------------------
    Nick Barker
    Systems Administrator
    ------------------------------



  • 17.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 07-02-2018 08:12 AM
    Hey @Nick, have you by chance ran the toolbox scans?

    Under the Zenoss RM  Upgrade Guide, the section Using Zenoss Toolbox

    Using Zenoss Toolbox
    Zenoss remove preview
    Using Zenoss Toolbox
    This appendix provides an introduction to the Zenoss Toolbox, which is included in Resource Manager. For up-to-date information, refer to the Zenoss Toolbox KnowledgeBase article.
    View this on Zenoss >


    ------------------------------
    jstanley
    ------------------------------



  • 18.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 07-02-2018 08:32 AM
    @Jay​ I did run these tools when i first noticed the searching issues.  I have had success with these tools helping me with other issues before but this time it didn't help.  I really appreciate the contact and attempts to gather more information.  I have recently been assigned to work other things so this is on the back burner for now but will be sure to return and update you all ASAP.

    ------------------------------
    Nick Barker
    Systems Administrator
    ------------------------------



  • 19.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 07-02-2018 10:01 AM
    Sounds good, if you want to troubleshoot more, post the error from the event.log

    Duplicate the error, then search in kibana for it

    message: "AttributeError: 'NoneType' object has no attribute 'lower'"

    Scrub any company data before posting :)


    ------------------------------
    jstanley
    ------------------------------



  • 20.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 07-23-2018 09:16 AM
    Edited by David de Sousa 07-23-2018 09:19 AM

    I still fell this problem
    Any progress in a solution?

    As a college pointed to me the problem looks like in ...

    File "/opt/zenoss/Products/Zuul/search/facades.py", line 117, in _compareCategories
    cat1 = result1.category.lower()
    result1.category é None





    ...............................
    below the kibana logs
    ...............................
    ...............................


    @timestamp   
    July 23rd 2018, 11:59:35.000
    t@version   
    1
    t_id   
    AWTGlL4QPTUQgYOobKEM
    t_index   
    logstash-2018.07.23
    #_score   
    t_type   
    log
    ?beat.hostname     
    1b42e8b40a0b
    ?beat.name     
    1b42e8b40a0b
    ?beat.version     
    5.3.2
    ?fields.ccWorkerID     
    43c40d43
    ?fields.hostips     
    x.x.x.x 172.17.0.1
    ?fields.instance     
    0
    ?fields.poolid     
    default
    ?fields.service     
    7aog186dg3qj9vp6e426i4qws
    ?fields.servicepath     
    /Zenoss.core/Zenoss/User Interface/Zope
    ?fields.type     
    zope_eventlog
    ?file     
    /opt/zenoss/log/event.log
    thost   
    1b42e8b40a0b
    ?input_type     
    log
    ?logger     
    extdirect
    ?loglevel     
    INFO
    tmessage   
    2018-07-23T10:59:35 INFO extdirect DirectRouter suppressed the following exception (Response ef3e2532-b5c3-414b-9925-34dbd46b72d2): Traceback (most recent call last): File "/opt/zenoss/Products/ZenUtils/extdirect/router.py", line 184, in _processDirectRequest response.result = _targetfn(**data) File "/opt/zenoss/Products/Zuul/search/routers.py", line 98, in getLiveResults _RESULT_SORTER, maxResults=maxResults) File "/opt/zenoss/Products/Zuul/search/facades.py", line 340, in getQuickSearchResults maxResults=maxResults) File "/opt/zenoss/Products/Zuul/search/facades.py", line 239, in _getSearchResults maxResults=maxResults File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.DeviceSearch-1.2.3-py2.7.egg/ZenPacks/zenoss/DeviceSearch/device/adapters.py", line 133, in getSearchResults filterFn, maxResults) File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.DeviceSearch-1.2.3-py2.7.egg/ZenPacks/zenoss/DeviceSearch/device/adapters.py", line 77, in _getSearchResultsFromModelCatalog results = sorter.limitSort(results) File "/opt/zenoss/Products/Zuul/search/facades.py", line 155, in limitSort results.sort(self.comparator) File "/opt/zenoss/Products/Zuul/search/facades.py", line 111, in __call__ result = self._compareCategories( result1, result2 ) File "/opt/zenoss/Products/Zuul/search/facades.py", line 117, in _compareCategories cat1 = result1.category.lower() AttributeError: 'NoneType' object has no attribute 'lower', DirectRouter suppressed the following exception (Response ef3e2532-b5c3-414b-9925-34dbd46b72d2): Traceback (most recent call last): File "/opt/zenoss/Products/ZenUtils/extdirect/router.py", line 184, in _processDirectRequest response.result = _targetfn(**data) File "/opt/zenoss/Products/Zuul/search/routers.py", line 98, in getLiveResults _RESULT_SORTER, maxResults=maxResults) File "/opt/zenoss/Products/Zuul/search/facades.py", line 340, in getQuickSearchResults maxResults=maxResults) File "/opt/zenoss/Products/Zuul/search/facades.py", line 239, in _getSearchResults maxResults=maxResults File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.DeviceSearch-1.2.3-py2.7.egg/ZenPacks/zenoss/DeviceSearch/device/adapters.py", line 133, in getSearchResults filterFn, maxResults) File "/opt/zenoss/ZenPacks/ZenPacks.zenoss.DeviceSearch-1.2.3-py2.7.egg/ZenPacks/zenoss/DeviceSearch/device/adapters.py", line 77, in _getSearchResultsFromModelCatalog results = sorter.limitSort(results) File "/opt/zenoss/Products/Zuul/search/facades.py", line 155, in limitSort results.sort(self.comparator) File "/opt/zenoss/Products/Zuul/search/facades.py", line 111, in __call__ result = self._compareCategories( result1, result2 ) File "/opt/zenoss/Products/Zuul/search/facades.py", line 117, in _compareCategories cat1 = result1.category.lower() AttributeError: 'NoneType' object has no attribute 'lower'
    ?offset   
    19026, 19061, 19156, 19196, 19277, 19320, 19409, 19436, 19521, 19547, 19701, 19727, 19897, 19937, 20014, 20048, 20124, 20181, 20267, 20303, 20362
    ?rcvd_datetime     
    2018-07-23T09:59:44.841Z
    ?tags     
    beats_input_codec_plain_applied, multiline
    ?type     
    log


    ------------------------------
    David de Sousa
    NOS Madeira
    ------------------------------



  • 21.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 07-23-2018 12:13 PM
    @David, what version of Zenoss?​

    ------------------------------
    jstanley
    ------------------------------



  • 22.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 07-24-2018 11:39 AM
    Hi,
    At the moment have 6.2.0.

    But the original set was on 5.3.3 ... when the upgrade to 6.x failed .. probably due to the reidexing needed in v6  ... we've noticed a lot of dangling and ToManyContRelationship when trying exports.

    So we've installed a fresh new 6.2.0 installation but with the controlled export of  users, triggers/notification events class and devices list/groups... from the 6.1.1 set.

    Apart from a few issues like v1 devices not being able to display snmp online or devices with many interfaces that not display none at all, this search issue is another problem that we have.

    This AttributeError NoneType started to be noticed since version 6.x.

    Tell me if you need some more debug or info
    Thanks for the help









    ------------------------------
    David de Sousa
    NOS Madeira
    ------------------------------



  • 23.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 07-24-2018 03:34 PM
    I don't think 6.x uses ZenPacks.zenoss.DeviceSearch. I checked my instances and I do not have that ZenPack installed.

    Take a backup and then remove that ZP and see if it fixes your issue


    ------------------------------
    jstanley
    ------------------------------



  • 24.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 07-25-2018 07:01 AM
    I too failed to do the upgrade from 5.x to 6.x back when I was working on this effort full time.  I appreciate all the ideas/suggestions and will absolutely get involved with additional troubleshooting as time permits at work.  Good luck!!

    ------------------------------
    Nick Barker
    Systems Administrator
    ------------------------------



  • 25.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 07-27-2018 05:25 AM
    Hi,
    If I remove the ZenPacks.zenoss.DeviceSearch

    The search box also disappears. If there is no search option I do not have the problem of course.
    zenoss search box
    But this is not the desired ... We want to keep the search and have no erros when searching for something.

    In zenoss.core (or community) v6.x ... by default this field exists. And I guess that the problem is only from devices list from version previous than 6.
    In a small test I recall adding a new device in a fresh install and not having erros . (a device name that normally returns errs in production)
    I reckon that the problem is duo do the devices tree structure (categories ???) that we may have in version 5 and has exported to v6



    ------------------------------
    David de Sousa
    NOS Madeira
    ------------------------------



  • 26.  RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'

    Posted 08-07-2018 11:01 AM
    Have tried to revert to :
    DeviceSearch-1.2.2
    or
    DeviceSearch-1.2.4(dev)

    but not luck .. still the same.  ... error ....

    ------------------------------
    David de Sousa
    NOS Madeira
    ------------------------------