SelendroidException: No android virtual devices were found - selendroid

I am trying to setup Selendroid in my system. I have set up ANDROID_HOME,JAVA_HOME and installed android virtual device.
C:\Users\sai>echo %ANDROID_HOME%
C:\Android\android-sdk
C:\Users\sai>echo %JAVA_HOME%
C:\Java\jdk1.6.0_26
C:\Android\android-sdk\tools>android.bat list avds
Available Android Virtual Devices:
Name: SelendroidAVD
Device: Nexus S (Google)
Path: C:\Users\sai\.android\avd\SelendroidAVD.avd
Target: Android 2.3.3 (API level 10)
Tag/ABI: default/armeabi
Skin: 480x800
When I am trying to start the server with the below command, I am getting a Selendroid Exception.
java -jar selendroid-standalone-0.12.0-with-dependencies.jar -aut selendroid
-test-app-0.12.0.apk
The apk file is installed successfully, but the Android AVD is not recognised and it is throwing the following exception.
io.selendroid.exceptions.SelendroidException: No android virtu
al devices were found. Please start the android tool and create emulators and re
start the selendroid-standalone or plugin an Android hardware device via USB.
selendroid-standalone server has been started on port: 4444
The complete logcat:
F:\>java -jar selendroid-standalone-0.12.0-with-dependencies.jar -aut selendroid
-test-app-0.12.0.apk
################# Selendroid #################
################# Configuration in use #################
io.selendroid.SelendroidConfiguration#12c9b19[
port=4444
timeoutEmulatorStart=300000
supportedApps=[selendroid-test-app-0.12.0.apk]
verbose=false
emulatorPort=5560
deviceScreenshot=false
selendroidServerPort=8080
keystore=<null>
keystorePassword=<null>
keystoreAlias=<null>
emulatorOptions=<null>
registrationUrl=<null>
proxy=<null>
serverHost=<null>
keepAdbAlive=false
noWebViewApp=false
noClearData=false
sessionTimeoutSeconds=1800
forceReinstall=false
logLevel=ERROR
deviceLog=true
serverStartTimeout=20000
printHelp=false
]
Jan 14, 2015 11:54:11 PM io.selendroid.SelendroidLauncher launchServer
INFO: Starting selendroid-server port 4444
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/MANIFEST.MF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/CERT.RSA
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/CERT.SF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/ANDROIDD.SF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/ANDROIDD.RSA
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/NDKEYSTO.SF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/NDKEYSTO.RSA
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Java\jdk1.6.0_26\bin\jarsigner.exe -sigalg MD5withRS
A -digestalg SHA1 -signedjar F:\\resigned-selendroid-test-app-0.12.0.apk -storep
ass android -keystore C:\Users\sai\.android\debug.keystore F:\\selendroid-test-a
pp-0.12.0.apk androiddebugkey
Jan 14, 2015 11:54:14 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: App signing output:
Jan 14, 2015 11:54:14 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: The app has been signed: F:\\resigned-selendroid-test-app-0.12.0.apk
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe dump
badging F:\\resigned-selendroid-test-app-0.12.0.apk
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe dump
badging F:\\resigned-selendroid-test-app-0.12.0.apk
Jan 14, 2015 11:54:14 PM io.selendroid.server.model.SelendroidStandaloneDriver i
nitApplicationsUnderTest
INFO: App io.selendroid.testapp:0.12.0 has been added to selendroid standalone s
erver.
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/MANIFEST.MF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/CERT.RSA
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/CERT.SF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/ANDROIDD.SF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/ANDROIDD.RSA
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/NDKEYSTO.SF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/NDKEYSTO.RSA
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Java\jdk1.6.0_26\bin\jarsigner.exe -sigalg MD5withRS
A -digestalg SHA1 -signedjar C:\Users\sai\AppData\Local\Temp\resigned-android-dr
iver8494728849163801343.apk -storepass android -keystore C:\Users\sai\.android\d
ebug.keystore C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.
apk androiddebugkey
Jan 14, 2015 11:54:15 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: App signing output:
Jan 14, 2015 11:54:15 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: The app has been signed: C:\Users\sai\AppData\Local\Temp\resigned-android-
driver8494728849163801343.apk
Jan 14, 2015 11:54:17 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\tools\android.bat list avds
Jan 14, 2015 11:54:21 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\platform-tools\adb.exe devices
Jan 14, 2015 11:54:21 PM io.selendroid.server.model.DeviceStore addEmulators
INFO: No emulators has been found.
Jan 14, 2015 11:54:21 PM io.selendroid.server.model.DeviceStore initAndroidDevic
es
WARNING: Warning: io.selendroid.exceptions.SelendroidException: No android virtu
al devices were found. Please start the android tool and create emulators and re
start the selendroid-standalone or plugin an Android hardware device via USB.
selendroid-standalone server has been started on port: 4444
F:\>java -jar selendroid-standalone-0.12.0-with-dependencies.jar -aut selendroid
-test-app-0.12.0.apk
################# Selendroid #################
################# Configuration in use #################
io.selendroid.SelendroidConfiguration#12c9b19[
port=4444
timeoutEmulatorStart=300000
supportedApps=[selendroid-test-app-0.12.0.apk]
verbose=false
emulatorPort=5560
deviceScreenshot=false
selendroidServerPort=8080
keystore=<null>
keystorePassword=<null>
keystoreAlias=<null>
emulatorOptions=<null>
registrationUrl=<null>
proxy=<null>
serverHost=<null>
keepAdbAlive=false
noWebViewApp=false
noClearData=false
sessionTimeoutSeconds=1800
forceReinstall=false
logLevel=ERROR
deviceLog=true
serverStartTimeout=20000
printHelp=false
]
Jan 14, 2015 11:54:11 PM io.selendroid.SelendroidLauncher launchServer
INFO: Starting selendroid-server port 4444
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/MANIFEST.MF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/CERT.RSA
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/CERT.SF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/ANDROIDD.SF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/ANDROIDD.RSA
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/NDKEYSTO.SF
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve F:\\selendroid-test-app-0.12.0.apk META-INF/NDKEYSTO.RSA
Jan 14, 2015 11:54:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Java\jdk1.6.0_26\bin\jarsigner.exe -sigalg MD5withRS
A -digestalg SHA1 -signedjar F:\\resigned-selendroid-test-app-0.12.0.apk -storep
ass android -keystore C:\Users\sai\.android\debug.keystore F:\\selendroid-test-a
pp-0.12.0.apk androiddebugkey
Jan 14, 2015 11:54:14 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: App signing output:
Jan 14, 2015 11:54:14 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: The app has been signed: F:\\resigned-selendroid-test-app-0.12.0.apk
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe dump
badging F:\\resigned-selendroid-test-app-0.12.0.apk
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe dump
badging F:\\resigned-selendroid-test-app-0.12.0.apk
Jan 14, 2015 11:54:14 PM io.selendroid.server.model.SelendroidStandaloneDriver i
nitApplicationsUnderTest
INFO: App io.selendroid.testapp:0.12.0 has been added to selendroid standalone s
erver.
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/MANIFEST.MF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/CERT.RSA
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/CERT.SF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/ANDROIDD.SF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/ANDROIDD.RSA
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/NDKEYSTO.SF
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\build-tools\21.1.2\aapt.exe remo
ve C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.apk META-IN
F/NDKEYSTO.RSA
Jan 14, 2015 11:54:14 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Java\jdk1.6.0_26\bin\jarsigner.exe -sigalg MD5withRS
A -digestalg SHA1 -signedjar C:\Users\sai\AppData\Local\Temp\resigned-android-dr
iver8494728849163801343.apk -storepass android -keystore C:\Users\sai\.android\d
ebug.keystore C:\Users\sai\AppData\Local\Temp\android-driver8494728849163801343.
apk androiddebugkey
Jan 14, 2015 11:54:15 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: App signing output:
Jan 14, 2015 11:54:15 PM io.selendroid.builder.SelendroidServerBuilder signTestS
erver
INFO: The app has been signed: C:\Users\sai\AppData\Local\Temp\resigned-android-
driver8494728849163801343.apk
Jan 14, 2015 11:54:17 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\tools\android.bat list avds
Jan 14, 2015 11:54:21 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Android\android-sdk\platform-tools\adb.exe devices
Jan 14, 2015 11:54:21 PM io.selendroid.server.model.DeviceStore addEmulators
INFO: No emulators has been found.
Jan 14, 2015 11:54:21 PM io.selendroid.server.model.DeviceStore initAndroidDevic
es
WARNING: Warning: io.selendroid.exceptions.SelendroidException: No android virtu
al devices were found. Please start the android tool and create emulators and re
start the selendroid-standalone or plugin an Android hardware device via USB.
selendroid-standalone server has been started on port: 4444
Please help in resolving the issue!! Thanks

Look on http://selendroid.io/setup.html section "Using Emulators".

Related

Elasticsearch 7.17.7 use up to 8.1GB ram on Linux Ubuntu 22.04.1. LTS causing slowness on device

I install Elasticsearch 7.17.7 on my local machine Linux Ubuntu 22.04.1 LTS ( not using virtual machine )
To start elasticsearch I run this command in terminal
sudo systemctl start elasticsearch.service
After it successfully start and run I notice it utilize up to 8.1GB of ram which is too huge from what I see, my machine only have 16GB of utilizeable ram
Attached is the elasticsearch info and the stacer output
From time to time I will check to see whether the elasticsearch is running or not because I realize when I am using my laptop doing work and everything, opening tools such as google chrome, vs code and smartgit, at one point my device becomes really slow, then I try to run certain command needed for work and it return error
Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster
I check and found the error happen because elasticsearch suddenly stop working
I am able to restart elasticsearch using
sudo systemctl restart elasticsearch.service or sudo service elasticsearch restart
but sometimes an error come out causing elasticsearch unable to restart, if this happen, I just restart my laptop, which I wanted to avoid as it is disturbing my work
I am unable to reproduce back the error log but I will update this question once I found the log
Please provide any tips or experience if anyone have encountered this issue
I have tried installing different version of elasticsearch which is 7.16 but still same issue happen
I have tried reinstall elasticsearch but still same
Update : Elasticsearch finally crash and I am unable to restart the service, refer below image for detail and log
Elasticsearch service failed
Error during restart
Update : below is the log I able to receive when starting the elasticsearch
==> /var/log/syslog <==
Dec 8 14:26:37 farhan-Yoga-6-13ALC6 systemd[1]: Starting Elasticsearch...
==> /var/log/kern.log <==
Dec 8 14:26:47 farhan-Yoga-6-13ALC6 kernel: [16726.683629] [UFW BLOCK] IN=wlp2s0 OUT= MAC=01:00:5e:00:00:01:64:3a:ea:e9:0a:4e:08:00 SRC=0.0.0.0 DST=224.0.0.1 LEN=36 TOS=0x00 PREC=0xC0 TTL=1 ID=14037 PROTO=2
==> /var/log/syslog <==
Dec 8 14:26:47 farhan-Yoga-6-13ALC6 kernel: [16726.683629] [UFW BLOCK] IN=wlp2s0 OUT= MAC=01:00:5e:00:00:01:64:3a:ea:e9:0a:4e:08:00 SRC=0.0.0.0 DST=224.0.0.1 LEN=36 TOS=0x00 PREC=0xC0 TTL=1 ID=14037 PROTO=2
==> /var/log/ufw.log <==
Dec 8 14:26:47 farhan-Yoga-6-13ALC6 kernel: [16726.683629] [UFW BLOCK] IN=wlp2s0 OUT= MAC=01:00:5e:00:00:01:64:3a:ea:e9:0a:4e:08:00 SRC=0.0.0.0 DST=224.0.0.1 LEN=36 TOS=0x00 PREC=0xC0 TTL=1 ID=14037 PROTO=2
==> /var/log/auth.log <==
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 sudo: pam_unix(sudo:session): session closed for user root
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 sudo: farhan : TTY=pts/3 ; PWD=/var/log ; USER=root ; COMMAND=/usr/sbin/service elasticsearch restart
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 sudo: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
==> /var/log/syslog <==
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd[1]: Started Elasticsearch.
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd[1]: Stopping Elasticsearch...
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: uncaught exception in thread [process reaper (pid 46606)]
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThread")
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:485)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/java.security.AccessController.checkPermission(AccessController.java:1068)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:411)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at org.elasticsearch.secure_sm.SecureSM.checkThreadAccess(SecureSM.java:160)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at org.elasticsearch.secure_sm.SecureSM.checkAccess(SecureSM.java:120)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/java.lang.Thread.checkAccess(Thread.java:2360)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/java.lang.Thread.setDaemon(Thread.java:2308)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/java.lang.ProcessHandleImpl.lambda$static$0(ProcessHandleImpl.java:103)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.<init>(ThreadPoolExecutor.java:637)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:928)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:1021)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1158)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/java.lang.Thread.run(Thread.java:1589)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd-entrypoint[46384]: #011at java.base/jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:186)
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd[1]: elasticsearch.service: Deactivated successfully.
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd[1]: Stopped Elasticsearch.
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd[1]: elasticsearch.service: Consumed 42.311s CPU time.
Dec 8 14:26:49 farhan-Yoga-6-13ALC6 systemd[1]: Starting Elasticsearch...
==> /var/log/auth.log <==
Dec 8 14:27:00 farhan-Yoga-6-13ALC6 sudo: pam_unix(sudo:session): session closed for user root
==> /var/log/syslog <==
Dec 8 14:27:00 farhan-Yoga-6-13ALC6 systemd[1]: Started Elasticsearch.
Update : Able to find out the log that's causing the elasticsearch to stop working, apparently its because the ram usage is too high causing ubuntu to stop the process
Dec 8 14:30:43 farhan-Yoga-6-13ALC6 kernel: [16962.195555] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/elasticsearch.service,task=java,pid=46712,uid=128
Dec 8 14:30:43 farhan-Yoga-6-13ALC6 kernel: [16962.195728] Out of memory: Killed process 46712 (java) total-vm:16570600kB, anon-rss:8393480kB, file-rss:0kB, shmem-rss:0kB, UID:128 pgtables:17344kB oom_score_adj:0
==> /var/log/syslog <==
Dec 8 14:30:43 farhan-Yoga-6-13ALC6 kernel: [16962.194794] Monitor Deflati invoked oom-killer: gfp_mask=0x1100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0
Still unable to figure out how to make the elasticsearch use less ram
You can also run an elastic search via docker with the -e ES_JAVA_OPTS="-Xmx512m" option.
Example:
docker network create elastic
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.6.1
docker run --name elasticsearch --net elastic -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xmx512m" -t docker.elastic.co/elasticsearch/elasticsearch:8.6.1

Can't start MariaDB on debian 10

I can't seem to be able to start mariadb sql anymore. Internet says a bunch of things but they all seem to be "risky" and it seems that it really depends on the case. So here is mine. I don't know what/when happened but I am afraid to lose my subscribers data. What do you, superheroes, suggest?
When I try to start mariadb :
me#server:# systemctl start mariadb.service
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
And with systemctl status mariadb.service:
me#server:# systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.27 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-12-07 21:04:05 CET; 1min 53s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 13289 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 13290 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 13292 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environm
Process: 13339 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 13339 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Dec 07 21:03:59 server systemd[1]: Starting MariaDB 10.3.27 database server...
Dec 07 21:04:01 server mysqld[13339]: 2020-12-07 21:04:01 0 [Note] /usr/sbin/mysqld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 13339 ...
Dec 07 21:04:05 server systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Dec 07 21:04:05 server systemd[1]: mariadb.service: Failed with result 'exit-code'.
Dec 07 21:04:05 server systemd[1]: Failed to start MariaDB 10.3.27 database server.
And when I go to journalctl -xe, I only get:
Dec 07 21:10:04 vps69770 sshd[13784]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=161.35.121.130 user=root
Dec 07 21:10:04 sshd[13712]: Received disconnect from 124.239.216.233 port 59950:11: Bye Bye [preauth]
Dec 07 21:10:04 sshd[13712]: Disconnected from authenticating user root 124.239.216.233 port 59950 [preauth]
Dec 07 21:10:04 sshd[13771]: Failed password for root from 111.201.133.174 port 48444 ssh2
Dec 07 21:10:05 sshd[13771]: Received disconnect from 111.201.133.174 port 48444:11: Bye Bye [preauth]
Dec 07 21:10:05 sshd[13771]: Disconnected from authenticating user root 111.201.133.174 port 48444 [preauth]
Dec 07 21:10:05 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit mariadb.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Dec 07 21:10:05 server systemd[1]: mariadb.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit mariadb.service has entered the 'failed' state with result 'exit-code'.
Dec 07 21:10:05 server systemd[1]: Failed to start MariaDB 10.3.27 database server.
-- Subject: A start job for unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit mariadb.service has finished with a failure.
--
-- The job identifier is 1241 and the job result is failed.
Dec 07 21:10:06 server sshd[13784]: Failed password for root from 161.35.121.130 port 37142 ssh2
Dec 07 21:10:06 server sshd[13784]: Received disconnect from 161.35.121.130 port 37142:11: Bye Bye [preauth]
Dec 07 21:10:06 server sshd[13784]: Disconnected from authenticating user root 161.35.121.130 port 37142 [preauth]
Which is not a big help
I have no idea what to do. I really don't want to lose my database.
Thanks for your input
Solved it by deleting/renaming the tc.log mv -vi /var/lib/mysql/tc.log /root And restarting the database service mysql restart

airflow systemd fails due to gunicorn

I am unable to start the airflow webserver using systemd even though it starts and functions properly outside of systemd like so:
export AIRFLOW_HOME=/path/to/my/airflow/home ; airflow webserver -p 8080
The systemd log leads me to believe that the issue comes from gunicorn, even though gunicorn starts without issue when I run the above command (i.e. it's only an issue in systemd). I have configured the following systemd files according to the airflow docs (running Ubuntu 16).
/etc/default/airflow
AIRFLOW_HOME=/path/to/my/airflow/home
SCHEDULER_RUNS=5
/lib/systemd/system/airflow-webserver.service
[Unit]
Description=Airflow webserver daemon
After=network.target
[Service]
EnvironmentFile=/etc/default/airflow
User=ubuntu
Group=ubuntu
Type=simple
ExecStart=/bin/bash -c "export AIRFLOW_HOME=/path/to/my/airflow/home ; airflow webserver -p 8080 "
Restart=on-failure
RestartSec=5s
PrivateTmp=true
[Install]
WantedBy=multi-user.target
/etc/tmpfiles.d/airflow.conf
D /run/airflow 0755 airflow airflow
This results in the following error when I start the service with systemctl.
systemctl start airflow-webserver.service
Jul 15 22:41:27 ip-172-31-19-64 systemd[1]: Started Airflow webserver daemon.
Jul 15 22:41:27 ip-172-31-19-64 bash[31494]: [2018-07-15 22:41:27,555] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python3.5/lib2to3/Grammar.txt
Jul 15 22:41:27 ip-172-31-19-64 bash[31494]: [2018-07-15 22:41:27,592] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python3.5/lib2to3/PatternGrammar.txt
Jul 15 22:41:27 ip-172-31-19-64 bash[31494]: [2018-07-15 22:41:27,729] {__init__.py:45} INFO - Using executor SequentialExecutor
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: ____________ _____________
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: ____ |__( )_________ __/__ /________ __
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: ____ /| |_ /__ ___/_ /_ __ /_ __ \_ | /| / /
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: ___ ___ | / _ / _ __/ _ / / /_/ /_ |/ |/ /
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: _/_/ |_/_/ /_/ /_/ /_/ \____/____/|__/
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]:
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: [2018-07-15 22:41:28,042] {models.py:189} INFO - Filling up the DagBag from /path/to/my/airflow/home/dags
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: /home/ubuntu/.local/lib/python3.5/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cach
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: .format(x=modname), ExtDeprecationWarning
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: Running the Gunicorn Server with:
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: Workers: 4 sync
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: Host: 0.0.0.0:8080
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: Timeout: 120
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: Logfiles: - -
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: =================================================================
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: Traceback (most recent call last):
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: File "/usr/local/bin/airflow", line 27, in <module>
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: args.func(args)
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: File "/usr/local/lib/python3.5/dist-packages/airflow/bin/cli.py", line 788, in webserver
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: gunicorn_master_proc = subprocess.Popen(run_args)
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: restore_signals, start_new_session)
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: raise child_exception_type(errno_num, err_msg)
Jul 15 22:41:28 ip-172-31-19-64 bash[31494]: FileNotFoundError: [Errno 2] No such file or directory: 'gunicorn'
Jul 15 22:41:28 ip-172-31-19-64 systemd[1]: airflow-webserver.service: Main process exited, code=exited, status=1/FAILURE
Is there some configuration I need to do to make gunicorn compatible with systemd?
Edit:
Following suggestions that this was a permission issue, I installed gunicorn via:sudo apt-get install gunicornand upon re-running the systemctl got the following error Error: No module named airflow.www.gunicorn_config. I figured that this was due to an inconsistency between the gunicorn that I had just installed and the gunicorn my ubuntu user was using to run airflow, so I replaced the gunicorn in /usr/bin/ with the former. This hotfix is likely not the best way to make the fix, but afterwards I was successfully able to run airflow via systemd.
I had the same problem on Ubuntu 18.04 LTS and Apache Airflow version 1.10.1 installed in a virtual environment under /srv/airflow. After lots of trial and errors I ended up with this working solution.
My airflow-webserver.service file:
[Unit]
Description=Airflow webserver daemon
After=network.target
[Service]
Environment="PATH=/srv/airflow/bin"
Environment="AIRFLOW_HOME=/srv/airflow"
User=airflow
Group=airflow
Type=simple
ExecStart=/srv/airflow/bin/airflow webserver --pid /srv/airflow/webserver.pid
Restart=on-failure
RestartSec=5s
PrivateTmp=true
[Install]
WantedBy=multi-user.target
I did this to install the service:
sudo cp airflow-webserver.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable airflow-webserver.service
sudo systemctl start airflow-webserver.service
Yeah, ExecStart=..airflow/bin/airflow requires ..airflow/bin/python but systemd found system python instead. Airflow needs Environment="PATH=..airflow/bin", always.
In Ubuntu Bionic, I found that sudo apt-get install python3-gunicorn first and then sudo apt-get install gunicorn while in the root python environment resolves this problem.

Unable to Run Odoo Service at Ubuntu 16.04

I am new to ubuntu but with the help of this tutorial , i am trying to run Odoo 11 from its source code .While i tried to run this command
sudo systemctl start odoo.service
And after that while i tried to check status of my service using command
sudo systemctl status odoo.service
then its replies in the Console
odoo.service - Odoo Open Source ERP and CRM
Loaded: loaded (/lib/systemd/system/odoo.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-03-29 15:28:38 PKT; 7s ago
Process: 4072 ExecStart=/opt/odoo/odoo-bin --config=/etc/odoo-server.conf --addons-path=/opt/odoo/addons/ (code=exited, status=1/FAILURE)
Main PID: 4072 (code=exited, status=1/FAILURE)
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: File "/opt/odoo/odoo/modules/graph.py", line 10, in <module>
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: import odoo.tools as tools
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: File "/opt/odoo/odoo/tools/__init__.py", line 7, in <module>
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: from . import pdf
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: File "/opt/odoo/odoo/tools/pdf.py", line 4, in <module>
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: from PyPDF2 import PdfFileWriter, PdfFileReader
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: ImportError: No module named 'PyPDF2'
Mar 29 15:28:38 hassan-Latitude-E6420 systemd[1]: odoo.service: Main process exited, code=exited, status=1/FAILURE
Mar 29 15:28:38 hassan-Latitude-E6420 systemd[1]: odoo.service: Unit entered failed state.
Mar 29 15:28:38 hassan-Latitude-E6420 systemd[1]: odoo.service: Failed with result 'exit-code'.
But i had installed PyPDF2 Module already.
There was no issue with my service . I haven't installed Python module using pip3 package manager.So that's why python base modules wasn't available. So i simply install pip3 using command
pip install python3-pip
And then again started my odoo service using command
sudo systemctl start odoo
Finally it started working like charm.

xampp: apache start for 1 sec and shutdwon

Apache not running :
My xampp configuration for apache is changed to :
apache prot: 80 > 81
apache ssl port : 443 > 1378
apache run as administrator
before run xampp i'm stop IIS services and disable startup
MySQL is running but apache run in 1 sec and shutdown !!!
that is xampp log :
15:10:36 [Apache] Attempting to start Apache app...
15:10:36 [Apache] Status change detected: running
15:10:37 [Apache] Status change detected: stopped
15:10:37 [Apache] Error: Apache shutdown unexpectedly.
15:10:37 [Apache] This may be due to a blocked port, missing dependencies,
15:10:37 [Apache] improper privileges, a crash, or a shutdown by another method.
15:10:37 [Apache] Press the Logs button to view error logs and check
15:10:37 [Apache] the Windows Event Viewer for more clues
15:10:37 [Apache] If you need more help, copy and post this
15:10:37 [Apache] entire log window on the forums
and that's apache logs :
[Fri Mar 11 15:04:13.976216 2016] [ssl:warn] [pid 4052:tid 384] AH01909: www.example.com:1378:0 server certificate does NOT include an ID which matches the server name
[Fri Mar 11 15:04:14.085597 2016] [ssl:warn] [pid 4052:tid 384] AH01909: www.example.com:1378:0 server certificate does NOT include an ID which matches the server name
[Fri Mar 11 15:04:14.116853 2016] [mpm_winnt:notice] [pid 4052:tid 384] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.4 configured -- resuming normal operations
[Fri Mar 11 15:04:14.116853 2016] [mpm_winnt:notice] [pid 4052:tid 384] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Fri Mar 11 15:04:14.116853 2016] [core:notice] [pid 4052:tid 384] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Mar 11 15:04:14.116853 2016] [mpm_winnt:notice] [pid 4052:tid 384] AH00418: Parent: Created child process 4088
[Fri Mar 11 15:04:14.601248 2016] [ssl:warn] [pid 3280:tid 376] AH01909: www.example.com:1378:0 server certificate does NOT include an ID which matches the server name
[Fri Mar 11 15:04:14.710628 2016] [ssl:warn] [pid 3280:tid 376] AH01909: www.example.com:1378:0 server certificate does NOT include an ID which matches the server name
[Fri Mar 11 15:04:14.741882 2016] [mpm_winnt:crit] [pid 3280:tid 376] (OS 6)The handle is invalid. : AH00389: Child: Unable to access the scoreboard from the parent
[Fri Mar 11 15:04:14.741882 2016] [mpm_winnt:crit] [pid 4052:tid 384] AH00419: master_main: create child process failed. Exiting.
Please help me.