Tomee JMX on AIX - jmx

Using an IBM AIX 6.1 machine and IBM JDK, i tried to expose JMX ressource for an external use. When i try to connect to the remote UNIX machine from a windows machine using the host ip and the port used in exposure setup, VisualVM/JConsole informs me that i cannot do that. Is it a firewall problem on the UNIX side ? also i have tried tunneling the ports from the UNIX machine to the windows machine using OpenSSH and putty and still no results.
Can you help.
JMX Config :
CATALINA_OPTS="$CATALINA_OPTS
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=60003
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.local.only=false
-Djava.rmi.server.hostname=ibm2"
ibm2 is retrieved when running hostname command in AIX

Related

Accessing Docker running on Host machine from VMWare Workstation VM

I have the following setup:
Windows 10 Host (Hyper-V enabled)
Docker Desktop installed on host
VMWare Workstation Pro (16)
Windows 10 VM - Docker CLI installed on vm
The Windows 10 VM is used as a dev environment, with project-specific stuff on there.
I also use the host as a development machine for other projects - so want to be able to use docker on both.
What I'd like to do is access the docker engine running on the host, from my VM
By access docker, I mean use the docker cli to run containers, build images etc... setting DOCKER_HOST or something like that?
Is this possible? Or any other way?
So far, I've set my VM to use NAT networking and tried:
docker -H tcp://192.168.126.2:2375 images
Which returns
error during connect: Get http://192.168.126.2:2375/v1.40/images/json: dial tcp 192.168.126.2:2375: connectex: No connection could be made because the target machine actively refused it.
192.168.126.2 is the ip of the default gateway, from within the VM (so - my host?)
On the host machine, if I do docker -H tcp://0.0.0.0:2375 images I get the expected result.
On the host machine, I've also set:
"hosts": ["tcp://0.0.0.0:2375"],
within the docker engine config:
so what i would do and usually am doing is in VMware Workstation in Network editor I connect VMs to a bridge and select my main line that provides connectivity whether it is an Ethernet port or Wifi and associate it to lets say VMnet0. Then in VM settings I assign that VM's NIC to VMnet0 and that is how my VM and my host are on same LAN.
I would not use NAT.

Install Jenkins on windows server and access it using VM's external ip [google-compute-engine]

I have created a VM instance with windows OS (windows-server-2019-dc-v20200211) in Google cloud.Established RDP connection and installed Jenkins on the VM, but how can I access it from other networks using the VM's external ip?
Could someone help me on this!!
Note: I want to install Jenkins in windows server and not on Linux.
I'll suggest you should check the following:
First, make sure your local firewall on windows server is enabled and allows connections on port 8080. Secondly, Network ACL for both incoming traffic on TCP 8080 and outcoming traffic on TCP port 8080 should be allowed.
Also check some of these stackoverflow use cases for more help: [1]https://superuser.com/questions/1212645/cannot-expose-jenkins-externally [2]https://apple.stackexchange.com/questions/31376/how-can-i-open-port-8080-of-mac-os-x-lion [3] Jenkins server is not accessible by host name (ip address)

Not able to connect to CentOS VM from Mac - (Setting up Jenkins pipeline)

I am following a course to setup Jenkins pipeline in a Linux VM.
My host machine is MacOS-mojave.
1) I started the CentOs VM via VirtualBox.
2) I SSH ed to the VM via Terminal in Mac with root user.
3) I installed Jenkins in VM. All successful.
4) I checked in a browser in the VM and Jenkins is running in port 8080.
5) I added the VM host name 'osboxes 'to Mac hosts file.
6) I cleared the DNS cache using sudo killall -HUP mDNSResponder
7) Went to the browser and hit osboxes:8080. Safari saying not able to connect.
8) I did nc -vz 192.168.1.13 8080..it says connection refused
9) I did ping 192.168.1.3 from Mac terminal and it is giving me data.
What is the problem here. Please help
In the Virtual Box configure a host only network and assign it to the Jenkins VM. I haven't tried that approach using hostname, but what I do is put a static IP to the VM so I always know it's IP... Then I can put a record on the hosts file.
I am assuming that you are using NAT networking on the VM.

Testing box application from virtual machine

Box requires you to use HTTPS for any URL other than localhost. Unfortunately, I developed on a Linux virtual machine running inside a Windows machine, and I want to access the server running on Linux from a browser in Windows. Therefore, I cannot use localhost.
Is there a way that I test out my box application without needing to create a certificate on my Linux machine?
Yes. You can use an SSH tunnel.
Set up an SSH server on the Linux machine (make sure you secure it if it's accessible from the Internet)
Use a Windows SSH client (like plink or cygwin's SSH client) to create a tunnel to the desired port (80?) of the Linux box. For example, if you're using plink:
C:\>plink.exe -L 1234:127.0.0.1:80 <username>#<Linux machine IP>
using cygwin, the command would be the same:
$ ssh -L 1234:127.0.01:80 <username>#<Linux machine IP>
This will establish a tunnel between the Windows machine's local port 1234 (127.0.0.1:1234) and the Linux machines port 80 (127.0.0.1:80). So if you open a browser on the Windows machine and point it to 127.0.0.1:1234, you'll really be connecting to 127.0.0.1:80 of the Linux machine.
There are some nice tutorials on SSH tunnels, but make sure you're reading about the right type of tunnel. They come in 3 forms - Local (-L), Remote (-R) and Dynamic (-D). You need the local one.
To debug the tunnel, you can use nc. Use something like nc -l 127.0.0.1 80 to get nc to listen on 127.0.0.1:80, then try using the tunnel from the Windows browser. You should see the HTTP request in nc.

Allow a container running via docker-machine to connect with Mysql or XDEBUG port on parent OSX system without using an OSX DHCP assigned ip address?

I've got the following setup:
OSX running MySQL listening on all network adaptors at port 3306
XDEBUG enabled IDE listening on port 9000 on the base OSX system.
docker-machine host running on the OSX system with the host ip 192.168.99.100
A debian based docker container with a mysql client running on the docker host and HHVM running with xdebug looking to connect to some lucky remote host on port 9000.
The ip addresses change frequently on the OSX system due to being assigned via DHCP, so I want the docker container to be able to somehow be able to hit the mysql server regardless of what IP the native OSX network adaptors get assigned (without manually updating it). Also, I need a stable ip I can provide my HHVM server.ini file a remotes host for Xdebug.
With running a base system of linux this isn't an issue as the docker host and the actual native machine running docker are one-and-the-same. Also, there are several ways for a container to learn of the host's ip so the issue isn't hitting the docker host.
However, in OSX running docker-machine, the host ain't the native OSX system, but instead is a VM running in virtual box (assuming you're using the vb driver, and who the sam hill blazes isn't?).
The only thing I could think of was to port forward request on 3306 to the docker-machine host (192.168.99.100 which never changes) to the OSX's port 3306. Then have the container hit the docker-machine host for Mysql requests. IF this works, I could rinse and repeat for any port I port I need to link like xdebug on port 9000.
Does anyone know how to accomplish this or have another suggestion?
Figured a way out without needing to make any changes that provides a consistent ip to connect to on the base OSX system. Docker machine sets things up in such a way to make this possible.
Docker machine creates a virtualbox VM with 2 network adaptors, one set up as host-only, the other set as NAT. Don't know why it creates 2, but
The host-only adaptor provides the OSX an ip of 192.168.99.1 and the various VM's using it get addresses starting with 192.168.99.100. However, inside the VM network, you can't use the address 192.168.99.1 to hit ports on the parent OSX system (not sure why, but guessing host only intends to be only communication between the VMs).
The NAT network adaptor is set so the OSX get's the ip 10.0.2.2 and the VM get's 10.0.2.15. With a NAT, you can route to the OSX system at 10.0.2.2 from both the docker host VM and containers running on the host.
Since this 10.0.2.2 address for the OSX machine doesn't change (unless you screw with the virtual box networking settings) bingo, got what I need.

Resources