Support Questions

Find answers, ask questions, and share your expertise

Metron Management UI cannot be accessed

avatar

43512-metronerrorpng.png

As shown in the attachment, this i get this error when trying to login the metron mangement ui. All of the the metron services are running and there is no notification of error. How to solve this or any suggestion on methods that i can use to better understand this error?

It seems that there is no connection between the the metron management ui and the mysql database. I have followed the method to set up REST as describe in Metron Installation Guide

Thank you.

1 ACCEPTED SOLUTION

avatar
Super Collaborator

In your above reply, for the JDBC URL, I can there is a leading space before the DB name 'metronrest'. Can you correct this and give it a try? Maybe that is the one causing the issue.

Use:

jdbc:mysql://127.0.0.1:3306/metronrest

Instead of:

jdbc:mysql://127.0.0.1:3306/ metronrest

View solution in original post

9 REPLIES 9

avatar
Super Collaborator
@new data

do you see any failures in either the rest or managementui logs at /var/log/metron?

Also, if you were to do a quick troubleshooting to isolate if MySQL has been setup properly, you can try the following. Go to Ambari UI -> Metron -> Config. Set the following parameters with values mentioned.

Metron JDBC Driver = org.h2.Driver
Metron JDBC password = root
Metron JDBC platform = h2
Metron JDBC URL = jdbc:h2:file:~/metrondb
Metron JDBC username = root
Active Spring profiles = dev

Restart the REST and Management UI services, fire up management UI and login using the credentials admin/password.

avatar

@asubramanian

in the rest log with my current REST settings only this is stated,

Error: Could not find or load main class .usr.share.java.mysql-connector-java.jar:.usr.metron.0.4.1.lib.metron-elasticsearch-0.4.1-uber.jar

My metron REST settings is based on this as stated in MetronInstallation

Metron JDBC client path: /usr/share/java/mysql-connector-java.jar
Metron JDBC Driver: com.mysql.jdbc.Driver
Metron JDBC password: <DB PASSWORD>
Metron JDBC platform: mysql
Metron JDBC URL: jdbc:mysql://127.0.0.1:3306/<DB NAME>
Metron JDBC username: <DB USERNAME>

-----------------------------------------------------------------------------------------------------------------------

I tried your settings of metron rest, it returns that the org.h2.Driver cannot be found and some other errors

avatar
Super Collaborator

@new data

The following error suggests that you might not have the JDBC connector properly configured

Error: Could not find or load main class .usr.share.java.mysql-connector-java.jar:.usr.metron.0.4.1.lib.metron-elasticsearch-0.4.1-uber.jar

Can you check if you are able to locate the file /usr/share/java/mysql-connector-java.jar on the metron host? Also in your error message, I wonder why are you seeing dots "." in the file path. Can you recheck that as well?

As for the default H2 driver, it should work out of the box without issues. Can you paste these few details to troubleshoot further:

* Which version of Metron are you using?

* What type? Full-dev or bare-metal?

* Test environment - how many nodes?

avatar

@asubramanian

The mysql-connector-java.jar is there. I am not sure why the "." is in the file path as i already set the path with "/".

I am using metron 0.4.1, bare-metal and trying out metron on single node.

avatar
Super Collaborator
The mysql-connector-java.jar is there. I am not sure why the "." is in the file path as i already set the path with "/".

Hmm.. this is strange indeed. How did you set the path? through the Ambari UI or by editing the config files on the host?

Can you post a screenshot of the Ambari UI -> Metron -> Configs -> REST tab details?

avatar

Metron REST port

8082

Metron JDBC URL

jdbc:mysql://127.0.0.1:3306/ metronrest

Metron JDBC Driver

com.mysql.jdbc.Driver

Metron JDBC username

<mysql username>

Metron JDBC password

<mysql password>

Metron JDBC platform

mysql

Metron JDBC client path

/usr/share/java/mysql-connector-java.jar

avatar

yes the problem was there all along. The problem was not with the leading space (i accidentally add the leading space while posting the comment). The problem was actually with the port in the url. You have directed me towards the right source of the problem. It was a very weird problem as i have disable firewall and such in that virtual machine .I solved it by changing it to jdbc:mysql://node1/metronrest as i noticed that my hive service can create a table in the mysql database without using any port.

So thank you very much @asubramanian.

avatar
Super Collaborator

Hey @new data, glad to hear that you were able to resolve the issue!

Would you mind marking the answer as accepted ?

avatar
Super Collaborator

In your above reply, for the JDBC URL, I can there is a leading space before the DB name 'metronrest'. Can you correct this and give it a try? Maybe that is the one causing the issue.

Use:

jdbc:mysql://127.0.0.1:3306/metronrest

Instead of:

jdbc:mysql://127.0.0.1:3306/ metronrest