Cassandra 2.0 and later require Java 7u25 or later but i'm using jdk1.7.0_101 - java-7

I am running Cassandra Server 2.1.5. On friday, I applied the latest java 7 patch, jdk1.7.0_101. Now, cassandra will not start. The cassandra log contains, "Cassandra 2.0 and later require Java 7u25 or later."
Any help will be appreciated.

Open your cassandra-env.sh (/etc/dse/cassandra/cassandra-env.sh for DSE)
Comment ligne 104 (exit 1;)
if [ "$JVM_VERSION" \< "1.8" ] && [ "$JVM_PATCH_VERSION" \< "25" ] ; then
echo "Cassandra 2.0 and later require Java 7u25 or later."
#exit 1;
fi
and restart dse or cassandra.
The Problem is the comparison between the versions. In string 101 < 25.
Bye, QG

Related

Failing to connect MQ with java 11

After upgrading to JDK 11 from JDK 8 and MQ 9.2.0.5 (from 9.2.0.4), i'm getting the below error when trying to open JMS connection.
I'm running on WLS 14.
I also upgraded allclient.jar to 9.2.0.5.
I tried running it with previous MQ (9.2.0.4) which worked fine with java 8, i get the same issue.
Same code works fine with MQ 9.2.0.4, JDK 8 and WLS 12.
I verified that method exists in jar and verified no other versions of allclient jars exists.
com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195;AMQ9546: Error return code
received.
[1=java.lang.NoSuchMethodException[com.ibm.mq.jmqi.remote.api.RemoteFAP.(com.ibm.mq.jmqi.JmqiEnvironment,
int)],3=Class.getConstructor0]
at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:857)
at com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:702)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:8437)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:7815)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl._createConnection(JmsConnectionFactoryImpl.java:322)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:242)
at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6026)
at com.ibm.mq.jms.MQConnectionFactory.createConnection(MQConnectionFactory.java:6086)
at org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter.doCreateConnection(UserCredentialsConnectionFactoryAdapter.java:188)
at . Caused by: java.lang.NoSuchMethodException: com.ibm.mq.jmqi.remote.api.RemoteFAP.(com.ibm.mq.jmqi.JmqiEnvironment,
int)
at java.base/java.lang.Class.getConstructor0(Class.java:3349)
at java.base/java.lang.Class.getConstructor(Class.java:2151)
at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:764)
Remove if you have com.ibm.* related packages in prefer-application-packages section in weblogic.xml.
I just ran a couple of Java/JMS applications using OpenJDK 11 and they ran fine. I agree with Doug Grove that you probably have a mismatch of MQ JAR files.
Add the following line to your code and then update your question with the output:
System.out.println("java.class.path="+System.getProperty("java.class.path"));
If you want to get fancy then you can do:
if (null != System.getProperty("java.class.path"))
{
if (System.getProperty("os.name").startsWith("Windows"))
System.out.println("java.class.path=\n"+(System.getProperty("java.class.path")).replace(';', '\n'));
else
System.out.println("java.class.path\n="+(System.getProperty("java.class.path")).replace(':', '\n'));
}

HIVE_STATS_JDBC_TIMEOUT for Hive queries in Spark

I've just setup a new hadoop 3.0 cluster with Hive 2.3.2 and Spark 2.3. When I want to run some queries on Hive tables, getting following error.
I know there were some bugs in Hive, but seems like it was fixed for 2.1.1, but not sure what's the situation with 2.3.2 version. Do you have any idea if that could be handled somehow?
Thanks
Using Scala version 2.11.8 (OpenJDK 64-Bit Server VM, Java 1.8.0_151)
Type in expressions to have them evaluated.
Type :help for more information.
scala> import spark.sql
import spark.sql
scala> sql("show databases")
java.lang.NoSuchFieldError: HIVE_STATS_JDBC_TIMEOUT
at org.apache.spark.sql.hive.HiveUtils$.formatTimeVarsForHiveClient(HiveUtils.scala:205)
at org.apache.spark.sql.hive.HiveUtils$.newClientForMetadata(HiveUtils.scala:286)
at org.apache.spark.sql.hive.HiveExternalCatalog.client$lzycompute(HiveExternalCatalog.scala:66)
at org.apache.spark.sql.hive.HiveExternalCatalog.client(HiveExternalCatalog.scala:65)
at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$databaseExists$1.apply$mcZ$sp(HiveExternalCatalog.scala:195)
at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$databaseExists$1.apply(HiveExternalCatalog.scala:195)
at org.apache.spark.sql.hive.HiveExternalCatalog$$anonfun$databaseExists$1.apply(HiveExternalCatalog.scala:195)
at org.apache.spark.sql.hive.HiveExternalCatalog.withClient(HiveExternalCatalog.scala:97)
at org.apache.spark.sql.hive.HiveExternalCatalog.databaseExists(HiveExternalCatalog.scala:194)
at org.apache.spark.sql.internal.SharedState.externalCatalog$lzycompute(SharedState.scala:114)
at org.apache.spark.sql.internal.SharedState.externalCatalog(SharedState.scala:102)
at org.apache.spark.sql.hive.HiveSessionStateBuilder.externalCatalog(HiveSessionStateBuilder.scala:39)
at org.apache.spark.sql.hive.HiveSessionStateBuilder.catalog$lzycompute(HiveSessionStateBuilder.scala:54)
at org.apache.spark.sql.hive.HiveSessionStateBuilder.catalog(HiveSessionStateBuilder.scala:52)
at org.apache.spark.sql.hive.HiveSessionStateBuilder$$anon$1.<init>(HiveSessionStateBuilder.scala:69)
at org.apache.spark.sql.hive.HiveSessionStateBuilder.analyzer(HiveSessionStateBuilder.scala:69)
at org.apache.spark.sql.internal.BaseSessionStateBuilder$$anonfun$build$2.apply(BaseSessionStateBuilder.scala:293)
at org.apache.spark.sql.internal.BaseSessionStateBuilder$$anonfun$build$2.apply(BaseSessionStateBuilder.scala:293)
at org.apache.spark.sql.internal.SessionState.analyzer$lzycompute(SessionState.scala:79)
at org.apache.spark.sql.internal.SessionState.analyzer(SessionState.scala:79)
at org.apache.spark.sql.execution.QueryExecution.analyzed$lzycompute(QueryExecution.scala:57)
at org.apache.spark.sql.execution.QueryExecution.analyzed(QueryExecution.scala:55)
at org.apache.spark.sql.execution.QueryExecution.assertAnalyzed(QueryExecution.scala:47)
at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:74)
at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:638)
... 49 elided
I am running spar 2.3 with Hive 2.3.2 and encounter similar issue.
The fix you mentioned is for Hive 2.1 as can be seen from the Spark Jira following:
https://issues.apache.org/jira/browse/SPARK-13446
You can see from the latest comment that people are getting exactly same error as yours.
Also, as this so question answered, the current Hive version supported by Spark is 2.1

HDP upgrade to 2.6.4 failed from HDP current version - 2.6.0.3

we have ambari cluster version - 2.5.0.3 ( with 3 masters nodes and 3 workers nodes )
we are in the middle of upgrade from HDP version 2.6.0.3 to 2.6.4 version
in the final stage installation failed
the errors that apears under - Finalize Upgrade Pre-Check are
The following components were found to have version mismatches. Finalize will not complete successfully:
master03.sys5dns.com: HDFS/ZKFC reports UNKNOWN
master01.sys5dns.com: HDFS/ZKFC reports UNKNOWN
also that:
{"hosts":["master01.sys5dns.com","master03.sys5dns.com"],"host_detail":{"master01.sys5dns.com":[{"service":"HDFS","component":"ZKFC","version":"UNKNOWN"}],"master03.sys5dns.com":[{"service":"HDFS","component":"ZKFC","version":"UNKNOWN"}]}}
we are stuck in this stage
please advice what is the meaning of - HDFS/ZKFC reports UNKNOWN ?
Seems to have been fixed in https://issues.apache.org/jira/browse/AMBARI-21526
Looks like ZKFC started advertising a version between HDP-2.3 and HDP-2.4. The suggestion would be to rollback to backup, upgrade Ambari to at least 2.5.2 and then upgrade stack
Or you may try looking up for a less drastic solution at https://community.hortonworks.com/index.html

Ruby Logger rotation on CentOs

I´m doing some tests with default ruby Logger
and I´m getting this error on file rotation
log rotation inter-process lock failed. Text file busy #
rb_file_s_rename - (file.log, file.log.0)
log writing failed. closed stream
log shifting failed. closed stream
My environment.
CentOS 7.2.1511
Ruby: 2.0.0, 2.1.0, 2.3.0, 2.3.1
Note:
This error only occurs on CentOS with ruby versions after 2.0.0. With ruby 2.0.0 works fine!
I made some tests using Ubuntu with all ruby versions after 1.9 and
this error not occurs.
Here my test code
require 'logger'
begin
puts "Starting test"
# rotate when file size equals 20kb keeping 3 old logs
log = Logger.new("file.log", 3, 20000)
while true
puts "Logging..."
log.info "info"
log.error "error"
log.warn "warn"
log.debug "debug"
sleep(1)
end
rescue Interrupt => _
puts "Exiting..."
end
Thanks for help

Elasticsearch OS X: Could not initialize class org.elasticsearch.common.xcontent.XContentFactory

using ElasticSearch with Rails. (0.19.1)
After restart of my Mac all of a sudden it won't start anymore. Not sure what changed (did update Java recently)
I installed via homebrew, and after re-install same issue.
when I try and start it with:
elasticsearch -f -D es.config=/usr/local/Cellar/elasticsearch/0.19.1/config/elasticsearch.yml
I get this:
[2012-09-13 10:33:38,865][INFO ][node ] [Ulysses] {0.19.1}[3944]: initializing ...
[2012-09-13 10:33:38,873][INFO ][plugins ] [Ulysses] loaded [], sites []
[2012-09-13 10:33:40,381][ERROR][bootstrap ] {0.19.1}: Initialization Failed ...
1) NoClassDefFoundError[Could not initialize class org.elasticsearch.common.xcontent.XContentFactory]2) StackOverflowError[null]
Can't find much on this error and really stuck now...
Any tips much appreciated!
Thanks
Can you try and use a newer version of elasticsearch, it should fixed there (homebrew should have 0.19.9). Alternatively, the fix is simple and requires changing in the elasticsearch.in.sh file this line: JAVA_OPTS="$JAVA_OPTS -Xss128k" to this: JAVA_OPTS="$JAVA_OPTS -Xss256k".

Resources