various issues when setting up visualvm remote JVM connection with jstatd - visualvm

statd on remote machine may not be starting up correctly and visualvm user interface does not add connections.
On the remote machine, I created a policy file for jstatd:
grant codebase "file:/home/jonathan/jdk1.8.0_191/lib/tools.jar" {
permission java.security.AllPermission;
};
I then execute jstatd: ./jstatd -p 1199 -J-Djava.security.policy=/home/jonathan/jstatd.policy
It seems to be running and there are no errors which I got when not specifying a port number or policy file.
In visualvm, I'm able to add the remote host but when I try to create a jstatd connection and fill the information, when clicking "ok", the popup just disappears. No errors, no connections under the node, no nothing. I enabled logging and there are no errors.
My questions:
1. Does jstatd REQUIRES an rmiregistry to work? Not specifying a port, will it attempt to connect to a default one (on port 1099)?
2. Running netstat doesn't show any binding on port 1199 which I've designated.
3. Why does visualvm not allow connections to be created?

I think that jstatd man page should answer most of your questions. Regarding connection from visualvm - check VisualVM log file. Are there firewall(s) between visualvm and jstatd?

Related

Remote Debug Weblogic Clustered Servers

I have a java application which is currently deployed in weblogic clustered environment with 2 managed servers. Would like to enable remote debugging for me to investigate further the issue on session data replication. I followed the steps provided here. After restarting the 2 managed servers, it seems the configuration has no effect. I used the same debug config below in my 2 managed servers.
-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8457,server=y,suspend=n
I also tried adding the below line on each managed server startup script.
export debugFlag=true
export DEBUG_PORT=8457
I use telnet command and got this error: Could not open connection to the host, on port 8457: Connect failed.
Linux firewall is already disabled.
Has anyone already encountered this issue? In addition, how to use it for me to enable debug in my IDE (e.g. Eclipse/IntelliJ)
Thanks in advance for the help.
This is already resolved. As advised by #devwebcl, I put the additional script below in my startManagedWebLogic.sh
export JAVA_OPTIONS="${JAVA_OPTIONS} -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8457,server=y,suspend=n"
I put the same argument (e.g. -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8457,server=y,suspend=n) in the Server Start argument section on each managed server in weblogic admin console.
It will make sure that either you start your managed server via weblogic admin console or via shell startup script of each managed server, the same argument will be picked up.

Apache Guacamole-Creating New connection to Windows PC

I have successfully installed Apache Guacamole on my DigitalOcean VPS.
Now I need to create a new connection to my windows 10 pc.
I cannot get that to work.
I am very confused what settings I need to fill in to connect to the pc.
Here are screenshots of the settings I can fill in. I am going to use RDP and am unsure how to find the domain, host, etc of my pc. Maybe there is other settings I need to fill in too?
Please help as I have been trying for weeks. Thank You.
New Connection Settings Picture
New Connection Settings Picture
First, make sure that both tomcat and guacd services are running. Usually, both are installed on the same machine.
On the settings page, select RDP as the protocol (in the images you have posted, VNC is selected). Next, in the "Parameters" section, enter hostname ip and RDP port (3389 is the default). If guacd is on the same host as tomcat, there is no need to enter anything in the "Guacamole proxy parameter" section.
The settings page is a bit different when RDP is selected, but you should also populate windows username, password and domain of the remote PC where you want to connect. The parameters are the same as the one you are normally using to logon to this PC.
Also, make sure that the remote windows 10 PC is accessible from the DigitalOcean VPS. You may test this by logging to the VPS machine and issue the following in the terminal
telnet <remote windows pc ip> 3389
If you can connect with telnet, this means that remote PC RDP server is accessible; otherwise, you have to check for network related issues (firewall, different lans...).
If everything above is ok, then please post the tomcat log (catalina.out) and guacd log (usually in /var/log/syslog).

SSH Google Compute Engine down?

There's an issue with SSH access today ? Don't know why I can't access to my instances today, from a MobaXterm or the SSH webinterface in Google Cloud (impossible to connect port 22).
From Google Cloud Shell => ssh: connect to host XXXX port 22: Connection timed out
Global issue or only my account ?
I would advise you to try the following and check if you are able to connect:
Can you able to ping or SSH into VM instance using gcloud command ?
Could you also try running cloud shell in safe mode.
If you are still running the issue after trying 2 methods, please try to restart the cloud shell (This can be done by selecting restart option from hamburger menu on top right of your Cloud shell) and see if that fixes.
You can interact with the serial console so you can more easily troubleshoot instances that are not booting properly or that are otherwise inaccessible.
Please let me know of the results.

Activating a VPN on Google Cloud Compute VM is terminating my connection

I have spun up a Google Cloud Compute virtual machine. It's a vanilla Windows Server 2016 image, and I can log in and see the desktop. I do that by downloading the RDP file and running it.
Due to a license manager for software I'm installing, I need to VPN to my own network. In "Settings -> Network", I add a new VPN connection (using the same creds I use on my machine) and click Connect. It makes an initial connection, verifies my credentials, but during the final stage, my RDP connection to the GCP VM ends.
What is really strange is that, sometimes, I can reconnect successfully after a few minutes and the VPN connection was successful. Sometimes I can't reconnect.
Any ideas?
The VPN connection added as such will be a force tunneled VPN which then adds a default route over the VPN interface on the VM disrupting your connection. The easiest way for maintaining the connection would be to do either of 2 things
Make the VPN split tunneled and add a route for the licensing box. You can do this by using the Set-VPNConnection Powershell commandlet and then adding a route using the route add command in an administrative command prompt
Add a more specific route for the IP Address by which u access the VM using the route add command
UPDATE: Simply setting the VPN to use split tunneling in PowerShell solved the problem.
Use: (Replace "VPNsName" with your VPNs Name)
Set-VpnConnection -Name "VPNsName" -SplitTunneling 1

RedisDesktopManager not connecting to remote redis server

I had a perfectly running remote redis-server on my LAN (# x.x.x.x:p). I was able to use the RedisDesktopManager to view the server contents. However, there were a lot of dangling connections to my server from different clients (subscribed to channels) which I wanted to close so I used the SHUTDOWN command from the console of the desktop manager. Since them, I am unable to connect to the remote server. The desktop manager is running and lets me add a new redis-server connection but I am not able to connect to the previous server connection. Whenever I try to connect to the server # x.x.x.x:p, the desktop manager terminates. I have not made any configuration changes to the previously running server so I am sure that I am not making any mistake with port bindings. Any help on what I am missing will be really appreciated.
Thanks in advance!
The problem was with the configuration binding. The bind line in the configuration file was originally
bind 132.168.131.129 127.0.0.1 0.0.0.0. I changed it to bind x.x.131.129. The server connection was restored.