I have problems starting elasticsearch, the command to start is:
cd /etc/init.d && ./elasticsearch start
Out put.
/opt/jdk1.8.0_77 uno
JAVA /opt/jdk1.8.0_77/bin/java
Starting elasticsearch: [ OK ]
but executed status I get: "elasticsearch dead but subsys locked"
I tried deleting "elasticsearch", in /var/lock/subsys but, this file is generated again.
In the log says.
java.lang.RuntimeException: Java version: 1.7.0_40 suffers from critical bug https://bugs.openjdk.java.net/browse/JDK-8024830 which can cause data corruption.
Please upgrade the JVM, see http://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html for current recommendations.
If you absolutely cannot upgrade, please add -XX:-UseSuperWord to the JVM_OPTS environment variable.
Upgrading is preferred, this workaround will result in degraded performance.
But the process is started with java 8,
elasticsearch 26918 0.8 1.0 30526952 724324 ? Sl Jul03 1:29 /opt/jdk1.8.0_77/bin/java -Xms256m -Xmx1g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Delasticsearch -Des.foreground=yes -Des.path.home=/opt/elasticsearch -cp :/opt/elasticsearch/lib/elasticsearch-1.7.0.jar:/opt/elasticsearch/lib/*:/opt/elasticsearch/lib/sigar/* org.elasticsearch.bootstrap.Elasticsearch
Any help would be appreciated.
Verify java selection
alternatives --config java
Make sure java 8 is in use. Elasticsearch requires at least Java 8.
Please try setting up the variables in /etc/elasticsearch/elasticsearch.yml:
path.data: path/to/data
path.work: path/to/work
path.logs: /var/log/elasticsearch
path.conf: /etc/elasticsearch
Note: Give access to user "elasticsearch" for folder that
elasticsearch uses:
chown -R elasticsearch /path/to/data
chown -R elasticsearch /path/to/work
Related
I'm new to SonarQube, When i run "C:\sonarqube-8.5.1.38104\bin\windows-x86-64\StartSonar.bat", i receives below error,
--> Wrapper Started as Console
Launching a JVM...
Picked up _JAVA_OPTIONS: -Xmx1024M
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2020.11.16 13:40:45 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube-8.5.1.38104\temp
2020.11.16 13:40:45 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2020.11.16 13:40:45 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqube-8.5.1.38104\elasticsearch]: C:\Program Files\Java\jdk-15.0.1\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=C:\sonarqube-8.5.1.38104\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\sonarqube-8.5.1.38104\elasticsearch -Des.path.conf=C:\sonarqube-8.5.1.38104\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2020.11.16 13:40:45 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Picked up _JAVA_OPTIONS: -Xmx1024M
Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
2020.11.16 13:40:46 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2020.11.16 13:40:46 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
2020.11.16 13:40:46 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
FATAL StatusLogger Interrupted before Log4j Providers could be loaded.
java.lang.InterruptedException
at java.base/java.util.concurrent.locks.ReentrantLock$Sync.lockInterruptibly(ReentrantLock.java:159)
at java.base/java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:372)
at org.apache.logging.log4j.util.ProviderUtil.lazyInit(ProviderUtil.java:121)
at org.apache.logging.log4j.util.ProviderUtil.hasProviders(ProviderUtil.java:108)
at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:89)
at org.elasticsearch.common.unit.ByteSizeValue.<clinit>(ByteSizeValue.java:39)
at org.elasticsearch.common.network.NetworkService.<clinit>(NetworkService.java:57)
at org.elasticsearch.transport.TransportSettings.<clinit>(TransportSettings.java:74)
at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:105)
at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:135)
at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:277)
at org.sonar.application.es.EsConnectorImpl$MinimalTransportClient.<init>(EsConnectorImpl.java:103)
at org.sonar.application.es.EsConnectorImpl.buildTransportClient(EsConnectorImpl.java:89)
at org.sonar.application.es.EsConnectorImpl.getTransportClient(EsConnectorImpl.java:74)
at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:61)
at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:88)
at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:73)
at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:58)
at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:220)
at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:285)
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
<-- Wrapper Stopped
Please help me here...
Thanks in advance.
Your problem most likely occurs due to the fact that you are attempting to run SonarQube with an unsupported Java version.
From the error log, I presume that you are attempting to run it using either Java 14 or Java 15 based on these lines:
Picked up _JAVA_OPTIONS: -Xmx1024M
Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
The CMS collector was deprecated in Java 9 and removed altogether in Java 14:
https://openjdk.java.net/jeps/363
This means that the batch script that attempts to start Sonar is passing in some JVM args that are no longer valid.
Based on their documentation that only supported Java version are 8 and 11
https://docs.sonarqube.org/latest/requirements/requirements/
and version above those are not supported:
SonarQube scanners require version 8 or 11 of the JVM and the
SonarQube server requires version 11. Versions beyond Java 11 are not
officially supported.
I suggest you attempt to run it using the correct Java version. Also please check the related documentation beforehand to avoid such issues.
In Intellij IDEA 2019 I mistakenly added incorrect lines to the VM option file (Menu | Help | Edit Custom VM Options). After that, the IDEA does not launch. Reinstallation didn't help. When I run IDEA from terminal, it gives the following error:
~/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/193.7288.26/bin$ ./idea.sh
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated
in version 9.0 and will likely be removed in a future release.
Error: Could not find or load main class org.gradle.jvmargs=-Xmx2048M,
-XX:MaxMetaspaceSize=512m Caused by: java.lang.ClassNotFoundException:
org.gradle.jvmargs=-Xmx2048M, -XX:MaxMetaspaceSize=512m
But at the same time, these lines are not in the idea64.vmoptions file:
~/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/193.7288.26/bin$ cat idea64.vmoptions
-Xms128m
-Xmx750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Djdk.attach.allowAttachSelf=true
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
-Dawt.useSystemAAFontSettings=lcd
-Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine
-Dsun.tools.attach.tmp.only=true
I don't understand what the error is. Can anyone help? Thanks for any comment/answer!
Delete/edit the custom .vmoptions file.
Usually it's located in the IDE configuration directory.
On Linux look for
~/.config/JetBrains/IntelliJIdea2020.2/idea64.vmoptions (for 2020.2 Ultimate)
~/.IntelliJIdea2019.3/config/idea64.vmoptions (2019.3 Ultimate)
~/.IdeaIC2019.3/config/idea64.vmoptions (2019.3 Community)
Toolbox managed installations may use different location:
~/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/193.7288.26.vmoptions
I installed the ELK (version 5.6 elastic / logstash / kibana) stack on a CentOS 7 (using version 5.6) box using the rpm method, and have services enabled to run on startup. I verify it is running after reboot like so:
ps aux | grep logstash
logstash 744 4.6 2.2 3381144 363308 ? SNsl 09:06 0:48 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -Xmx1g -Xms256m -Xss2048k -Djffi.boot.library.path=/usr/share/logstash/vendor/jruby/lib/jni -Xbootclasspath/a:/usr/share/logstash/vendor/jruby/lib/jruby.jar -classpath : -Djruby.home=/usr/share/logstash/vendor/jruby -Djruby.lib=/usr/share/logstash/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main /usr/share/logstash/lib/bootstrap/environment.rb logstash/runner.rb --path.settings /etc/logstash
I don't see anything in that process command regarding my pipeline configurations. In my settings file, I have path.config : /etc/logstash/conf.d/*.conf.
This is modified from the default path.config : /etc/logstash/conf.d/ which according to the documentation does the exact same thing (and I've tried both).
The 3 files I have are valid, as I can ingest data manually using:
/usr/share/logstash/bin/logstash -f '/etc/logstash/conf.d/{fileA,fileB,fileC}.conf' (or I can run them individually).
I want these ingestion pipelines to start when my server reboots, but I believe I have my configurations set correctly. I even re-ran the system-install script for good measure. Any ideas?
I ended up manually changing the systemd config for logstash by going to /etc/systemd/system/logstash.service and changing:
ExecStart=/usr/share/logstash/bin/logstash "--path.settings" "/etc/logstash"
to:
ExecStart=/usr/share/logstash/bin/logstash "--path.settings" "/etc/logstash" "-f" "/etc/logstash/conf.d/{fileA,fileB,fileC}.conf"
After rebooting, I discovered the process was indeed loading these pipelines.
My problem
I recently install android studio in Ubuntu 14.
But I have problem in gradle build execution.
gradle not completed for any project even hello world project
What I am tried
1.
File Menu - > Invalidate Caches/ Restart..
2.Increase the heap size manually using this answer
3.Android Studio Gradle loading
But no luck for me.
Error details
Tooling API is using target Gradle version: 2.4.
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
Starting daemon process: workingDir = /home/knonex19/.gradle/daemon/2.4, daemonArgs: [/usr/lib/jvm/java-8-oracle/bin/java, -XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=UTF-8, -Duser.country=IN, -Duser.language=en, -Duser.variant, -cp, /home/knonex19/.gradle/wrapper/dists/gradle-2.4-all/6r4uqcc6ovnq6ac6s0txzcpc0/gradle-2.4/lib/gradle-launcher-2.4.jar, org.gradle.launcher.daemon.bootstrap.GradleDaemon, 2.4, /home/knonex19/.gradle, /home/knonex19/.gradle/daemon, 10800000, 3a17e311-fb84-4407-a62b-c87d02683ab5, -XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=UTF-8, -Duser.country=IN, -Duser.language=en, -Duser.variant]
Starting process 'Gradle build daemon'. Working directory: /home/knonex19/.gradle/daemon/2.4 Command: /usr/lib/jvm/java-8-oracle/bin/java -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=UTF-8 -Duser.country=IN -Duser.language=en -Duser.variant -cp /home/knonex19/.gradle/wrapper/dists/gradle-2.4-all/6r4uqcc6ovnq6ac6s0txzcpc0/gradle-2.4/lib/gradle-launcher-2.4.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 2.4 /home/knonex19/.gradle /home/knonex19/.gradle/daemon 10800000 3a17e311-fb84-4407-a62b-c87d02683ab5 -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=UTF-8 -Duser.country=IN -Duser.language=en -Duser.variant
Successfully started process 'Gradle build daemon'
An attempt to start the daemon took 0.902 secs.
Connected to daemon DaemonInfo{pid=2796, address=[ec70070e-7a08-4520-a3ae-0c0b751449aa port:38689, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]], idle=false, context=DefaultDaemonContext[uid=3a17e311-fb84-4407-a62b-c87d02683ab5,javaHome=/usr/lib/jvm/java-8-oracle,daemonRegistryDir=/home/knonex19/.gradle/daemon,pid=2796,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=IN,-Duser.language=en,-Duser.variant]}. Dispatching request Build{id=9fe736cb-042e-4d0f-a55b-f95626396a77.1, currentDir=/home/knonex19/Desktop/tummyfulltabletpos}.
[ 351800] WARN - ConfigurableExtensionPointUtil - Can't find parent for project.propCompiler (Compiler)
Anybody solve my issue thanks..
Does anyone know the reason why this would work in WINDOWS (tomcat 8.0.9) and not on LINUX (tomcat 6)?
I set catalina.properties (/etc/tomcat6/catalina.properties) file to:
shared.loader="${catalina.home}/shared/classes","${catalina.home}/shared/lib/*.jar"
But it is still not working...
If I run:
ps aux | grep catalina
I get:
tomcat 22199 0.1 14.2 2229892 1133948 ? Sl Sep12 7:41 /etc/alternatives/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1280m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC -classpath .:/usr/lib64/jvm/java:/usr/lib64/logi-lib:/usr/share/java:/usr/share/tomcat6/lib:/usr/share/tomcat6/bin/bootstrap.jar:/usr/share/tomcat6/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat6 -Dcatalina.home=/usr/share/tomcat6 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat6/temp -Djava.util.logging.config.file=/usr/share/tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start
On my windows machine all I had to do is set shared.folder in catalina.properties file and make sure I do have classes I am calling in there.
Btw, I don't have admin rights on linux machine
May be you must create the shared/classes and shared/lib folders under /usr/share/tomcat6.
In windows usually this folders are under the tomcat6 folder, but installations in Linux environment are quite different in this point.