Member since
09-19-2016
8
Posts
3
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
5501 | 09-20-2016 07:43 AM |
10-13-2016
10:42 AM
Hello Hoda, When I run this program I'm getting this error: Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
16/10/13 16:07:48 INFO Remoting: Starting remoting
16/10/13 16:07:49 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://sparkDriver@192.168.17.81:40334]
Exception in thread "main" java.lang.IncompatibleClassChangeError: class org.apache.spark.streaming.scheduler.StreamingListenerBus has interface org.apache.spark.scheduler.SparkListener as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.spark.streaming.scheduler.JobScheduler.<init>(JobScheduler.scala:54)
at org.apache.spark.streaming.StreamingContext.<init>(StreamingContext.scala:183)
at org.apache.spark.streaming.StreamingContext.<init>(StreamingContext.scala:84)
at org.apache.spark.streaming.api.java.JavaStreamingContext.<init> (JavaStreamingContext.scala:138)
at SparkTest.main(SparkTest.java:29) ------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 4.181s
Finished at: Thu Oct 13 16:07:50 IST 2016
Final Memory: 15M/212M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project SparkPractise: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
and SparkTest.java 29th line is
JavaStreamingContext ssc = new JavaStreamingContext(conf, new Duration(3000));
Please help me with this
... View more
09-20-2016
07:43 AM
2 Kudos
Its working now. I had to change my ambari.properties file... added db.mysql.jdbc.name=/var/lib/ambari-server/resources/mysql-connector-java-5.1.28.jar and modified these lines server.jdbc.rca.url=jdbc:mysql://localhost:3306/ambari server.jdbc.url=jdbc:mysql://localhost:3306/ambari
... View more
09-20-2016
05:11 AM
And the permissions for mysql are: /var/lib$ ls -l | grep 'mysql' drwx------ 6 mysql mysql 4096 Sep 20 10:26 mysql
... View more
09-20-2016
05:08 AM
Hello Spann, I'm able to connect to mysql cli, and I'm able to connect to mysql through other projects of mine. My bind address is 127.0.0.1 and logs in /var/log/mysql/error.log is empty. Output for telnet localhost 3306 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'.
[
5.6.31-0ubuntu0.14.04.2�"q7[E(7�{!-_uS{54B3smysql_native_password Connection closed by foreign host. And the same error is appearing in logs. ERROR [main] DBAccessorImpl:102 - Error while creating database accessor
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
... View more
09-19-2016
12:53 PM
Thanks pankaj for the reply, I added export CLASSPATH=$CLASSPATH:/usr/share/java/mysql-connector-java-5.1.28.jar export CLASSPATH=$CLASSPATH:/usr/share/java/mysql.jar export CLASSPATH=$CLASSPATH:/usr/share/java/mysql-connector-java.jar in /var/lib/ambari-server/ambari-env.sh but again the same error is appearing
... View more
09-19-2016
11:43 AM
1 Kudo
I have followed http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.0/bk_Installing_HDP_AMB/content/_download_the_ambari_repo_ubuntu14.html link to install ambari-server whose version is 2.1.2 and for mysql I followed https://docs.hortonworks.com/HDPDocuments/Ambari-2.1.1.0/bk_ambari_reference_guide/content/_using_ambari_with_mysql.html sudo ambari-server start Using python /usr/bin/python2.7
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start.........
ERROR: Exiting with exit code -1.
REASON: Ambari Server java process died with exitcode 1. Check /var/log/ambari-server/ambari-server.out for more information. and the error in /var/log/ambari-server/ambari-server.log is ERROR [main] DBAccessorImpl:102 - Error while creating database accessor
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure and i have copied these jars in the /usr/share/java folder and also gave classpath for these jars in bashrc
... View more
Labels:
- Labels:
-
Apache Ambari