Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

metron api 504 Gateway Timeout Error occured while trying to proxy to: node1:4200/api/v1/user

metron api 504 Gateway Timeout Error occured while trying to proxy to: node1:4200/api/v1/user

New Contributor

Ambari server in node2,  metron server install by node1,mysql server in node2

I in Ambari web ui try start the Metron REST, but always start success after 5 second to stop,

version:

    metron :0.4.1

    Ambari: 2.4.3.0

 

 

WX20191105-084731.pngWX20191105-084954.png

 

log file:

/var/log/metron/metron-rest.log

 

Spoiler

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1128)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1056)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:566)
... 19 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceInitializer': Invocation of init method failed; nested exception is org.springframework.jdbc.datasource.init.UncategorizedScriptException: Failed to execute database script; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

 

 

my config :

/etc/default/metron

 

 

 

 

 

 

 

 

 

JAVA_HOME="/usr/jdk64/jdk1.8.0_77"
METRON_HOME="/usr/metron/0.4.1"
METRON_USER="metron"
METRON_LOG_DIR="/var/log/metron"
METRON_PID_DIR="/var/run/metron"
METRON_REST_PORT=8082
METRON_JVMFLAGS=""
METRON_SPRING_PROFILES_ACTIVE=""
METRON_JDBC_DRIVER="com.mysql.jdbc.Driver"
METRON_JDBC_URL="jdbc:mysql://10.0.81.162:3306/metronrest"
METRON_JDBC_USERNAME="metron"
METRON_JDBC_PLATFORM="mysql"
METRON_JDBC_CLIENT_PATH="/usr/share/java/mysql-connector-java.jar"
METRON_TEMP_GROK_PATH="/apps/metron/patterns/tmp"
METRON_SPRING_OPTIONS=""
ZOOKEEPER="node3:2181,node1:2181"
BROKERLIST="node1:6667"
HADOOP_CONF_DIR="/etc/hadoop/conf/"
STORM_REST_URL="http://node1:8744"
SECURITY_ENABLED=false
KAFKA_SECURITY_PROTOCOL="PLAINTEXT"
PARSER_TOPOLOGY_OPTIONS="/home/metron/.storm/storm.config"
METRON_ESCALATION_TOPIC="escalation"

 

 

 

 

 

 

 

 

 

I try connect node2 mysql server use metron user by node1,is success

mysql -umetron -h node2 -p

 

 

 

 

 

 

 

 

 

root@node1 ~# mysql -umetron -h node2 -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 5.5.64-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| metronrest         |
| mysql              |
| performance_schema |
| test               |
+--------------------+
5 rows in set (0.01 sec)

 

 

 

 

 

 

 

 

 

 

Don't have an account?
Coming from Hortonworks? Activate your account here