Support Questions
Find answers, ask questions, and share your expertise

Issues when restarting NiFi cluster related to config_version file,Issues when restarting NiFi cluster related to config_version

New Contributor

I have Ambari 2.4.2 with the latest HDF installed. I mainly installed it to moderate my NiFi cluster. I have configured the NiFi to work with LDAP although I don't think there's any connection to it.

Now each time I try to restart the NiFi service on the cluster, on two of my nodes the Ambari script returns an error: "No JSON object could be decoded". It is related to the file "/usr/hdf/current/nifi/conf/config_version".

When I delete the file it obviously regenerates and the nodes work(after I restart it). But then when I try to restart the cluster again it returns the same error again and won't start the NiFi service on the node. It happens on the same nodes again and again.

Any thoughts?

5 REPLIES 5

Contributor

Hi @Alex Vladimir would you mind posting more output from the error messaging?

New Contributor

I'm having the same exact problem and my output is:

Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi.py", line 360, in <module> Master().execute()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute method(env)
File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi.py", line 164, in start self.configure(env, is_starting = True)
File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi.py", line 108, in configure params.nifi_properties['nifi.sensitive.props.key'] = nifi_toolkit_util.get_last_sensitive_props_key last_encrypt_config = get_config_by_version('/var/lib/ambari-agent/data','nifi-ambari-config',last_encrypt_config_version)
File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi_toolkit_util.py", line 157, in get_config_by_version
version_config = json.loads(contents)
File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s)
FIle "/usr/lib64/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded")

Also, the current contents of config_version are:

{"ssl": "version1494766574234", "encrypt": "version1495436228917"}

Rising Star

Did anyone resolve this? We are seeing the same error.

Rising Star
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi.py", line 360, in <module>
    Master().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute
    method(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 720, in restart
    self.start(env, upgrade_type=upgrade_type)
  File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi.py", line 164, in start
    self.configure(env, is_starting = True)
  File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi.py", line 108, in configure
    params.nifi_properties['nifi.sensitive.props.key'] = nifi_toolkit_util.get_last_sensitive_props_key(config_version_file,params.nifi_properties)
  File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi_toolkit_util.py", line 246, in get_last_sensitive_props_key
    last_encrypt_config = get_config_by_version('/var/lib/ambari-agent/data','nifi-ambari-config',last_encrypt_config_version)
  File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi_toolkit_util.py", line 157, in get_config_by_version
    version_config = json.loads(contents)
  File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Rising Star

Removing config_version allowed NiFi to start, but the same error repeats whe next time a restart is attempted.