The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!
Unable to create database
There are no databases after completing installation of vertica MC and db. When I tried to create, it shows error json object could not be loaded, getHosts. Any help?
0
Comments
Could you please send the complete error you are getting, is it Vertica 7 ?
You can paste the error message you see in admintools-root logs and admintools-dba logs
This was in the log, and yes its vertica 7. I am using Ubuntu 12.04.
---> Jan 30 03:12:54 START: job CreateDatabase-testing_db-2014-01-30 03:12:54.962832 with parameters {} Jan 30 03:12:54 START: job CreateDatabase-testing_db-2014-01-30 03:12:54.962832 with parameters {} Jan 30 03:12:54 INFO: creating node ['v_testing_db_node0001', '127.0.0.1', '/home/dbadmin', '/home/dbadmin'] Jan 30 03:12:54 [adminExec.do_create_node] creating node w/ ['v_testing_db_node0001', '127.0.0.1', '/home/dbadmin', '/home/dbadmin'] Jan 30 03:12:54 [adminExec.do_create_node] creating node w/ ['v_testing_db_node0001', '127.0.0.1', '/home/dbadmin', '/home/dbadmin'] Jan 30 03:12:54 [adminExec.isNodeDefined] qry: '['v_testing_db_node0001', '127.0.0.1', '/home/dbadmin', '/home/dbadmin']' Jan 30 03:12:55 <BashAdapter: [email protected]>: <command hidden> Jan 30 03:12:55 DEBUG: [adminExec.createDB] creating db testing_db Jan 30 03:12:55 INFO: Running integrity checks Jan 30 03:12:55 EVENT: type=Status {"type":"NODEHOST", "state":"VALIDATING", "host":"127.0.0.1", "node":"v_testing_db_node0001", "dbname":"testing_db", "msg":"Running Integrity Checks", "maxSteps":"6", "currStep":"1"} Jan 30 03:12:55 INFO: Will create database on port 5433 Jan 30 03:12:55 INFO: Checking that nodes are defined and installed Jan 30 03:12:55 EVENT: type=Status {"type":"NODEHOST", "state":"VALIDATING", "host":"127.0.0.1", "node":"v_testing_db_node0001", "dbname":"testing_db", "msg":"Validating RPM", "maxSteps":"6", "currStep":"2"} Jan 30 03:12:55 <BashAdapter: [email protected]> (package version check): ["dpkg -l vertica | tail -1 | awk '{print $3}'"] Jan 30 03:12:55 <BashAdapter: [email protected]>: (rc=0) ['7.0.0-1'] Jan 30 03:12:55 [adminExec.validateRpmVersion]: checking remote nodes ['127.0.0.1'] for version [vertica][(7, 0, 0)][001] Jan 30 03:12:55 [adminExec.validateRpmVersion]: checking installed versions on host 127.0.0.1 Jan 30 03:12:55 <BashAdapter: [email protected]> (package version check): ["dpkg -l vertica | tail -1 | awk '{print $3}'"] Jan 30 03:12:55 <BashAdapter: [email protected]>: (rc=0) ['7.0.0-1'] Jan 30 03:12:55 [adminExec.validateRpmVersion]: found [vertica][(7, 0, 0)][001][all] Jan 30 03:12:55 EVENT: type=Status {"type":"NODEHOST", "state":"VALIDATING", "host":"127.0.0.1", "node":"v_testing_db_node0001", "dbname":"testing_db", "msg":"Validating Cluster", "maxSteps":"6", "currStep":"3"} Jan 30 03:12:55 INFO: Nominated initiator node v_testing_db_node0001 Jan 30 03:12:55 INFO: Creating catalog and data directories Jan 30 03:12:55 EVENT: type=Status {"type":"NODEHOST", "state":"VALIDATING", "host":"127.0.0.1", "node":"v_testing_db_node0001", "dbname":"testing_db", "msg":"Creating Catalog and Data Directories", "maxSteps":"6", "currStep":"4"} Jan 30 03:12:55 <BashAdapter: [email protected]>: ['[ -e /home/dbadmin/testing_db ]'] Jan 30 03:12:55 <BashAdapter: [email protected]>: (rc=1) [] Jan 30 03:12:55 [makeDir] mkdir -p --mode=770 /home/dbadmin/testing_db/v_testing_db_node0001_catalog Jan 30 03:12:55 <BashAdapter: [email protected]>: ['mkdir -p --mode=770 /home/dbadmin/testing_db/v_testing_db_node0001_catalog'] Jan 30 03:12:55 <BashAdapter: [email protected]>: (rc=0) [] Jan 30 03:12:55 [makeDir ret] 0 Jan 30 03:12:55 [makeDir] mkdir -p --mode=770 /home/dbadmin/testing_db/v_testing_db_node0001_data Jan 30 03:12:55 <BashAdapter: [email protected]>: ['mkdir -p --mode=770 /home/dbadmin/testing_db/v_testing_db_node0001_data'] Jan 30 03:12:55 <BashAdapter: [email protected]>: (rc=0) [] Jan 30 03:12:55 [makeDir ret] 0 Jan 30 03:12:55 [prepareDBs] echo 5433 >/home/dbadmin/testing_db/port.dat Jan 30 03:12:55 <BashAdapter: [email protected]>: ['echo 5433 >/home/dbadmin/testing_db/port.dat'] Jan 30 03:12:55 <BashAdapter: [email protected]>: (rc=0) [] Jan 30 03:12:55 <BashAdapter: [email protected]>: ['[ -e /opt/vertica/config/logrotate ]'] Jan 30 03:12:55 <BashAdapter: [email protected]>: (rc=0) [] Jan 30 03:12:55 [prepareDBs] logrotate create file:echo '/home/dbadmin/testing_db/v_testing_db_node0001_catalog/vertica.log /home/dbadmin/testing_db/v_testing_db_node0001_catalog/UDxLogs/UDxFencedProcesses.log { # rotate weekly weekly # and keep for 52 weeks rotate 52 # no complaining if vertica did not start yet missingok # compress log after rotation compress # no creating a new empty log, vertica will do that nocreate # if set, only rotates when log size is greater than X size 10M # delete files after 90 days (not all logrotate pkgs support this keyword)# maxage 90 # we have 2 log files to rotate but only signal vertica once sharedscripts # signal vertica to reopen and create the log postrotate kill -USR1 'head -1 /home/dbadmin/testing_db/v_testing_db_node0001_catalog/vertica.pid 2> /dev/null' 2> /dev/null || true endscript}
/home/dbadmin/testing_db/dbLog { # rotate weekly weekly # and keep for 52 weeks rotate 52 # no complaining if vertica did not start yet missingok # compress log after rotation compress # this log is stdout, so rotate by copying it aside and truncating copytruncate}' > /opt/vertica/config/logrotate/testing_db Jan 30 03:12:55 <BashAdapter: [email protected]>: ["echo '/home/dbadmin/testing_db/v_testing_db_node0001_catalog/vertica.log /home/dbadmin/testing_db/v_testing_db_node0001_catalog/UDxLogs/UDxFencedProcesses.log {\n # rotate weekly\n weekly\n # and keep for 52 weeks\n rotate 52\n # no complaining if vertica did not start yet\n missingok\n # compress log after rotation\n compress\n # no creating a new empty log, vertica will do that\n nocreate\n # if set, only rotates when log size is greater than X\n size 10M\n # delete files after 90 days (not all logrotate pkgs support this keyword)\n# maxage 90\n # we have 2 log files to rotate but only signal vertica once\n sharedscripts\n # signal vertica to reopen and create the log\n postrotate\n kill -USR1 'head -1 /home/dbadmin/testing_db/v_testing_db_node0001_catalog/vertica.pid 2> /dev/null' 2> /dev/null || true\n endscript\n}\n\n/home/dbadmin/testing_db/dbLog {\n # rotate weekly\n weekly\n # and keep for 52 weeks\n rotate 52\n # no complaining if vertica did not start yet\n missingok\n # compress log after rotation\n compress\n # this log is stdout, so rotate by copying it aside and truncating\n copytruncate\n}\n' > /opt/vertica/config/logrotate/testing_db"] Jan 30 03:12:55 <BashAdapter: [email protected]>: (rc=0) [] Jan 30 03:12:55 <BashAdapter: [email protected]>: ['touch /opt/vertica/config/admintools.conf'] Jan 30 03:12:55 <BashAdapter: [email protected]>: (rc=0) [] Jan 30 03:12:55 INFO: Starting DB in multi-node mode Jan 30 03:12:55 EVENT: type=Status {"type":"NODEHOST", "state":"VALIDATING", "host":"127.0.0.1", "node":"v_testing_db_node0001", "dbname":"testing_db", "msg":"Creating and Starting Database", "maxSteps":"6", "currStep":"5"} Jan 30 03:12:55 INFO: [SSH.createDBMultiNodes] dbName 'testing_db', logFile '/home/dbadmin/testing_db/dbLog', catalogPath '/home/dbadmin/testing_db', dataPath '/home/dbadmin/testing_db', nodes '['v_testing_db_node0001']', nodeHosts '['127.0.0.1']', nodeCatalogs '['v_testing_db_node0001_catalog']', nodeDatas '['v_testing_db_node0001_data']', userName 'dbadmin', host '127.0.0.1', spreadInfo '{'largecluster': None, 'logging': 'False', 'controlsubnet': 'default', 'mode': 'broadcast'}', portNo = '5433') Jan 30 03:12:55 INFO: NetworkProfiles: {'127.0.0.1': ['127.0.0.1', '127.0.0.255']} Jan 30 03:12:55 INFO: Creating database Jan 30 03:12:55 INFO: [SSH.createDBMultiNodes] bootstrapping with idx 0 node v_testing_db_node0001 on host 127.0.0.1 Jan 30 03:12:55 INFO: [SSH.createDBMultiNodes] bootstrap cmd '/opt/vertica/bin/bootstrap-catalog -C 'testing_db' -H '127.0.0.1' -s 'v_testing_db_node0001' -D '/home/dbadmin/testing_db/v_testing_db_node0001_catalog' -S '/home/dbadmin/testing_db/v_testing_db_node0001_data' -L '/opt/vertica/config/share/license.key' -p '5433' -c '127.0.0.1' -B '127.0.0.255' ' Jan 30 03:12:55 <BashAdapter: [email protected]> (Bootstrapping database testing_db): <command hidden> Jan 30 03:12:55 INFO: [SSH.createDBMultiNodes] cmd output '['1', ['No such license file /opt/vertica/config/share/license.key']]' Jan 30 03:12:55 <BashAdapter: [email protected]> (Reading bootstrap catalog): <command hidden> Jan 30 03:12:56 ERROR: Traceback (most recent call last): File "/opt/vertica/agent/tasks/CreateDatabase.py", line 128, in run self.exit_code, msg = self.engine.createDB( self.database, nodes, self.passwd, logger=self.logger , p_port=self.port) 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 1197, in createDBMultiNodes db = VDatabase.VDatabase(jsonString="\n".join(ret[1])) File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/config/VDatabase.py", line 129, in __init__ self.fromString(jsonString) File "/opt/vertica/oss/python/lib/python2.7/site-packages/vertica/config/VDatabase.py", line 204, in fromString self.loadFromMap(json.loads(jsonString)) File "/opt/vertica/oss/python/lib/python2.7/json/__init__.py", line 310, in loads return _default_decoder.decode(s) File "/opt/vertica/oss/python/lib/python2.7/json/decoder.py", line 346, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/opt/vertica/oss/python/lib/python2.7/json/decoder.py", line 364, in raw_decode raise ValueError("No JSON object could be decoded")ValueError: No JSON object could be decoded Jan 30 03:12:56 EVENT: type=Status {"type":"DB", "state":"FAILED", "dbname":"testing_db", "msg":"No JSON object could be decoded", "maxSteps":"1", "currStep":"1"} Jan 30 03:12:56 STOP: job CreateDatabase-testing_db-2014-01-30 03:12:54.962832 with exit_code None
You can fix it by
cp /opt/vertica/config/licensing/vertica_community_edition.license.key /opt/vertica/config/share/license.key