How to setup Apache Atlas using embedded cassandra and Apache Solr - apache-atlas

Step 1: Clone the repository.
git clone https://github.com/apache/atlas
Step 2: Generated tar file by executing below command
mvn clean -DskipTests package -Pdist,embedded-cassandra-solr
Step 3: Once the build is successful, extracted ‘apache-atlas-3.0.0-SNAPSHOT-server.tar’ file and executed below command.
.\bin\atlas_start.py
Seen below messages in console.
Starting Atlas server on host: localhost
Starting Atlas server on port: 21000
......................
Apache Atlas Server started!!!
But When I hit the url 'http://localhost:21000/', I am getting service unavailable message.
HTTP ERROR 503 Service Unavailable
URI: /
STATUS: 503
MESSAGE: Service Unavailable
SERVLET: -
Log files are empty, not sure how to identify the issue.
Couple of Questions
a. Do I need to explicitly setup cassandra and Apache solr for emebdded mode too? In that case please suggest me a documentation.
b. even though I generated the build using embedded cassandra file, while launching the application, it was still lokking for HADOOP_HOME property. Can I know the reason for this?

I got the same problem and, after a while, I found that Zookeeper doesn't start at all; so, I stopped the Zookeeper service and restarted the installation of atlas. (Here is the link of the installation that I followed : https://manjitsingh664.medium.com/apache-atlas-installation-guide-9098df98d5c3.)
For your case, replace:
mvn clean -DskipTests package -Pdist,embedded-hbase-solr
with:
mvn clean -DskipTests package -Pdist,embedded-cassandra-solr

Related

Keycloak start failed: org.eclipse.microprofile.context-propagation.microprofile-context-propagation-api-1.2.jar does not exist

I follow this Keycloak guide to start Keycloak on my server. I am receiving the next exception when running the bin/kc.sh start-dev command:
ERROR: Failed to run 'build' command.
ERROR: java.lang.IllegalArgumentException: /srv/keycloak/lib/lib/main/org.eclipse.microprofile.context-propagation.microprofile-context-propagation-api-1.2.jar does not exist
ERROR: /srv/keycloak/lib/lib/main/org.eclipse.microprofile.context-propagation.microprofile-context-propagation-api-1.2.jar does not exist
ERROR: /srv/keycloak/lib/lib/main/org.eclipse.microprofile.context-propagation.microprofile-context-propagation-api-1.2.jar
For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.
The Keycloak version is 18.0.1, the installed JDK version is 11.0.15, the OS is Debian 11
Can anyone tell me how to solve it? Thanks
It turned out that some of the jars were missing after extracting the loaded Keycloak 18.0.2 tar.gz file on the server. After replacing the jars under keycloak/lib/lib/main and keycloak/lib/lib/deployment I was able to start the Keycloak. To do that, I extracted Keycloak 18.0.2 tar.gz on my local machine and uploaded corresponding jars to the server machine.

How to resolve DNS lookup error when trying to run example microservice application using minikube

Dear StackOverflow community!
I am trying to run the https://github.com/GoogleCloudPlatform/microservices-demo locally on minikube, so I am following their development guide: https://github.com/GoogleCloudPlatform/microservices-demo/blob/master/docs/development-guide.md
After I successfully set up minikube (using virtualbox driver, but I tried also hyperkit, however the results were the same) and execute skaffold run, after some time it will end up with following error:
Building [shippingservice]...
Sending build context to Docker daemon 127kB
Step 1/14 : FROM golang:1.15-alpine as builder
---> 6466dd056dc2
Step 2/14 : RUN apk add --no-cache ca-certificates git
---> Running in 0e6d2ab2a615
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: DNS lookup error
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/community: DNS lookup error
ERROR: unable to select packages:
git (no such package):
required by: world[git]
Building [recommendationservice]...
Building [cartservice]...
Building [emailservice]...
Building [productcatalogservice]...
Building [loadgenerator]...
Building [checkoutservice]...
Building [currencyservice]...
Building [frontend]...
Building [adservice]...
unable to stream build output: The command '/bin/sh -c apk add --no-cache ca-certificates git' returned a non-zero code: 1. Please fix the Dockerfile and try again..
The error message suggest that DNS does not work. I tried to add 8.8.8.8 to /etc/resolv.conf on a minikube VM, but it did not help. I've noticed that after I re-run skaffold run and it fails again, the content /etc/resolv.conf returns to its original state containing 10.0.2.3 as the only DNS entry. Reaching the outside internet and pinging 8.8.8.8 form within the minikube VM works.
Could you point me to a direction how can possible I fix the problem and learn on how the DNS inside minikube/kubernetes works? I've heard that problems with DNS inside Kubernetes cluster are frequent problems you run into.
Thanks for your answers!
Best regards,
Richard
Tried it with docker driver, i.e. minikube start --driver=docker, and it works. Thanks Brian!
Sounds like issue was resolved for OP but if one is using docker inside minikube then below suggestion worked for me.
Ref: https://github.com/kubernetes/minikube/issues/10830
minikube ssh
$>sudo vi /etc/docker/daemon.json
# Add "dns": ["8.8.8.8"]
# save and exit
$>sudo systemctl restart docker

neo4j local cluster start failed

I am trying to set up a local cluster in neo4j and following this tutorial (https://neo4j.com/docs/operations-manual/current/tutorial/local-causal-cluster/#tutorial-local-cluster-configure-cores). I have downloaded the latest enterprise version 4.1.1 and have followed all the steps mentioned in the tutorial. However I am confused at one step where it is mentioned that we should move to bin directory and run command "neo4j start" . When I run this command it says neo4j service not found so I searched about it and found that I should install neo4j as a service first then the start command will start the service. When I install it the service will run for the core-01 instance, following the tutorial for core-02 and core-03 I am supposed to start neo4j also but again the start command will not work unless I install it.
Following this am I supposed to install 3 different services or it is supposed to be a single service for the whole cluster of 3 instances? If single then the neo4j service will always points to the core-01 instance.
Skipping start command If I run the command neo4j console in the bin directory of 3 instances then I get this error in all three consoles
How I am supposed to handle this?? Am I not setting neo4j service properly or there is some issue in configuration ?

how to run first example of Apache Flink

I am trying to run the first example from the oreilly book "Stream Processing with Apache Flink" and from the flink project. Each gives different errors
Example from the book gies NoClassDefFound error
Example from flink project gives java.net.ConnectException: Connection refused (Connection refused) but does create a flink job, see screenshot.
Detail below
Book example
java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError:scala/runtime/java8/JFunction1$mcVI$sp
at io.github.streamingwithflink.chapter1.AverageSensorReadings$$anon$3.createSerializer(AverageSensorReadings.scala:50)
The instructions from the book are:
download flink-1.7.1-bin-scala_2.12.tgz
extract
start cluster ./bin/start-cluster.sh
open flink's web UI http://localhost:8081
this all works fine
Download the jar file that includes examples in this book
run example
./bin/flink run \
-c io.github.streamingwithflink.chapter1.AverageSensorReadings \
examples-scala.jar
It seems that the class is not found from error message at the top of this post.
I put the jar in the same directory I am running the command
java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (Zulu 8.44.0.9-CA-macosx) (build 1.8.0_242-b20)
OpenJDK 64-Bit Server VM (Zulu 8.44.0.9-CA-macosx) (build 25.242-b20, mixed mode)
I also tried compiling the jar myself with the same error.
https://github.com/streaming-with-flink/examples-scala.git
and
mvn clean build
error is the same.
Flink project tutorial
running the SocketWindowWordCount
./bin/flink run examples/streaming/SocketWindowWordCount.jar --port 9000
I get a job but it fails
gives java.net.ConnectException: Connection refused (Connection refused)
It is not clear to me what connection is refused. I tried different ports with no change.
How can I run flink code successfully?
I tried to reproduce the failing AverageSensorReadings example, but it was working on my setup. I'll try look deeper into it tomorrow.
Regarding the SocketWindowWordCount example, the error message indicates that the Flink job failed to open a connection to the socket on port 9000. You need to open the socket before you start the job. You can do this for example with netcat:
nc -l 9000
After the job is running, you can send messages by typing and and these message will be ingested into the Flink job. You can see the stats in the WebUI evolving according to the number of words that your messages consisted of.
Note that netcat closes the socket when you stop the Flink job.
I am able to run the "Stream Processing with Apache Flink" code from IntelliJ.
See this post
I am able to run the "Stream Processing with Apache Flink" AverageSensorReadings code on my flink cluster by using sbt. I have never used sbt before but thought I would try it. My project is here
Note that I moved AverageSensorReading.scala to chapter5 a since that is where the code is explained and changed the package to com.mitzit.
use sbt assembly to create jar
run on flink cluster
./bin/flink run \
-c com.mitzit.chapter5.AverageSensorReadings \
/path/to/project/sbt-flink172/target/scala-2.11/sbt-flink172-assembly-0.1.jar
works fine. I have no idea why this works and the mvn compiled jar does not.

CKAN: Error 500

Trying to install CKAN on Ubuntu 14.04 and decided to follow this method: http://docs.ckan.org/en/latest/maintaining/installing/install-from-package.html. Everything has installed correctly, except I get a 500 Error on the CKAN page when I open up my http://localhost.
I'm pretty sure it's related to the command:
sudo ckan db init
When I do that command, it says [Errno 111] Connection refused... Problems were found while connecting to the SOLR server.
Additionally, if I take a look at my ckan_default.error.log file, this is what I get:
What could I possibly be doing wrong? What file do I need to edit to fix this connection to the SOLR server?
It looks like you can't connect to the Solr server. I'd double check all steps in this section:
http://docs.ckan.org/en/latest/maintaining/installing/install-from-source.html#setup-solr
Specially restarting Jetty once finished:
sudo service jetty restart