Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 11-13-2018 06:30 PM
Hi everyone,
I'm upgrading ambari server version 2.6 to version 2.7, following this document
The tasks work perfectly until step 12. When I run `ambari-server upgrade -v`, it produces this error:
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
Traceback (most recent call last):
File "/usr/sbin/ambari-server.py", line 1060, in <module>
mainBody()
File "/usr/sbin/ambari-server.py", line 1030, in mainBody
main(options, args, parser)
File "/usr/sbin/ambari-server.py", line 980, in main
action_obj.execute()
File "/usr/sbin/ambari-server.py", line 79, in execute
self.fn(*self.args, **self.kwargs)
File "/usr/lib/ambari-server/lib/ambari_server/serverUpgrade.py", line 262, in upgrade
retcode = run_schema_upgrade(args)
File "/usr/lib/ambari-server/lib/ambari_server/serverUpgrade.py", line 125, in run_schema_upgrade
db_title = get_db_type(get_ambari_properties()).title
AttributeError: 'NoneType' object has no attribute 'title'Can anyone help me with this problem?
Thanks in advance.
Created 11-14-2018 05:01 AM
Hi @Hieu Nguyen Trung ,
the exception you have shared seems to be from Apache bug : https://issues.apache.org/jira/browse/AMBARI-18285
Which is your base version from which you are upgrading ?
Can you revisit the ambari.properties file in /etc/ambari-server/conf/ambari.properties
also compare your ambari.properties with ambari.properties.rpmsave in /etc/ambari-server/conf/
this is my output when i grep for jdbc :
[root@asn1 conf]# cat ambari.properties |grep -i jdbc custom.mysql.jdbc.name=mysql-connector-java.jar server.jdbc.connection-pool=internal server.jdbc.database=postgres server.jdbc.database_name=ambari server.jdbc.postgres.schema=ambari server.jdbc.user.name=ambari server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat
Please accept this answer if this helped you.
Created 11-14-2018 05:01 AM
Hi @Hieu Nguyen Trung ,
the exception you have shared seems to be from Apache bug : https://issues.apache.org/jira/browse/AMBARI-18285
Which is your base version from which you are upgrading ?
Can you revisit the ambari.properties file in /etc/ambari-server/conf/ambari.properties
also compare your ambari.properties with ambari.properties.rpmsave in /etc/ambari-server/conf/
this is my output when i grep for jdbc :
[root@asn1 conf]# cat ambari.properties |grep -i jdbc custom.mysql.jdbc.name=mysql-connector-java.jar server.jdbc.connection-pool=internal server.jdbc.database=postgres server.jdbc.database_name=ambari server.jdbc.postgres.schema=ambari server.jdbc.user.name=ambari server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat
Please accept this answer if this helped you.
Created 11-19-2018 10:58 AM
Hi @Akhil S Naik,
Thank you so much for your answer. Due to your support, I got out of this trouble but getting into another one.
What I did is that I made a backup of ambari.properties (as mentioned is this document: https://docs.hortonworks.com/HDPDocuments/Ambari-2.7.1.0/bk_ambari-upgrade-major/content/preparing_t.... So I copy those following lines from the backup file into the new one:
server.jdbc.connection-pool=internal server.jdbc.database=postgres server.jdbc.database_name=ambari server.jdbc.postgres.schema=ambari server.jdbc.user.name=ambari server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat
After that, the upgrade proceeds a little bit further, then produces the following error:
Traceback (most recent call last):
File "/usr/sbin/ambari-server.py", line 1060, in <module>
mainBody()
File "/usr/sbin/ambari-server.py", line 1030, in mainBody
main(options, args, parser)
File "/usr/sbin/ambari-server.py", line 980, in main
action_obj.execute()
File "/usr/sbin/ambari-server.py", line 79, in execute
self.fn(*self.args, **self.kwargs)
File "/usr/lib/ambari-server/lib/ambari_server/serverUpgrade.py", line 262, in upgrade
retcode = run_schema_upgrade(args)
File "/usr/lib/ambari-server/lib/ambari_server/serverUpgrade.py", line 162, in run_schema_upgrade
upgrade_response = json.loads(stdout)
File "/usr/lib/ambari-server/lib/ambari_simplejson/__init__.py", line 307, in loads
return _default_decoder.decode(s)
File "/usr/lib/ambari-server/lib/ambari_simplejson/decoder.py", line 335, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/ambari-server/lib/ambari_simplejson/decoder.py", line 353, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
I see that this problem is some kind of similar to the old one but I cant figure out how to solve it. Can you tell me how I can understand and solve these kinds of problem or how I can investigate and search for solution for it.
Thank you so much for your help.
P/s: For your question, I'm upgrading ambari from version 2.6 to 2.7.
Created 05-01-2019 04:44 PM
Hi @Hieu Nguyen Trung ,
Were you able to solve your this error?
ValueError: No JSON object could be decoded"
I am having the same error in upgrading from 2.6.1.5 to 2.7.3
Thanks