property server.rmi.localhostname on jmeter version 2.13 - jmeter

I have set up jmeter distributed testing using my local machine (master) and AWS EC2 machines (slaves). Most of the config is based on - http://blog.ionelmc.ro/2012/02/16/how-to-run-jmeter-over-ssh-tunnel/
When running tests I have following exception on jmeter-server.log
2015/11/06 12:42:37 ERROR - jmeter.samplers.RemoteTestListenerWrapper: java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is:
java.net.ConnectException: Connection refused
One possible solution I came across is from one of the stackover flow question-
java.rmi.ConnectException: Connection refused to host: 127.0.1.1;
and I indeed start my server as -
./jmeter-server -Djava.rmi.server.hostname=127.0.0.1
and it did not solve the problem. Few other blogs talk about setting following property on server -
server.rmi.localhostname=127.0.0.1
But I can not find any such property on jmeter 2.13
Was this property removed or replaced by some other property ?

I'm having the same problem and just came across this question. If you click on the link that leads to the original blog posts it mentions the following:
WHAT THE PATCH DOES
Adds jMeter parameter server.rmi.localhostname - jMeter by default 1) binds to the host's hostname and 2) refuses to bind to localhost. If this parameter is set, jMeter will bind to the specified ip/hostname and (only if this parameter is set) won't complain even if it is localhost.
I assume this patch never made it into JMeter itself. At least for me, just adding the property in question doesn't seem to make it work.

Related

VSCode WSL-2 Proxy Problem: Failed to establish a socket connection to proxies

Problem Description
When I was using Node.js and generated the file package.jons, I found there's a warning at the start:
Problems loading reference 'https://json.schemastore.org/package': Unable to load schema from 'https://json.schemastore.org/package': Failed to establish a socket connection to proxies: ["SOCKS5 127.0.0.1:1090","SOCKS 127.0.0.1:1090"].
Possible Reason
Then I searched the error message Failed to establish a socket connection to proxies, and found maybe it's a wsl2 proxy problem according to this github reply.
For more precise reason, I searched the VSCode proxy document metioned by the reply, and found maybe it's caused by wrong proxy setting.
Ways to try
According to the VSCode document, I want to try the setting of "Manual proxy address". But I encountered two problems:
I don't know how to run the command line mentioned in the VSCode document: --proxy-server=<scheme>=<uri>[:<port>][;...] | <uri>[:<port>] | "direct://".
I don't know where to find the file /etc/resolv.conf mentioned in the github reply to get the wsl server ip.
When I switch my VPN into global mode and restart VSCode, the warning disappear.

Can one NiFi node have multiple host names?

Problem:
Not able to allow multiple host names for one single NiFi node.
Description:
I have an internal NiFi server with internal computer name 'nifi-1'. nifi.properties has the following:
nifi.web.https.host=0.0.0.0
nifi.web.https.port=9443
This works fine when I hit "https://nifi-1:9443/nifi/" internally.
I have another dns name - "nifi-1.company.com" (both names must be supported) that is routed to the same nifi node. The nifi node rejects with the following error messages when I hit "https://nifi-1.company.com:9443/nifi/":
System Error
The request contained an invalid host header [nifi-1.company.com:9443] in the request [/nifi]. Check for request manipulation or third-party intercept.
Valid host headers are [empty] or:
127.0.0.1
127.0.0.1:9443
localhost
localhost:9443
[::1]
[::1]:9443
nifi-1
nifi-1:9443
10.0.1.82
10.0.1.82:9443
0.0.0.0
0.0.0.0:9443
Question:
How to resolve this problem? Any solutions? (Thanks!)
Another way to phrase the question is how I may add more host names into the list of "valid host headers" as the above.
This issue was pointed at in NiFi 1.5 NIFI-4761. To resolve this issue, whitelist the hostname used to access NiFi using the following parameter in the nifi.properties configuration file :
nifi.web.proxy.host = host:port
Its a comma-separated list of allowed HTTP Host header values to consider when NiFi is running securely and will be receiving requests to a different host[:port]. For example, when running in a Docker container or behind a proxy (e.g. localhost:18443, proxyhost:443). By default, this value is blank, meaning NiFi should allow only requests sent to the host[:port] that NiFi is bound to.
original answer source: how to use nifi.web.proxy.host and nifi.web.proxy.context.path?

Not able to Initialise smartmeter as ite generate an error?

Error Screenshot I have recorded test scrip using smart meter.
But I when I tries to load the script "Rum smartmeter Test"
It gives following. I have no requirement of remote server as i wanted to run basic Testscript from local machine
*> Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused connect*
Just for the background please note that SmartMeter.io is based on Apache JMeter but adds new features such as one-click test reports, advanced scenario recorder, user friendly distributed mode, acceptance criteria and many others.
Looking forward for your suggestion.
Thanks.
Looks like SmartMeter is unable to start a load generator. The most common reason is that the required port 1099 is already occupied by some other program or the load generator can sometimes be blocked by your firewall. I suggest you restart your computer and try again. If it doesn't help, then you need to find out what is occupying that port. See for example How can you find out which process is listening on a port on Windows?
You should be able to get some information from logs/generator.log.
You can also run tests from SmartMeter Editor, the same way you would do in JMeter.

org.apache.jorphan.util.JMeterError: Could not return sample

I am running Jmeter test in distributed mode. I have set up SSH tunneling for slaves since they are not in same region. I have executed 2700 users which ran fine. When we try to run 5200 users, users are going into finished status although steady state is 1 hours. I am using ultimate thread group.
4500 users are running fine and 600 Users are going into finished state out of 5200 usesr.
Seeing below error in Jmeter Server logs:
ERROR o.a.j.t.JMeterThread: Test failed!
org.apache.jorphan.util.JMeterError: Could not return sample
at org.apache.jmeter.samplers.StandardSampleSender.sampleOccurred(StandardSampleSender.java:70) ~[ApacheJMeter_core.jar:3.3 r1808647]
Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source) ~[?:1.8.0_151]
Any idea? What is causing this?
It seems from logs that you tunnel is broken:
Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.1;
See this:
https://superuser.com/questions/37738/how-to-reliably-keep-an-ssh-tunnel-open
The error is about JMeter slave being unable to establish connection to deliver results to the master so the problem is on SSH server side, you can look into its logs to see what went wrong.
The options are in:
SSH stands for "Secure Shell" so all the traffic gets encrypted. It also gets compressed in order to decrease footprint. When it comes to high loads it might be the case SSH server and/or client consumes a lot of resources and i.e. being killed by OOM Killer or whatever. You can try configuring your SSH server to disable compression and use weaker encryption algorithm, for example arcfour
It might be easier to move "master" to the "other region" than passing a lot of test results over SSH
Another option could be using VPN with no encryption, this way all JMeter nodes will be in the same subnet.
And finally you can disable automatic sending of test results from slaves to the master:
set mode=DiskStore property on JMeter Slaves
when your test is finished collect results from slaves and copy them over to master
use Merge Results Tool in order to combine multiple results into single .jtl file. Merge Results Tool can be installed using JMeter Plugins Manager

Database connection for JDBC request on jmeter

For JDBC request on Jmeter I have configured properly Database Connection Configuration with giving
Database Url- jdbc:mysql://developmentdb.cwwxeukesrtn.ap-southeast-1.rds.amazonaws.com;Development_DB
JDBC Driver Class- com.mysql.jdbc.Driver
Username-...
Password-...
then I create a JDBC request with Select Statementbut after run this request,on the response message got this message-
Response message:
java.sql.SQLException: Cannot create PoolableConnectionFactory (Communications link failure The last packet sent successfully to the
server was 0 milliseconds ago. The driver has not received any packets
from the server.)
Now my question is , how to solve this problem?
You need two basic things to get that done:
Tunneling
mysql.jdbc jar in JMeter lib folder.
For 1st:
Open Putty
Go to Connection >> SSH >> Tunnels
Put down the details as port: 9876
Put down the details as database URL (present in the application config file), e.g:
jdbc:mysql://developmentdb.cwwxeukesrtn.ap-southeast-.rds.amazonaws.com;Development_DB
Add it
Open JMeter >> Add JDBC Connection Configuration
Use DataBase URL as jdbc:mysql://localhost:9876 and the
other details as shown in the picture, like JDBC driver Class
For step 2. Go through this link:
https://www.blazemeter.com/blog/mysql-database-and-jmeter-how-to-test-your-connection/
Looking into Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J article:
I believe you need to replace the semicolon before Development_DB with a slash like:
jdbc:mysql://developmentdb.cwwxeukesrtn.ap-southeast-1.rds.amazonaws.com/Development_DB
For more information on databases load testing see The Real Secret to Building a Database Test Plan With JMeter article.
You might also need to open port 3306 in your operating system firewall and add the relevant Security Group to your instance in order to allow MySQL JDBC traffic.

Resources