Elasticsearch: "ERROR: elasticsearch exited unexpectedly" when trying to start elasticsearch - java

I am trying to start elasticsearch by running .bin/elasticsearch from the elasticsearch directory. However, I keep getting the error message ERROR: Elasticsearch exited unexpectedly. What could be the possible solution to this?
I installed Elasticsearch from archives on linux using the commands below.
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.3.3-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.3.3-linux-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-8.3.3-linux-x86_64.tar.gz.sha512
tar -xzf elasticsearch-8.3.3-linux-x86_64.tar.gz
cd elasticsearch-8.3.3/
Below is are more error logs I got from the elasticsearch.log file
[2022-08-17T00:32:36,417][ERROR][o.e.b.Bootstrap ] [blessed-Lenovo-ideapad-110-15IBR] Exception
java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:99) ~[elasticsearch-8.3.3.jar:?]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:179) ~[elasticsearch-8.3.3.jar:?]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) [elasticsearch-8.3.3.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:224) [elasticsearch-8.3.3.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67) [elasticsearch-8.3.3.jar:?]
[2022-08-17T00:32:36,855][ERROR][o.e.b.Elasticsearch ] [blessed-Lenovo-ideapad-110-15IBR] fatal exception while booting Elasticsearch
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:228) [elasticsearch-8.3.3.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67) [elasticsearch-8.3.3.jar:?]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:99) ~[elasticsearch-8.3.3.jar:?]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:179) ~[elasticsearch-8.3.3.jar:?]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-8.3.3.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:224) ~[elasticsearch-8.3.3.jar:?]
... 1 more

Can you check
ls -ltd elasticsearch-8.3.3
and give output here (about catalog permission).

I've had this issue when running Elasticsearch as a container in Docker. Allowing Docker to reserve more resources fixed it for me. I've played around and in my setup a minimum of 6 GB RAM was needed in order to have a stable single node cluster of Elasticsearch running.

Related

Error: INSTALL_FAILED_INSUFFICIENT_STORAGE

I have been getting this error lately after re-installing Android Studio on my pc. Anyone got a clue on how to fix it ?
https://gyazo.com/be54539661824450357d83980623e4f8
This is the Logcat:
Installation did not succeed.
The application could not be installed.
List of apks:
[0] 'C:\Users\joe\AndroidStudioProjects\MyProject\app\build\intermediates\apk\debug\app-debug.apk'
Installation failed due to: ''cmd package install-create -r -t --user current --full --dont-kill --skip-verification -S 57625483' returns error 'Unknown failure: Exception occurred while executing 'install-create':
android.os.ParcelableException: java.io.IOException: Requested internal only, but not enough space
at android.util.ExceptionUtils.wrap(ExceptionUtils.java:34)
at com.android.server.pm.PackageInstallerService.createSession(PackageInstallerService.java:595)
at com.android.server.pm.PackageManagerShellCommand.doCreateSession(PackageManagerShellCommand.java:3434)
at com.android.server.pm.PackageManagerShellCommand.runInstallCreate(PackageManagerShellCommand.java:1561)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:232)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:5954)
at android.os.Binder.shellCommand(Binder.java:1049)
at android.os.Binder.onTransact(Binder.java:877)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4313)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:5938)
at android.os.Binder.execTransactInternal(Binder.java:1285)
at android.os.Binder.execTransact(Binder.java:1244)
Caused by: java.io.IOException: Requested internal only, but not enough space
at com.android.internal.content.InstallLocationUtils.resolveInstallVolume(InstallLocationUtils.java:241)
at com.android.internal.content.InstallLocationUtils.resolveInstallVolume(InstallLocationUtils.java:152)
at com.android.internal.content.InstallLocationUtils.resolveInstallVolume(InstallLocationUtils.java:167)
at com.android.server.pm.PackageInstallerService.createSessionInternal(PackageInstallerService.java:803)
at com.android.server.pm.PackageInstallerService.createSession(PackageInstallerService.java:592)
... 12 more''
Retry
Failed to launch an application on all devices

How to solve IllegalArgumentException error?

I am trying to deploy my R application using ShinyProxy and docker. As soon as run the command, java -jar I get a nested exception in docker terminal stating Illegal argument exception. I am attaching the last traceback error. I referred https://www.databentobox.com/2019/11/05/deploy-r-app-with-shinyproxy/ tutorial for deploying R application. Any suggestion on how to overcome this error?
java -jar shinyproxy-2.3.0.jar
Caused by: java.lang.IllegalArgumentException: An HTTPS URI for DOCKER_HOST must be provided to use Docker client certificates
at com.spotify.docker.client.DefaultDockerClient.<init>(DefaultDockerClient.java:441) ~[docker-client-8.15.2.jar!/:8.15.2]
at com.spotify.docker.client.DefaultDockerClient$Builder.build(DefaultDockerClient.java:3194) ~[docker-client-8.15.2.jar!/:8.15.2]
at eu.openanalytics.containerproxy.backend.docker.AbstractDockerBackend.initialize(AbstractDockerBackend.java:83) ~[containerproxy-0.8.3.jar!/:0.8.3]
at eu.openanalytics.containerproxy.backend.ContainerBackendFactory.createInstance(ContainerBackendFactory.java:83) ~[containerproxy-0.8.3.jar!/:0.8.3]
at eu.openanalytics.containerproxy.backend.ContainerBackendFactory.createInstance(ContainerBackendFactory.java:36) ~[containerproxy-0.8.3.jar!/:0.8.3]
at org.springframework.beans.factory.config.AbstractFactoryBean.afterPropertiesSet(AbstractFactoryBean.java:141) ~[spring-beans-5.0.4.RELEASE.jar!/:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1769) ~[spring-beans-5.0.4.RELEASE.jar!/:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1706) ~[spring-beans-5.0.4.RELEASE.jar!/:5.0.4.RELEASE]
... 84 common frames omitted
It worked for me by degrading shinyproxy version to 2.0.0 from 2.3.0.

selenium maven tests work on local machine but not on Jenkins

I have some tests in selenium. When I run them using maven on my local machine then everything works fine, but when I try to start them using jenkins I get an error. Can anyone help me out and tell why it works on my machine, and doesnt on Jenkins? Thanks
[SNOWDEN_develop_Selenium_AutoTests] $ java -cp /var/lib/jenkins/maven33-agent.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven /boot/plexus-classworlds-2.5.2.jar:/var/lib/jenkins/tools /hudson.tasks.Maven_MavenInstallation/maven/conf/logging jenkins.maven3.agent.Maven33Main /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven /var/lib/jenkins/slave.jar /var/lib/jenkins/maven33-interceptor.jar /var/lib/jenkins/maven3-interceptor-commons.jar 43010
Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoting.Launcher
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at jenkins.maven3.agent.Maven33Main.main(Maven33Main.java:133)
at jenkins.maven3.agent.Maven33Main.main(Maven33Main.java:64)
[SNOWDEN_develop_Selenium_AutoTests] $ /bin/bash -xe /tmp/hudson5734623695552292225.sh
+ cd /var/lib/jenkins/workspace/SNOWDEN_develop_Selenium_AutoTests/snowden-docker
+ ./docker.snowden.sh stop devsel
WORKSPACE: /var/lib/jenkins/workspace/SNOWDEN_develop_Selenium_AutoTests
Docker host : 10.0.0.27:4243 (SNOWDEN-DEV)
Stop docker container snowden_devsel ...
Stoping container snowden_devsel ...
snowden_devsel_tomcat
snowden_devsel_mongodb
ERROR: Failed to parse POMs
java.io.EOFException: unexpected stream termination
at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365)
at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
at hudson.slaves.Channels.forProcess(Channels.java:115)
at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:294)
at hudson.maven.ProcessCache.get(ProcessCache.java:236)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Finished: FAILURE

Ubuntu Slave Node (Jenkins) Error

I recently set up a RHEL7 slave node in a dev Jenkins environment which simply ran a few Unix specific scripts via SSH.
The time has come to essentially replicate this yet in my companies Production environment (using a different slave node (Ubuntu 16.04), I have replicated the slave node configuration from the Dev jenkins and been working through the errors produced by the log, however I've been stuck at this stage for awhile and can't find any documentation which is relevant to my situation.
I am getting the following error:
[02/15/17 10:47:11] [SSH] Starting slave process: cd "/home/jenkins" && java -jar slave.jar
Exception in thread "main" java.lang.RuntimeException: Root directory not writable
at hudson.remoting.FileSystemJarCache.<init>(FileSystemJarCache.java:44)
at hudson.remoting.Launcher.runWithStdinStdout(Launcher.java:477)
at hudson.remoting.Launcher.run(Launcher.java:251)
at hudson.remoting.Launcher.main(Launcher.java:201)
hudson.util.IOException2: Slave JVM has terminated. Exit code=1
at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:984)
at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:137)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:725)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:706)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException: unexpected stream termination
at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365)
at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:389)
at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:976)
... 7 more
[02/15/17 10:47:11] Launch failed - cleaning up connection
[02/15/17 10:47:11] [SSH] Connection closed.
I have double, triple checked the permissions of the root directory (home/jenkins/jenkins_slave) and they're fine. If I attempt to manually run java -jar slave.jar on the slave node I get the following error:
WARNING: Are you running slave agent from an interactive console?
If so, you are probably using it incorrectly.
See http://wiki.jenkins ci.org/display/JENKINS/Launching+slave.jar+from+from+console
<===[JENKINS REMOTING CAPACITY]===>
I just don't understand, because the permissions and config are identical so it must be something environmental? Any help/guidance would be appreciated.
Your home is not /home/jenkins/jenkins_slave but home/jenkins - at least according to the log output you provided (Starting slave process: cd "/home/jenkins" [...]). So you should change your startup configuration of the slave and cd into /home/jenkins/jenkins_slave

Nutch 2.1 - generator job runtime exception job failed

I am getting the below error when i try to generate urls using the generate command:
GeneratorJob: java.lang.RuntimeException: job failed: name=generate: 1357474131-234134646, jobid=job_local_0001
at org.apache.nutch.util.NutchJob.waitForCompletion(NutchJob.java:54)
at org.apache.nutch.crawl.GeneratorJob.run(GeneratorJob.java:191)
at org.apache.nutch.crawl.GeneratorJob.generate(GeneratorJob.java:213)
at org.apache.nutch.crawl.GeneratorJob.run(GeneratorJob.java:241)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.nutch.crawl.GeneratorJob.main(GeneratorJob.java:249)
The generate, fetch and parse were working fine, but updatedb was giving this error before sometimes:
Exception in thread "main" java.lang.RuntimeException: job failed: name=update-table, jobid=job_local_0001
at org.apache.nutch.util.NutchJob.waitForCompletion(NutchJob.java:54)
at org.apache.nutch.crawl.DbUpdaterJob.run(DbUpdaterJob.java:98)
at org.apache.nutch.crawl.DbUpdaterJob.updateTable(DbUpdaterJob.java:105)
at org.apache.nutch.crawl.DbUpdaterJob.run(DbUpdaterJob.java:119)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.nutch.crawl.DbUpdaterJob.main(DbUpdaterJob.java:123)
Now, it is continuously giving generate job failed. What might be the issue? Can it be mysql issue?
The above errors are due to insufficient space on the partition on the server where i have installed . check the answer at Insufficient space for shared memory file when i try to run nutch generate command

Categories

Resources