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 02-03-2016 06:25 PM
I am trying to install a new cluster and in the process i configured ambari to talk to a remote mysql db running on a different machine in the cluster. However when I try to start the ambari, it is failing to start because it is trying to connect to the local db which doesnt exisits. I checked ambari.properties file to see if i have the correct hostname for the remote mysql db. The properties file looks fine.
Is there any other place i need to check to see if it has the correct remote db hostname configured? Please advise
Created 02-03-2016 08:13 PM
You are mixing couple of things here.
1) Cleanup https://community.hortonworks.com/content/idea/138/cleanup-scripts-to-remove-old-hdp-bits.html
2) ambari-server setup looks fine...as per the screenshot
whats the exact issue now?
Created 02-03-2016 07:43 PM
i did all that and i ran ambari-setup once again and i gave the remote MySQL DB information by choosing option 3 for MySQL and tried to restart but it failed to restart again with the following error message .. which means it is trying to talk to a DB on the local host which doesn't exisits .. the remote mysql is running on FALBDCDQ0007V host ..
Exception in thread "main" com.google.inject.CreationException: Guice creation errors: 1) Error injecting constructor, java.lang.RuntimeException: java.sql.SQLException: Access denied for user 'ambari'@'FALBDCDQ0001V.farmersinsurance.com' (using password: YES) at org.apache.ambari.server.orm.DBAccessorImpl.<init>(DBAccessorImpl.java:77) while locating org.apache.ambari.server.orm.DBAccessorImpl while locating org.apache.ambari.server.orm.DBAccessor for field at org.apache.ambari.server.orm.dao.DaoUtils.dbAccessor(DaoUtils.java:36) at org.apache.ambari.server.orm.dao.DaoUtils.class(DaoUtils.java:36) while locating org.apache.ambari.server.orm.dao.DaoUtils for field at org.apache.ambari.server.orm.dao.TopologyRequestDAO.daoUtils(TopologyRequestDAO.java:31) at org.apache.ambari.server.orm.dao.TopologyRequestDAO.class(TopologyRequestDAO.java:31) while locating org.apache.ambari.server.orm.dao.TopologyRequestDAO for field at org.apache.ambari.server.topology.PersistedStateImpl.topologyRequestDAO(PersistedStateImpl.java:56) Caused by: java.lang.RuntimeException: java.sql.SQLException: Access denied for user 'ambari'@'FALBDCDQ0001V.farmersinsurance.com' (using password: YES) at org.apache.ambari.server.orm.DBAccessorImpl.<init>(DBAccessorImpl.java:103) at org.apache.ambari.server.orm.DBAccessorImpl$$FastClassByGuice$$86dbc63e.newInstance(<generated>) at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254) at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54) at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53) at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:94)
Created 02-03-2016 07:48 PM
I have attached a document on how to install your Ambari server successfully you will not find any better document than this .Please enjoy and revert set-up-mysql-for-ambari.pdf
I forgot to include the syntax to connect remotely to MySQL server but it should be fine
The Ambari Server host needs the mysql-connector-java driver installed to be able to communicate with the database you will need to install it on the local and remote server
Created 02-03-2016 07:49 PM
Error message is attached
Created 02-03-2016 08:07 PM
Thanks for sending the doc but I did the installation exactly the same way you have it on your document and everything went fine but when i start the server it is looking for the local mySQL db which doesnt exists .. I checked ambari.properties and everything points to the remote mySQL server but for some reason the ambari server is trying to connect to the local mysql host ..
Please note that i m doing the installation using a local repo as this cluster doesnt have internet connect .. Do you have a doc to remove ambari binaries and configuration from everywhere to start from the scratch?
Created 02-03-2016 08:13 PM
You are mixing couple of things here.
1) Cleanup https://community.hortonworks.com/content/idea/138/cleanup-scripts-to-remove-old-hdp-bits.html
2) ambari-server setup looks fine...as per the screenshot
whats the exact issue now?
Created 02-03-2016 08:24 PM
@rbalam It failed because of permission issue
java.sql.SQLException: Access denied for user 'ambari'@'FALBDCDQ0001V.farmersinsurance.com' (using
run this as root user
grant all privileges on *.* to 'ambari'@'FALBDCDQ0001V.farmersinsurance.com' identified by 'password' ;
make sure you can connect
mysql -u ambari -ppassword -h host
Created 02-03-2016 08:27 PM
FALBDCDQ0001V is not the correct MySQL host .. it should talk to FALBDCDQ0007V where i have all the permissions set for ambari user ..
Created 02-03-2016 08:31 PM
@rbalam Ok..You can change the host entry to the correct one.
Created 02-03-2016 08:21 PM
as i stated in the begining, the problem is with the ambari server trying to connect to the local mysql host when i configured it to talk to remote MySQL host ..
Ambari Server setup ran fine .. but when i try to restart it is failing because it is trying to talk to the local db instead of remote mysql db ..
I removed ambari-server binaries from the host using "yum remove ambari-server" and re-installed it using "yum install ambari-server" and ran the set up once again to point it to remote mysql db but it is still trying to talk to the local db when i tried to start using "ambari-server start" command ..
Created 02-03-2016 08:21 PM