How to fix Apache Metron Miscellaneous Issues

I had a problem with Zeppelin after rebooting this machine and had to manually create the Zeppelin run directory:

# mkdir /var/run/zeppelin
# chown zeppelin.hadoop zeppelin/

Additionally, while working with Metron, I’ve noticed that at some point Zeppelin Notebook started, but immediately stopped again. In the logs, I could see “Address already in use” messages. It turns out that there was still a lingering Zeppelin process on the host. To fix it, stop Zeppelin Notebook in Ambari and then kill the latent process:

# ps aux | grep zeppelin
# kill <zeppelin_java_pid>

Afterwards, restart Zeppelin Notebook via Ambari.

I had a couple of issues with Elasticsearch where it wouldn’t find a master. This was fixed by doing the following. In Ambari, set the following items:

"masters_also_are_datanodes" to "true"
"expected_data_nodes" = "0"
"gateway_recover_after_data_nodes" = "1"
Restart all services. At this point, I noticed the following in :/etc/elasticsearch/elasticsearch.yml":
node:
  data: "true"
  master: "true"
  name: metron1.local

After changing this to :

node:
  data: true
  master: true
  name: metron

and restarting elasticsearch with “service elasticsearch restart”, elasticsearch started indexing.

Another issue with Elasticsearch was that I saw the following error message in Kibana:

plugin:elasticsearch     Elasticsearch is still initializing the kibana index.

This was fixed by deleting the Kibana index “.kibana”: “curl -XDELETE http://localhost:9200/.kibana”

Miscellaneous Services

  • Load the correct Elasticsearch template with:
    “# curl -s -w “%{http_code}” -u <USERNAME>:<PASSWORD> -H “X-Requested-By: ambari” -X POST -d ‘{ “RequestInfo”: { “context”: “Install ES Template from REST”, “command”: “ELASTICSEARCH_TEMPLATE_INSTALL”},”Requests/resource_filters”: [{“service_name”: “METRON”,”component_name”: “METRON_INDEXING”,”hosts” : “<HOSTNAME>”}]}’ http://<AMBARI HOST>:8080/api/v1/clusters/<CLUSTERNAME>/requests”

For example:

“# curl -s -w “%{http_code}” -u admin:admin -H “X-Requested-By: ambari” -X POST -d ‘{ “RequestInfo”: { “context”: “Install ES Template from REST”, “command”: “ELASTICSEARCH_TEMPLATE_INSTALL”},”Requests/resource_filters”: [{“service_name”: “METRON”,”component_name”: “METRON_INDEXING”,”hosts” : “metron”}]}’ http://192.168.10.10:8080/api/v1/clusters/metron/requests

  • Load Kibana Dashboard with:

“# curl -s -w “%{http_code}” -u <USERNAME>:<PASSWORD> -H “X-Requested-By: ambari” -X POST -d ‘{ “RequestInfo”: { “context”: “Install Kibana Dashboard from REST”, “command”: “LOAD_TEMPLATE”},”Requests/resource_filters”: [{“service_name”: “KIBANA”,”component_name”: “KIBANA_MASTER”,”hosts” : “<HOSTNAME>”}]}’ http://<AMBARI HOST>:8080/api/v1/clusters/<CLUSTERNAME>/requests”

For example:

“# curl -s -w “%{http_code}” -u admin:admin -H “X-Requested-By: ambari” -X POST -d ‘{ “RequestInfo”: { “context”: “Install Kibana Dashboard from REST”, “command”: “LOAD_TEMPLATE”},”Requests/resource_filters”: [{“service_name”: “KIBANA”,”component_name”: “KIBANA_MASTER”,”hosts” : “metron”}]}’ http://192.168.10.10:8080/api/v1/clusters/metron/requests”

  • If you installed Metron on a single node, you might have to increase the number of Storm supervisor slots from the default 2 to 5 or more. This can be done by editing the “supervisor.slots.ports” under Storm in the Ambari UI.

Change: “supervisor.slots.ports: [6700, 6701]” to “supervisor.slots.ports: [6700, 6701, 6702, 6703, 6704, 6705]”

# cd /root
# wget http://apache.mirror.iweb.ca/nifi/1.2.0/nifi-1.2.0-bin.tar.gz
# tar xf nifi-1.2.0-bin.tar.gz

Before we run NiFi, we need to change the port as the default port collides with the Ambari port. To do this, we need to change the value “nifi.web.http.port=8080” to “nifi.web.http.port=8089” in the file “nifi-1.1.2/conf/nifi.properties”. Install and start NiFi afterwards:

# nifi-1.2.0/bin/nifi.sh install
# nifi-1.2.0/bin/nifi.sh start

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: