Streamparse wordcount example - apache-kafka

I have been wanting to use Apache Storm to stream from Kafka. I am more comfortable with Python, so I decided to use streamparse (https://github.com/Parsely/streamparse). The word count example is the introductory example. I have been trying to get it to work on my local machine. I have the following version of JDK, lein and storm installed:
Leiningen 2.6.1 on Java 1.8.0_73 Java HotSpot(TM) 64-Bit Server VM
I run the following steps after following streamparse:
sparse quick start wordcount
cd wordcount
sparse run
I get the following error:
Retrieving org/apache/storm/storm-core/0.10.1/storm-core-0.10.1.pom from central
Retrieving org/apache/storm/storm/0.10.1/storm-0.10.1.pom from central
Retrieving org/apache/storm/storm-core/0.10.1/storm-core-0.10.1.jar from central
Could not transfer artifact com.parsely:streamparse:pom:0.0.4-SNAPSHOT from/to clojars (https://clojars.org/repo/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Could not transfer artifact clojure-complete:clojure-complete:pom:0.2.4 from/to clojars (https://clojars.org/repo/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
My project.clj file reads like this :
(defproject wordcount "0.0.1-SNAPSHOT"
:source-paths ["topologies"]
:resource-paths ["_resources"]
:target-path "_build"
:min-lein-version "2.6.1"
:jvm-opts ["-client"]
:dependencies [[org.apache.storm/storm-core "0.10.1"]
[com.parsely/streamparse "0.0.4-SNAPSHOT"]
]
:jar-exclusions [#"log4j\.properties" #"backtype" #"trident" #"META-INF" #"meta-inf" #"\.yaml"]
:uberjar-exclusions [#"log4j\.properties" #"backtype" #"trident" #"META-INF" #"meta-inf" #"\.yaml"]
)
So, my lein and storm core versions are set correctly. I'm not sure where I am going wrong . Could somebody help me out?
-Thanks

This is because java is not recognizing root certificate authority (CA) SSL certificate of https://clojars.org/repo.
Solution is to add that certificate to java cacerts file so that it got permanently accepted.
Step 1 : Get root certificate of https://clojars.org
Open https://clojars.org in a chrome browser.
locate Lock symbol just besides your address bar and click on it.
view Details
Click on top most certificate on hierarchy and confirm it is tailed with Root CA phrase.
drag and drop that image which you saw written certificate on desktop.
Thats it! you got your root certificate!
Step 2 : Get that certificate added to java cacerts file.
use keytool.exe inside your jre bin folder.
fire following command to place your certificate inside cacerts file
keytool –import –noprompt –trustcacerts –alias ALIASNAME -file
/PATH/TO/YOUR/DESKTOP/CertificateName.cer -keystore
/PATH/TO/YOUR/JDK/jre/lib/security/cacerts -storepass changeit
That is it! you got your problem resolved.
PLEASE NOTE
Do confirm that the jre which is giving you this PKIX error(JRE used by KAFKA) that is where you are performing STEP 2. If you would try with another jre problem would be as it is.
Do use only one jre which is inside JDK it decreases chance to have issues.

If you are using debian or ubuntu you can execute:
$ sudo update-ca-certificates -f

Related

Why is Install4j executable signing not working any more?

I'm trying to build an Install4j project that was working fine a few weeks ago, but now it's complaining about a timestamp service not being available while the executable is being signed. Is there another timestamp service we should be using or is this one only temporarily offline?
I'm using Install4j 7.0.12.
Preparing configuration
Creating media file 'Windows':
Collecting files:
Compiling launchers:
Compiling launcher 'test':
Signing executable
Build failed.
Cause: java.io.IOException
http://timestamp.globalsign.com
You can set a different timestamp signing service by setting the VM parameter -Dinstall4j.timestampUrl=http://... in bin/install4j.vmoptions
or by setting the compiler variable sys.ext.timestampUrl in your project.
Cause: java.io.FileNotFoundException
http://timestamp.globalsign.com
Adding an entry to General Settings > Compiler Variables with the following details seems to do the trick:
sys.ext.timestampUrl = http://timestamp.sectigo.com
This is probably related to http://timestamp.verisign.com/scripts/timstamp.dll not available.

Some paths don't exist in "typesafe" repository when I use command ”sbt package“

When I package the scala project using "sbt package", an error occur to me ,like this:
Server access Error: Connection timed out: connect url=https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-git/scala_2.10/sbt_0.13/0.8.5/ivys/ivy.xml
and I input path
https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-git/scala_2.10/sbt_0.13/0.8.5/ivys
into browser I use which browse sites through proxy, it will redirect to
https://dl.bintray.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-git/scala_2.10/sbt_0.13/0.8.5/ivys
I find the following path exists:
https://dl.bintray.com/typesafe/ivy-releases/com.typesafe.sbt/"
but
sbt-git/scala_2.10/sbt_0.13/0.8.5/
Doesn't the project is "marathon" which is written in Scala, the site is "https://github.com/mesosphere/marathon". I download the project, then switch into the root directory of "marathon",and using "sbt package" commder. Are there some problem in repositories?

cmake to eclipse project conversion issue

I am trying to create an eclipse project from a cmake project .
I used the following command
cmake -G "Eclipse CDT4 - Unix Makefiles" ./`
it gives the following error
CMake Error at CMakeLists.txt:119 (find_package):
By not providing "FindGlib.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Glib", but
CMake did not find one.
Could not find a package configuration file provided by "Glib" (requested
version 2.28) with any of the following names:
GlibConfig.cmake
glib-config.cmake
Add the installation prefix of "Glib" to CMAKE_PREFIX_PATH or set
"Glib_DIR" to a directory containing one of the above files. If "Glib"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
I have glib installed . actually it couldn't resolve the path i guess. wherever find is there in cmake file , it is giving the smiler errors. please i suggest a way out, i badly need to load this project in cmake. Thanks.
Here is line 119 where error message is pointing
find_package(Glib 2.28 REQUIRED)
include_directories(${Glib_INCLUDE_DIRS})
list(APPEND LIBS ${Glib_LIBRARIES})
add_definitions(${Glib_DEFINITIONS})
When you call find_package(MyPackage) in a CMake file, it tries to find a FindMyPackage.cmake configuration in its system path (/usr/share/cmake-2.8/Modules on my Ubuntu box), or in the directory you did specify as CMAKE_MODULE_PATH).
The solution to your problem is to create a directory for modules in your source tree (e.g. CMakeModules), put in it a FindGlib.cmake file that you can find using Google, and add
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
in your CMakeLists.txt before the actual call to find_package.
(your problem is not related to the Eclipse generator, you could remove that from the title of the question).

Compiling android native app calling ndk-build from eclipse, on ubuntu

On ubuntu 11.10 I installed eclipse from repositories, installed adt and cdt plugins. I am able to compile the hello-jni example using command line, but i would like to use eclipse for the task.
I followed the guide here: http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ and defined a PATH variable in eclipse preferences (window->preferences->c/c++->environment), pointing to the ndk-r7b folder. But the project won't buid. I get this error:
(Cannot run program "ndk-build"
(in directory "/home/athos/android/ndk-r7b/samples/hello-jni"):
java.io.IOException:
error=2, File o directory non esistente)
(last line should be "no such file or directory" in english)
If I specify "${PATH}/ndk-build" or "/home/athos/android/ndk-r7b/ndk-build" as the build command. i get this:
/home/lavoro/android/ndk-r7b/ndk-build
ERROR: Cannot find 'make' program. Please install Cygwin make package
/home/lavoro/android/ndk-r7b/ndk-build: 40: dirname: not found
or define the GNUMAKE variable to point to it.
If I define the GNUMAKE variable in window->preferences->c/c++->environment i get this:
ERROR: Your GNUMAKE variable is defined to an invalid name: /usr/bin/make
Please fix it to point to a valid make executable (e.g. /usr/bin/make)
Which is funny, since It suggests the exact same directory I indicated. Make is installed and present at the indicated location.
What am I missing?
It's a bit ugly, but you can always put
/fully/qualified/path/to/ndk-build
In your build command.

PDFlib works only if the library is in /usr/lib not in a custom path

we are using PDFlib for personalizing PDFs.
The pdflib.jar library and the libpdf_java.so file are both in the folder:
/home/user/my/custom/library/path/
I start the server with this argument:
java -Djava.library.path=/home/user/my/custom/library/path/
like it is mentioned in the pdflib tutorial
After deploying on my jBoss5 Server i got this error message:
ERROR [STDERR] Cannot load the PDFlib shared library/DLL for Java.
Make sure to properly install the native PDFlib library. For your
information, the current value of java.library.path is:
/home/user/my/custom/library/path/
So, the path ist correct (i tried it with and without the / at the end)
If I put the jar and the lib in my /usr/lib folder, everything works fine, but not with my custom folders.
I use it on a linux 64bit, if that matters!
The custom folder and the files got chmod 755 - so this shouldn't be the problem
Looking forward to your hints!