Jstatd Remote profiler with jvisualvm - visualvm

I am trying to profile my web application on my local windows 7 PC visualVM.
I created a jstatd.all.policy file with below code under java's bin directory on my CENTOS 6.8 x86_64 server
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
and tried starting jstatd` with below command
jstatd -J-Djava.security.policy=jstatd.all.policy -p 1099
but when I try profiling on my local PC, I didn't see any process under jvisualvm remote host but just node
i also tried for a test purpose by starting jstatd with same approach on my window server R2 2008 PC and tried to profile with Windows 7 visualVM but still no result just a node with no process but i tried on same windows server pc by adding the remote host for same pc than it shows running processes.
Any suggestions.

Start jstatd by this command:
jstatd -J-Djava.security.policy=jstatd.all.policy -J-Djava.rmi.server.hostname={Your Ip address}

Related

TFS SSH task in Windows Machine failed

I tried to connect a Windows machine that exist in another domain than our TFS 2018.3 exist.
I added "SSH" task, and I created new SSH endpoint with the remote machine IP, username and password, without a private key. I configured in the remote machine access of SSH for this username & password.
In the SSH task, I configure a simple shell command: ls.
The TFS agent succeeded to connect the machine but failed with this error:
Unable to execute command or shell on remote system: Failed to Execute process.
Full log:
2019-08-15T13:22:54.1491966Z Trying to setup SSH connection to ********#myserverinanotherdomain:22
2019-08-15T13:22:54.4085564Z Successfully connected.
2019-08-15T13:22:54.8120684Z tr -d '\015' <"./sshscript_1565875374136" > "./sshscript_1565875374136._unix"
2019-08-15T13:22:54.8121422Z Unable to execute command or shell on remote system: Failed to Execute process.
2019-08-15T13:22:54.8121745Z
2019-08-15T13:22:54.8180230Z ##[error]Command tr -d '\015' <"./sshscript_1565875374136" > "./sshscript_1565875374136._unix" exited with code 4294967295.
I think because it's a Windows machine and I try to execute a shell script. If I will install Git bash, for example, it can help?
Does the SSh task support only Linux machines? if yes, how can I connect a machine that exists in another domain?
SSH being a communication protocol is agnostic of OS. It is not Linux specific. But there seems to be a limitation for using SSH task on windows machine/build agent. Take a look at this similar question here: Not able to run bash script from windows using vsts.
I haven't found a documentation that clearly declare the SSh task not support on Windows machine. But I have found a task which also uses SSH--Copy Files Over SSH task. And according to the Q&A in official link:
Is this task supported for target machines running operating systems
other than Linux?
This task is intended for target machines running Linux.
For copying files to a macOS machine, this task may be used, but authenticating with a password is not supported.
For copying files to a Windows machine, consider using Windows Machine File Copy.
Instead of SSH. You should be able to use a local account on the build server and when entering the credentials. The account must have the same password as the account in the other domain. In other works make sure build account which run on the build agent are able to connect another domain.
Also make sure there is a trust relationship between the domains.

Linux SQL server windows SSMS connection

I have a Red HAT system on oracle virtual box that I've been trying to set a mssql server up.
-Also tried doing everything on SUSE vm but I've been probably doing the same thing wrong on that one aswell.-
I have the server up but was unable to connect the mssql server in linux from windows terminal or SSMS.
Get this as a terminal response on windows
ODBC Driver 13 for SQL Server does not support connections to SQL Server
2000 or earlier versions.
and below one on SSMS
Not associated with a trusted server connection
Not sure if I have some network configuration info wrong on vbox myb?
Might be using the wrong ip addr trying to connect aswell.
I use localhost to connect on virtual box.
Tried to connect by localhost ip, public ip and
sudo ip addr show eth0 | grep "inet"
command as well.
Any idea what could be the issue since I am quite sure both the sql server versions are up to date.
Solved upon changing network attached to on virtual box settings to bridged adapter with promiscuous mode on.
In case anyone gets stuck on this

How to do jprofiling in local machine without installing or downloading jprofiler in remote machine

I want to do jprofiling of our remote tomcat server from local machine.
In our linux box we dont have Jprofiler installed or downloaded.
Please suggest if we can do remote profiling without installing Jprofiler in the remote machine.
Thanks in advance.
In JProfiler, invoke
Session->Integration Wizards->New Server Integration
choose the remote option and select the Tomcat server, then follow the steps in the integration wizard.

Where is SQL Server Express service?

I've installed SQL Server 2012 Express advanced edition on a clean (just OS without any third-party soft) w7x64 residing on VirtualBox 4.1.18. I’ve chosen every needed option to install, but after installation there is no SQL Server Express service running on guest OS on virtual machine. Also I have the same edition of SQL Server installed on my host OS which is also w7x64. Please give me any clues to what may be the cause of this issue.
Steps to diagnose:
Check in Control Panel -> Services that the SQL service is running
Try to connect from the local machine, type osql -E -S localhost\sqlexpress in a command prompt.

remotely run a script sitting in a windows server from a unix box or from another desktop (Say windowS)

I have to run a batch job which sits in the windows server from my unix box.
Or from my local machine.
The win server has a userName/Pwd .
How do i programmatically connect to the windows machine and run the batch?
(The batch will change some file permissions in that machine)
Please let me know if there is a better way of handling this situation
A lot of this depends on how you authenticate on the windows machine, the network relation you have to it from your local and unix machine and what level of permission you will need to run the task ons the remote batch file.
I can say that in Windows, you could start by possibly creating a script that stores the username and password needed to connect to the remote machine in a variable, and in that script have it connect to the machine over a network and run the batch as that user.
How woudl you connect to the remote windows server? is it on a LAN or VPN type environment, do you connect with ssh or do you normally map it over the network?>