apache-nifipostgresql-8.3hortonworks-dataflow

HDF 3.0.1 - Schema_Registry startup exception


I am setting up HDF 3.0.1 cluster over ambari. I did installed Ambari 2.5.1 successfully. I am using Postgres 8.3 (the default version that comes with Ambari 2.5.1).

Currently, I am facing issue with starting up of schema_Registry. The service is already added to Ambari. However, I am not able to start the same. I am getting following exceptions. Please help to suggest the resolution.

stderr:   /var/lib/ambari-agent/data/errors-53.txt 
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/REGISTRY/0.3.0/package/scripts/registry_server.py", line 120, in <module>
    RegistryServer().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 329, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/REGISTRY/0.3.0/package/scripts/registry_server.py", line 66, in start
    user="root")
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 262, in action_run
    tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 72, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 102, in checked_call
    tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 303, in _call
    raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of 'source /usr/hdf/current/registry/conf/registry-env.sh ; /usr/hdf/current/registry/bootstrap/bootstrap-storage.sh' returned 1. stty: standard input: Inappropriate ioctl for device

Using Configuration file: /usr/hdf/current/registry/bootstrap/../conf/registry.yaml
######## SQL Query:  -- Copyright 2016 Hortonworks.
--
-- Licensed under the Apache License, Version 2.0 (the "License") 
######## Query executed
######## SQL Query:  -- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
--    http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.

-- THE NAMES OF THE TABLE COLUMNS MUST MATCH THE NAMES OF THE CORRESPONDING CLASS MODEL FIELDS

-- USE schema_registry

CREATE TABLE IF NOT EXISTS schema_metadata_info (
  "id"              SERIAL PRIMARY KEY,
  "type"            VARCHAR(255) NOT NULL,
  "schemaGroup"     VARCHAR(255) NOT NULL,
  "name"            VARCHAR(255) NOT NULL,
  "compatibility"   VARCHAR(255) NOT NULL,
  "validationLevel" VARCHAR(255) NOT NULL, -- added in 0.3.1, table should be altered to add this column from earlier versions.
  "description"     TEXT,
  "evolve"          BOOLEAN      NOT NULL,
  "timestamp"       BIGINT       NOT NULL,
  UNIQUE ("id", "name")
) 
Exception in thread "main" org.postgresql.util.PSQLException: ERROR: syntax error at or near "NOT"
  Position: 625
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
    at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
    at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:303)
    at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:289)
    at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:266)
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:262)
    at com.hortonworks.registries.storage.tool.SQLScriptRunner.runScript(SQLScriptRunner.java:98)
    at com.hortonworks.registries.storage.tool.TablesInitializer.doExecute(TablesInitializer.java:198)
    at com.hortonworks.registries.storage.tool.TablesInitializer.doExecuteCreate(TablesInitializer.java:175)
    at com.hortonworks.registries.storage.tool.TablesInitializer.main(TablesInitializer.java:162)

------

2018-01-05 11:24:57,880 - Directory['/var/lib/registry'] {'owner': 'registry', 'group': 'hadoop', 'create_parents': True, 'mode': 0755, 'cd_access': 'a'}
2018-01-05 11:24:57,883 - File['/etc/security/limits.d/registry.conf'] {'content': Template('registry.conf.j2'), 'owner': 'root', 'group': 'root', 'mode': 0644}
2018-01-05 11:24:57,890 - File['/usr/hdf/current/registry/conf/registry.yaml'] {'owner': 'registry', 'content': Template('registry.yaml.j2'), 'group': 'hadoop', 'mode': 0644}
2018-01-05 11:24:57,891 - Execute['source /usr/hdf/current/registry/conf/registry-env.sh ; /usr/hdf/current/registry/bootstrap/bootstrap-storage.sh'] {'user': 'root'}
2018-01-05 11:24:58,452 - Execute['find /var/log/hadoop/registry -maxdepth 1 -type f -name '*' -exec echo '==> {} <==' \; -exec tail -n 40 {} \;'] {'logoutput': True, 'ignore_failures': True, 'user': 'registry'}
stty: standard input: Inappropriate ioctl for device

Solution

  • HDF 3.0.1 Support Matrices

    Hi Himansu, in Hortonworks support matrices, in the database section, you will see that Schema Registry requires Postgres 9.5+ or MySQL 5.5+. I suggest you connect Schema Registry to a supported Database and try again.