Vertica 7: 'NoneType' object is not subscriptable on create database. Ubuntu 12.04
adminTools Last Chance Error Handler running...
raised error: <type 'exceptions.TypeError'>
error message: 'NoneType' object is not subscriptable
trace file: /opt/vertica/log/adminTools-verticadmin.errors
REPORT THIS INFORMATION TO TECHNICAL SUPPORT
AND INCLUDE CONTENTS OF THE TRACE FILE IN YOUR REPORT
verticadmin@ubuntu:~$ more /opt/vertica/log/adminTools-verticadmin.errors
--------------------------------
handler invoked: 2013-12-15 15:58:43
raised error: <type 'exceptions.TypeError'>
Traceback (most recent call last):
File "/opt/vertica/bin/adminTools", line 374, in <module>
ac.runApp()
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/ui/adminCtrl.py", line 3409, in runApp
self.__ui.runFromNavigation("main")
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/ui/uiMgr.py", line 165, in a_wrapper_accepting_args
fn(self, *args, **kwargs)
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/ui/uiMgr.py", line 450, in runFromNavigation
self.__navigator.navigate(uimanager=self, startingPoint=runFrom)
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/ui/Navigator.py", line 315, in navigate
((self.__menus[ nextMenu ][ self.NAV_MACTIONS ])[ offset ])()
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/ui/adminCtrl.py", line 1659, in createDB
result, info = self.__exec.createDB(DBName, nodesInDB, DBpassword=DBpassword, licenseFile=DBinclude.LICENSE_KEY)
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/engine/adminExec.py", line 2844, in createDB
logger=logger)
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/network/SSH.py", line 1180, in createDBMultiNodes
portNo,bcastAddrs[nodeHosts[initiatorOffset]][0],
TypeError: 'NoneType' object is not subscriptable
raised error: <type 'exceptions.TypeError'>
error message: 'NoneType' object is not subscriptable
trace file: /opt/vertica/log/adminTools-verticadmin.errors
REPORT THIS INFORMATION TO TECHNICAL SUPPORT
AND INCLUDE CONTENTS OF THE TRACE FILE IN YOUR REPORT
verticadmin@ubuntu:~$ more /opt/vertica/log/adminTools-verticadmin.errors
--------------------------------
handler invoked: 2013-12-15 15:58:43
raised error: <type 'exceptions.TypeError'>
Traceback (most recent call last):
File "/opt/vertica/bin/adminTools", line 374, in <module>
ac.runApp()
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/ui/adminCtrl.py", line 3409, in runApp
self.__ui.runFromNavigation("main")
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/ui/uiMgr.py", line 165, in a_wrapper_accepting_args
fn(self, *args, **kwargs)
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/ui/uiMgr.py", line 450, in runFromNavigation
self.__navigator.navigate(uimanager=self, startingPoint=runFrom)
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/ui/Navigator.py", line 315, in navigate
((self.__menus[ nextMenu ][ self.NAV_MACTIONS ])[ offset ])()
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/ui/adminCtrl.py", line 1659, in createDB
result, info = self.__exec.createDB(DBName, nodesInDB, DBpassword=DBpassword, licenseFile=DBinclude.LICENSE_KEY)
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/engine/adminExec.py", line 2844, in createDB
logger=logger)
File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/network/SSH.py", line 1180, in createDBMultiNodes
portNo,bcastAddrs[nodeHosts[initiatorOffset]][0],
TypeError: 'NoneType' object is not subscriptable
0
Comments
Vertica was not installed on this machine before.
The above error is reported when trying to create (the first) database on the above configuration.
The directories and files are created, but, unusable due to the above error, I presume.
I have Vertica 6 running successfully on another box.
Thank you for your response, John
PS: ex HP
I suspect that this is happening because of some argument to some script that's not in a format that we're expecting. (I've installed Vertica 7 on Ubuntu without any trouble.)
If you're running under VMware Workstation, we actually provide a VMware image for you; you might find it easier to use. (On the Downloads page; you have to scroll down a bit.) It's CentOS-based, though; not Ubuntu.
If you'd like support via e-mail, you can file a support case at my.vertica.com. (We keep Community discussions online so that others can jump in and can see the resolutions.)
Vertica Analytic Database 7.0.0-0 Administration Tools
6 Configuration Menu
1 Create Database
Database name: dbdbdb
Comments: yet another db
Enter password: xxx
Confirm passowrd: xxx
Select hosts for the database: 127.0.1.1
Catalog pathname: /home/verticadmin
Data pathname: /home/verticadmin
OK to "Database with 1 or 2 hosts cannot be k-safe..."
Current Database Definition
Database name: dbdbdb
Comments: yet another db
Hosts:
127.0.1.1
Create this database?
<Yes>
---------------------------------------------------------------------------------------
*** Creating database: dbdbdb ***
127.0.1.1 OK [vertica][(7, 0, 0)][000][all]
Creating database dbdbdb
adminTools Last Chance Error Handler running...
raised error: <type 'exceptions.TypeError'>
error message: 'NoneType' object is not subscriptable
trace file: /opt/vertica/log/adminTools-verticadmin.errors
REPORT THIS INFORMATION TO TECHNICAL SUPPORT
AND INCLUDE CONTENTS OF THE TRACE FILE IN YOUR REPORT
------------------------------------------------------------------------------------------------
Question: how does one delete the database when adminTools states there is none?
Thank you, John
I'll persevere with VMware Workstartion 10 and Ubuntu for now, but thank you for pointing out that there is a VMware image to play with.
Next stop might be AWS, just to give it a go and see what else I can break
I'm not sure how you get into a state where you have nodes but adminTools can't see them. But you could poke around in /opt/vertica/config/ .
Ubuntu was assigned an address of 127.0.1.1 versus localhost with 127.0.0.1
The above values were picked up by the adminTools script...
I changed the hosts to 127.0.0.1 and now everything appears to work.
In addition to the above changes, I also changed the default_base which had been set to a value different from the directory allocated to the nodes.
Not sure what caused the above mess, but, moral of the story appears to be: do not use a host name unless you are sure it is the one which Vertica will use too!
Cheers, and thank you for the help, John
Please review this thread: https://community.vertica.com/vertica/topics/single_node_cluster_change_node_ip_address-14fuee
You need to change IP addresses in catalog too.
Regards Daniel
Is this what you recommend for a down server?
1) use 1 spare server. Change the ip for the down server to the new server, on all servers in the cluster in the following files. Also copy these to the replacement server.
2) Restart the cluster/opt/vertica/config/admintools.conf
/opt/vertica/config/vspread.conf
/etc/sysconfig/spreadd
I worry that step 1 will leave the cluster in a state where it
does not realize that data is lost and needs recovery on
one of the servers.
Will auto-recovery start in this case?
Or should I follow with
3) Run the admintools - replace node to replace the
just-replaced server with another.
Thanks for your time,
Brian
I read one more time and understood that I didn't get you previously and
version 7 probably has an easier way.
Common actions its:
1. Low your K-Safety
https://my.vertica.com/docs/7.0.x/HTML/index.htm#Authoring/AdministratorsGuide/ManageNodes/LoweringT...
2. Remove host from cluster
https://my.vertica.com/docs/7.0.x/HTML/index.htm#Authoring/AdministratorsGuide/RemovingHostsFromAClu...
3. Remove host from database
https://my.vertica.com/docs/7.0.x/HTML/index.htm#Authoring/AdministratorsGuide/RemovingNodesFromADat...
4. Change IP in configuration
https://my.vertica.com/docs/7.0.x/HTML/index.htm#Authoring/AdministratorsGuide/ManageNodes/ChangingT...
im apologize for confusing you, but now you know also other way (via catalog editor)
Edit IP in configurations and try FORCE recovery:
Removing host often requires the host be up.
Anyway, since I have an SRE team, they are trying to bring
up the down node.
If they fail, they will give me a fresh server with the same IP.
So in the end things will be fine.
I was just hoping to replace the server as an interim solution.
Glad someone is helping on these forums,
Brian
The error is self-explanatory. You are trying to subscript an object which you think is a list or dict, but actually is None. NoneType is the type of the None object which represents a lack of value, for example, a function that does not explicitly return a value will return None. 'NoneType' object is not subscriptable is the one thrown by python when you use the square bracket notation object[key] where an object doesn't define the getitem method . You might have noticed that the method sort() that only modify the list have no return value printed – they return the default None. This is a design principle for all mutable data structures in Python.