An error occurred: null - jmeter

When i am starting jmeter than it showing the follwing error
An error occurred: null
My process to start jmeter is
root#L411:/opt/apache-jmeter-2.12/bin# sh jmeter
An error occurred: null

This happened to me as well. In my case, I was running Jmeter 2.13 on OpenJDK 1.8 on my 64-bit Linux machine. I fixed it by installing Oracle's Java instead, and switching to it with:
alternatives --config java
I'm a bit annoyed that I have to do this now, as it used to work before (I think).

What OS are you using? I was getting the same error in Fedora 27 and I fixed it by installing the OpenJDK runtime environment (java-1.8.0-openjdk)
sudo dnf install java-1.8.0-openjdk

If after executing jmeter.sh your apache-jmeter-x.xx/bin/jmeter.log contains something like
Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
you probably have default-jdk-headless installed.
Installing default package (sudo yum install java-1.8.0-openjdk) fixed the issue for me.

I was getting this error on macOS High Sierra while running jMeter.
java.lang.NullPointerException
at java.awt.Window.init
For me the problem was JVM not being able to identify a compatible graphics mode from the OS. To solve the problem I had to reset PRAM and NVRAM.
I followed this question and this answer.

Make sure you check the jmeter.log file to understand the cause for the null exception.
If your log shows the stack trace
java.awt.HeadlessException: null
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:208)
This could be because of 2 reasons:
Your shell's config file/dotfile (.bashrc, .bashprofile,.zshrc, etc.) is setting an env variable JAVA_TOOL_OPTIONS and has the argument -Djava.awt.headless=true. (I had to set this to prevent the surefire plugin from stealing focus every time tests are executed)
Or you have a headless JDK installed which does not support GUI apps. Install a full JDK and add it to PATH

Related

Installing Open Project 7 (Apache error: Service Unavailable)

Here is the original question: https://community.openproject.com/topics/7851
I'm trying to install Open Project 7 in a brand new Ubuntu instance at Digital Ocean.
I've follow the instructions at https://www.openproject.org/download-and-installation/, but it's not working.
After the complete of installation and the run of the openproject configure command, i have selected options to install both MySQL and Apache server. When it's all done, i'm unable to connect to my server.
My enviroment:
Ubuntu 16.04
http://159.203.191.172
At logs, i can see two strange messages.
First:
bundler: failed to load command: unicorn (/opt/openproject/vendor/bundle/ruby/2.4.0/bin/unicorn)
Second is a warning:
WARN -- : You are setting a key that conflicts with a built-in method OmniAuth::AuthHash::InfoHash#name defined at /opt/openproject/vendor/bundle/ruby/2.4.0/bundler/gems/omniauth-8385bc0da47e/lib/omniauth/auth_hash.rb:34. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-06-13T01:01:17.860764 #25822]
I don't know if the warning is related to problem, but i think that the unicorn problem is.
Answering my own question here:
I suspected that the package had some problems so i decided to install it using manual installation. The newest documentation i found was an old Ubuntu 14 step-to-step tutorial, adapted from older versions of Open Project. I decided to follow it and after a lot of adaptations i got able to finish the installation process.
This is the tutorial: https://github.com/opf/openproject-ce/blob/stable/7/docs/installation/manual/README.md
Now I'm writing another step-to-step tutorial based on it, modifying all required steps to perform a clean installation on Ubuntu 16.

Apache fails to start as Windows service with mod_wsgi

I'm using Apache 2.4, Python 3.5 and appropriate mod_wsgi from Gohlike binaries page, everything is 64-bit. Apache works as intended when it's started manually, but when I'm trying to start it as service it fails and produces
httpd.exe: Syntax error on line 180 of C:/Apache24/httpd.conf: Cannot load c:/Users/<Username>/AppData/Local/Programs/Python/Python35/Lib/site-packages/mod_wsgi/server/mod_wsgi.cp35-win_amd64.pyd
into server: \xcd\xe5 \xed\xe0\xe9\xe4\xe5\xed
\xf3\xea\xe0\xe7\xe0\xed\xed\xfb\xe9 \xec\xee\xe4\xf3\xeb\xfc
(Specified module could not be found).
to Windows event log.
Problem is solved. The error occured because Python installation wasn't system-wide.
Add python to path before install
set PATH=E:\python35;%PATH%
httpd.exe -k uninstall
httpd.exe -k install

Cannot run Jmeter on my terminal

When I write jmeter in my terminal I have this error.
An error occurred: Unable to make field private static java.lang.String sun.awt.X11.XToolkit.awtAppClassName accessible: module java.desktop does not "opens sun.awt.X11" to unnamed module #4d3167f4
Download latest Oracle JRE or JDK and unpack it somewhere, i.e. to /opt/java folder
Download latest JMeter and unpack it to /opt/jmeter folder
Amend PATH environment variable to start with the "bin" folder of Oracle JDK installation like:
PATH=/opt/java/bin:$PATH && export PATH
In the same terminal window navigate to JMeter folder
pushd /opt/jmeter
Execute JMeter
./jmeter
More information: How to Get Started With JMeter: Part 1 - Installation & Test Plans
Check which version of Java you are running. I received this same error on another java application when I started using Java 9 EA. I downloaded jmeter just out of curiosity and get the same error.
I had this same issue installing openjdk-9-jre on
Ubuntu Gnome 17.04
installing the "older" Version via
sudo apt-get install openjdk-8-jre
worked for me right away.
https://wiki.ubuntuusers.de/Java/Installation/OpenJDK/

Issues with manual installation of predictionIO dependencies

I am installing predictionIO from source code. I have downloaded and done the predictionIO installation successfully. I am now trying to install the dependencies (Spark, Elasticsearch, HBase) but I am running into errors for each of them. Below are the issues I am facing when I execute pio status:
1 - Unable to locate a proper Apache Spark installation
2 - It is also unable to find metadata files.
I have not changed any default settings. I'm using windows 8.1. On localhost, I have running IIS. On 127.0.0.1:8888 I run ipython notebook.
Please help on how I can get predictionIO up and running on my machine.
Thanks
If you are on Windows, you can install with Vagrant.
http://docs.prediction.io/community/projects/#vagrant-installation-for-predictionio
I believe the discussion has moved to the google group.
https://groups.google.com/forum/#!searchin/predictionio-user/SAS/predictionio-user/ZamBr1ZaQ3o/fyNkXh3zsv0J
https://groups.google.com/forum/#!searchin/predictionio-user/SAS/predictionio-user/0awaASUR8lE/JkLtPeRrNt4J
This is the relevant thread.
https://groups.google.com/forum/#!searchin/predictionio-user/SAS/predictionio-user/0awaASUR8lE/JkLtPeRrNt4J
Moreover, PredictionIO docs had a few errors. Below are some of them and their corrected versions.
1 - Actual line: PATH=$PATH:/home/yourname/predictionio/bin; export PATH
Corrected Version PATH=$PATH:/home/yourname/PredictionIO/bin; export PATH
2 - Actual Line: $ pio eventserver
Corrected Version: $ pio eventserver --ip 0.0.0.0
3 - Actual Line pio template get PredictionIO/templates-scala-parallel-recommendation MyRecommendation
Corrected Version pio template get PredictionIO/template-scala-parallel-recommendation MyRecommendation

Failed to find Vagrant

Trying to install Vagrant on Windows 7 X64 with installer from Vagrant - vagrant_1.7.0.msi
Installation goes fine, however unable to use vagrant. On any command, for example vagrant -v the below is shown:
Failed to find Vagrant!
What I did:
Googled. Only 1 link with such an error on github regarding to installer. Not sure if this is relevant.
Checked that vagrant in PATH. Yes it is. Otherwise it would not start at all.
Reinstalled, and repaired - few times.
All the above with no luck. Any idea where to dig?
Thank you.
just to add my own version of this problem too:
i installed version 1.7.0
error message after a "vagrant up": "Failed to find Vagrant!"
checked paths, other environment variables in win7, should work..
so i uninstalled it and installed an older version (1.6.5)
and yes, the older version solved the problem.
i got it from their official website: https://www.vagrantup.com/download-archive/v1.6.5.html
i guess the problem was in this file:
https://github.com/mitchellh/vagrant-installers/blob/master/substrate/launcher/main.go
Same Issue on Windows 7 64.
Downgraded back to Vagrant 1.6.5
Have you gone through the installation instructions on vagrant side listed here :
https://docs.vagrantup.com/v2/installation/index.html
This is what I see listed at their site:
The installer will automatically add vagrant to your system path so that it is available in terminals. If it is not found, please try logging out and logging back in to your system (this is particularly necessary sometimes for Windows).
Please try running it from Git Bash too and let me know if it works for you.
And if you still run into issues, try using an older version of vagrant https://www.vagrantup.com/download-archive/v1.6.5.html
Vagrant 1.7.1 should fix this. https://github.com/mitchellh/vagrant/issues/4924#issuecomment-66808666

Resources