TECHZEN Zenoss User Community ARCHIVE  

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

Subject: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Nick Barker
Posted: 2018-04-25 10:38

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
------------------------------

Attachments:

zenoss_search_error.png



Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Jonathan Colon
Posted: 2018-05-07 15:44

same issues here. did you find a solution?

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


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Jonathan Colon
Posted: 2018-05-08 17:55

https://jira.zenoss.com/browse/ZEN-30044

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


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Nick Barker
Posted: 2018-05-09 09:15

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Jane Curry
Posted: 2018-05-16 10:23

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: John Boyle
Posted: 2018-05-16 10:44

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: John Boyle
Posted: 2018-05-16 10:31

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Jane Curry
Posted: 2018-05-16 10:32

Thanks @John :)
Cheers,
jane​

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


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: John Boyle
Posted: 2018-05-16 10:45

@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
------------------------------

Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Nick Barker
Posted: 2018-05-16 10:46

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: John Boyle
Posted: 2018-05-16 10:56

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Janusz Kujawa
Posted: 2018-06-06 14:24

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Janusz Kujawa
Posted: 2018-06-11 01:51

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Jay Stanley
Posted: 2018-06-29 20:44

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Jay Stanley
Posted: 2018-06-29 20:51

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Nick Barker
Posted: 2018-06-30 08:25

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Jay Stanley
Posted: 2018-07-02 09:12

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Nick Barker
Posted: 2018-07-02 09:32

@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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Jay Stanley
Posted: 2018-07-02 11:01

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: David de Sousa
Posted: 2018-07-23 10:16


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
------------------------------
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

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

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

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

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

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


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Jay Stanley
Posted: 2018-07-23 13:13

@David, what version of Zenoss?​

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


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: David de Sousa
Posted: 2018-07-24 12:39

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Jay Stanley
Posted: 2018-07-24 16:34

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
------------------------------

Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Nick Barker
Posted: 2018-07-25 08:01

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: David de Sousa
Posted: 2018-07-27 06:25

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.

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: David de Sousa
Posted: 2018-08-07 12:01

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
------------------------------


Subject: RE: Device Search Error - AttributeError: 'NoneType' object has no attribute 'lower'
Author: Ryan Bellinger
Posted: 2021-04-20 12:47

Hi, we are running Core v6.3.2 and it appears that this is still not working.  Is there any sort of hotfix or patch that we can use to resolve the Device Search issue?  I am receiving the exact same message as was posted in the original message.

I realize that Core is the free community version, but this appears to have been an issue for years without any resolution.  Also hasn't been any releases to Core for over a year.  Just hoping that Zenoss isn't giving up on the Core model and Community.

Any help or feedback would be greatly appreciated.

Thanks!

------------------------------
Ryan Bellinger
------------------------------


< Previous
Core 6.1.2 OVA
  Next
Graph consist more 6 items have displayed incorrectly.
>