Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We should use ansible_fqdn instead of ansible_hostname #5

Open
ksingh7 opened this issue Jul 10, 2017 · 1 comment
Open

We should use ansible_fqdn instead of ansible_hostname #5

ksingh7 opened this issue Jul 10, 2017 · 1 comment

Comments

@ksingh7
Copy link
Contributor

ksingh7 commented Jul 10, 2017

fatal: [mgmt]: FAILED! => {"changed": true, "cmd": "JAVA_HOME=/usr/java/jdk1.8.0_131 HADOOP_HOME=/hadoop /hadoop/hive/bin/schematool -initSchema -dbType mysql", "delta": "0:00:03.135260", "end": "2017-07-10 08:33:17.253513", "failed": true, "rc": 1, "start": "2017-07-10 08:33:14.118253", "stderr": "which: no hbase in (/sbin:/bin:/usr/sbin:/usr/bin)\nSLF4J: Class path contains multiple SLF4J bindings.\nSLF4J: Found binding in [jar:file:/hadoop/hive/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]\nSLF4J: Found binding in [jar:file:/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]\nSLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.\nSLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]\norg.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.\nUnderlying cause: java.sql.SQLException : null, message from server: "Host 'mgmt.ec2.internal' is not allowed to connect to this MariaDB server"\nSQL Error code: 1130\nUse --verbose for detailed stacktrace.\n*** schemaTool failed ", "stderr_lines": ["which: no hbase in (/sbin:/bin:/usr/sbin:/usr/bin)", "SLF4J: Class path contains multiple SLF4J bindings.", "SLF4J: Found binding in [jar:file:/hadoop/hive/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]", "SLF4J: Found binding in [jar:file:/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]", "SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.", "SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]", "org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.", "Underlying cause: java.sql.SQLException : null, message from server: "Host 'mgmt.ec2.internal' is not allowed to connect to this MariaDB server"", "SQL Error code: 1130", "Use --verbose for detailed stacktrace.", " schemaTool failed ***"], "stdout": "Metastore connection URL:\t jdbc:mysql://10.100.0.72:3306/metastore\nMetastore Connection Driver :\t com.mysql.jdbc.Driver\nMetastore connection User:\t hive", "stdout_lines": ["Metastore connection URL:\t jdbc:mysql://10.100.0.72:3306/metastore", "Metastore Connection Driver :\t com.mysql.jdbc.Driver", "Metastore connection User:\t hive"]}

@ksingh7
Copy link
Contributor Author

ksingh7 commented Jul 10, 2017

This is reproducible when hostname != FQDN and mysql user privileges does not allow the same host with FQDN to access database.

So it will be safer to use {{ ansible_fqd }} instead of {{ ansible_hostname }}

ksingh7 pushed a commit to ksingh7/bd that referenced this issue Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant