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

Comments

  • Hi Joe, You've reached the Vertica community forums. If you're running into trouble, could you describe your situation in more detail? What commands you are running to get here, anything unusual about your environment, etc. Adam
  • Vertica Community Edition 7; Ubuntu 12.04 64-bit running under VMware Workstation 10.
    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 :)
  • PPS: you can write directly to johndapps at gmail dot com
  • Thanks John; could you post the commands that you're running to get this message?

    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.)
  • Start /opt/vertica/bin/adminTools
    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 did try the VMware image. However, it is very old compared to what I am running and the display size in CentOS is setup for people who ware magnifying glasses...
    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 :(
  • Hm...  And how did you invoke install_vertica initially?

    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/ .
  • Well, your thought about checking the config file was a good one. What had happened was that I had specified the node name (Ubuntu) rather than localhost.
    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
  • Ah, glad you were able to sort this out!
  • I am getting the same problem when I try to replace a defective server (10.0.28.87) in the cluster with 10.0.28.89 That server was not responding to ssh requests and has been taken offline. I'm using Vertica7 on Linux. Here's the output: Unable to SSH as dbadmin to 10.0.28.87: UNEXPECTED EOF: Could not login with ssh. ssh output: 'ssh: connect to host 10.0.28.87 port 22: No route to host\r\r\n' 10.0.28.86 OK [vertica][(7, 0, 0)][001][x86_64] 10.0.28.88 OK [vertica][(7, 0, 0)][001][x86_64] 10.0.28.89 OK [vertica][(7, 0, 0)][001][x86_64] adminTools Last Chance Error Handler running... raised error: error message: 'NoneType' object is not subscriptable trace file: /opt/vertica/log/adminTools-dbadmin.errors REPORT THIS INFORMATION TO TECHNICAL SUPPORT AND INCLUDE CONTENTS OF THE TRACE FILE IN YOUR REPORT The /opt/vertica/log/adminTools-dbadmin.errors file has these lines: -------------------------------- handler invoked: 2014-01-12 22:17:06 raised error: Traceback (most recent call last): File "./admintools", line 374, in 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 3320, in clusterReplaceNode (code, msg) = self.__exec.replaceNodeDefinition(dbname, hosts, replacements, upassword) File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/engine/adminExec.py", line 2494, in replaceNodeDefinition """ % ( site_name, new_host, netprofile[new_host][0], netprofile[new_host][1] ) TypeError: 'NoneType' object is not subscriptable
  • Hi Brian!

    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

  • Thanks Daniel, this is useful information. I didn't know we could restore a backup to a cluster with different ip addresses. 

    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.
    • /opt/vertica/config/admintools.conf
    • /opt/vertica/config/vspread.conf
    • /etc/sysconfig/spreadd
    2) Restart the cluster

    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

  • Hm...no...

    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:
    daniel@synapse ~ $ adminTools -t restart_node -h
    Usage: restart_node [options]

    Options:
    -h, --help show this help message and exit
    -s NODES, --hosts=NODES
    comma-separated list of hosts to be restarted
    -d DB, --database=DB Name of database whose node is to be restarted
    -p DBPASSWORD, --password=DBPASSWORD
    Database password in single quotes
    -i, --noprompts do not stop and wait for user input(default false)
    -F, --force force the node to start and auto recover if necessary
    --compat21 Use Vertica 2.1 method using node names instead of
    hostnames

  • Thanks Daniel,

    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
  • larabrianlarabrian Community Edition User

    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.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file