run a distribution test with jmeter in Vm Centos - centos

I'm trying to run a distribution test for learning purpose and i'm using a Virtual machine Centos 7 as a slave in my Windows 7 ( master running in window 7) but even if i configure the master with the IP of the slave ( VM ), modifying the file jmeter.properties, doesn't work, i try run Jmeter-server in the Centos machine but this problem appears.
Created remote object: UnicastServerRef [liveRef: [endpoint:[127.0.0.1:44341](lo
cal),objID:[4e68a212:14a8564a618:-7fff, 5760053273490727502]]]
Server failed to start: java.rmi.RemoteException: Cannot start. localhost.locald
omain is a loopback address.
An error occurred: Cannot start. localhost.localdomain is a loopback address.
Can somebody give me a direction where look or a explanation how can i do it?
Thanks!

Put the following line in system.properties file: java.rmi.server.hostname=xxx.xxx.xxx.xxx
Alternatively start JMeter providing above property as a command-line argument as:
jmeter (or jmeter-server) -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx
Double check your network configuration, i.e. make sure that your /etc/hosts file contains the following lines:
127.0.0.1 localhost localhost.localdomain
xxx.xxx.xxx.xxx your CentOS machine hostname
In all above cases xxx.xxx.xxx.xxx should be IP address of your CentOS machine and this IP address must be different from 127.0.0.1.
Also make sure that you select "Bridged" networking in your Virtual Machine, machines should be able to reach each other over the network, firewalls should be properly configured to allow communication, etc.
For more information on different JMeter Properties and ways of setting/overriding them see Apache JMeter Properties Customization Guide

Related

VSCode server extension installs itself on host instead on the CT

I'm trying to set up a remote development using VSCode and its remote extension but I've got a problem. The extension install itself on the Proxmox host instead on the Container indicated in config file.
The extension connects perfectly to the Container and it work like a charm. On the host, I've got the firewall with the port forwarding enabled (I use just 1 public IP, 1 domain name per Container, and 1 SSH different port per Container). It forwards the port 22200 to the port 22 of the Container.
.ssh/config
Host container.domain.it
HostName container.domain.it
User root
Port 22200
PasswordAuthentication Yes
I noticed this because Proxmox couldn't start the Containers anymore. It threw several errors. Taking a look at all active processes on the host I noticed several VSCode processes. Stopping the extension and closing VSCode, all processes on the Proxmox host went terminated and Proxmox works again perfectly.
The problem laid in Proxmox itself. I had to edit /etc/sysctl.conf on the host and increase these limits to:
fs.inotify.max_user_instances = 256
fs.inotify.max_user_watches = 16384

How to make a TCP outgoing connection with Docker container?

My Go application makes TLS connections via tls.Dial() to exchange data.
It works fine when run from the host:
But the outgoing connection doesn't seem to work when the app is run from a Docker container. The app hangs indefinitely.
Note 1: Same behavior with using docker run -p $(docker-machine ip):2500:2500 ...
Note 2: VM doesn't have extra port forwarding settings other than the default settings that came with docker-machine's default VM.
Docker image build with Dockerfile:
FROM golang:latest
RUN mkdir -p "$GOPATH/src/path/to/app"
# Install dependencies
RUN go get github.com/path/to/dep
VOLUME "$GOPATH/src/path/to/app"
EXPOSE 2500
WORKDIR "$GOPATH/src/path/to/app"
CMD ["go", "run", "main.go"]
Host is OS X running docker-machine.
Question
How can I make the TCP outgoing connection to work?
You are either using boot2docker or docker-machine (since you are running docker on OSX). If you are using boot2docker, you have to forward the ports on VirtualBox as well as docker, have a look at this blog post:
https://fogstack.wordpress.com/2014/02/09/docker-on-osx-port-forwarding/
If you are using docker-machine, you have to connect to the docker-machine assigned ip, not localhost, have a look at this post:
https://github.com/docker/machine/issues/710
I see now that you are using docker-machine specifically, so the post about docker-machine should answer your question.
Edit: I misunderstood the question. You are trying to make an outgoing connection on a forwarded port. That is not correct. By default docker can make outgoing connections on any port. The port forwarding is for incoming connections only. Please try again without specifying any ports to forward. My suspicion is that you are trying to make an outgoing connection on the incoming (forwarded) port.
I've just had exactly the same problem. Was unable to connect out at all.
Restarted the container, and suddenly outgoing connections worked fine. It's possible that the container survived an update of docker?
Currently using Docker version 18.09.3, build 774a1f4

Wildfly 8 cluster in standalone mode on different machines

I am trying to create a standalone cluster in Wildfly 8. I am referring to http://middlewaremagic.com/jboss/?p=1952. I was successful in creating the cluster on same machine, but can't create the same on different machines. I started the server on both machines as follows:
1) On machine 1 > Go to cmd > jboss-wildfly\bin > run following command:
standalone.bat -c standalone-ha.xml -b 10.10.54.27 -u 230.0.0.4 -Djboss.server.base.dir=../standalone -Djboss.node.name=nodeOne(10.10.54.27 is IP of machine 1)
1) On machine 2 > Go to cmd > jboss-wildfly\bin > run following command:
standalone.bat -c standalone-ha.xml -b 10.10.52.42 -u 230.0.0.4 -Djboss.server.base.dir=../standalone -Djboss.node.name=nodeTwo(10.10.52.42 is IP of machine 2)
The servers are getting started without any problem, but the nodes can't see each other. I used ClusterWebApp.war (downloaded from same site given above) for testing the cluster.
Am I missing something? Please help.
Most likely UDP broadcasting/multicasting is not allowed on your network (as of today, this would be the case on AWS VPCs for instance)
There is a test you can run to confirm this:
http://www.techstacks.com/howto/troubleshoot-jgroups-and-multicast-ip-issues.html
If this is the case, you may have to cluster using tcp. These links explain how this can be done
http://middlewaremagic.com/jboss/?p=2015
http://www.redhat.com/summit/2011/presentations/jbossworld/whats_new/wednesday/ban_w_310_running_in_the_cloud.pdf
I got the problem. For this kinda clustering to work, multicast protocol needed to be supported on network switches and routers. Previously I tried doing it on my laptop for which multicast protocol is enabled. So, I successfully created cluster on same machine (i.e. my laptop). However, other machine is one of the servers in my network, for which multicast was not enabled. Hence it was failing when tried on two different machines.Very basic problem!! After correcting this, cluster is working fine.

How to connect with host PostgreSQL from vagrant virtualbox machine

I have a VirtualBox machine running Ubuntu 12.04 in a Mac OS X host machine. In my host machine (Mac OS X), I have PostgreSQL installed. I would like to connect to this PostgreSQL server from my Ubuntu virtual machine (I know normally it's the opposite way).
I guess I should configure some networking parameters in VirtualBox itself. All I get from Vagrant docs is I need to assign my vm a static IP to use a private network. But once created, how do I reach my host from my guest?
I didn't find anything like that in vagrant docs. So, there's probably a good reason for that. Does it make sense? I don't want to duplicate PostgreSQL installation. Just use my current existent one.
You can reach your host from your guest by using the default gateway on your VM.
See this answer for an explanation.
By running netstat -rn you can get the default gateway and then use that ip address in your config file of your application.
Running netstat -rn | grep "^0.0.0.0 " | cut -d " " -f10 should give you the correct ip address. (only tested this on my machine)
Easy way - simply use this "magic" IP from inside of vagrant without any additional configurations:
10.0.2.2
Don't know if it's always static, though for me works and it's very convenient - I can use laptop at home, from office - having assigned different IPs to me by routers, but my VMs know the "trusty name" of their master 🐶

Accessing documents on a http server running in a virtual machine

I run Windows 7 as my main OS, and for development work I installed CentOS on a virtual machine under VirtualBox. Everything is installed, including httpd and php with mysql, but I can't figure out what IP to use to gain access to the server.
For example, I used to have XAMPP installed on 7 and I just used "localhost" to get to the servers document root, but I have no clue what it is for the virtual machine.
I have tried "locahost", "192.168.11.2" (my address on the network) and my own IP address and I can't seem to get it working.
Any help would be appreciated. Thank you. :)
I don't know VirtualBox, but can you do an ifconfig from the terminal window to your VM. If it doesn't give you a terminal window, your CentOS setup probably does DHCP to get an address. Browse to the web interface of your home router (192.168.11.1?) and check the DHCP clients table to see if it registered and get its address.