Question:
How to make Jprofile 9.1 collect data from specific manged server and not from admin server?
Details:
By going with Jprofile wizard (Profile application server) I am able to attached Jprofile to the running Admin server but I am unable to find any option that allow me to monitor specific manged server.
In this question How can I connect Jprofiler with weblogic managed servers?
one of the answer says the following:
You're profiling the wrong server in that case. The VM parameter for JProfiler (-agentpath:...) has to be added to the JVM on which your application is executed.
The answer trying to point to some parameter changes to be done but it is not clear how to do it.
Here is a question that talks about setting JVM parameters for weblogic servers.
custom arguments to set in weblogic JVM
In the Domain Structure pane, expand the Servers node.
Click the name of the server that you want to configure.
In the right pane, click Server Start. Select Lock & Edit.
In the Arguments text box, provide the JVM options. After inserting your options, click Save.
Then click Activate Changes.
Restart the server so that the new
settings are used.
You should be able to set the relevant agentLib argument use the above described procedure.
Note, you need to copy the agent libraries onto the host that has the managed server.
Related
I have built a web app which runs with simply java -jar app.jar. It looks at the environment variable PORT to decide which port to listen on. now I want to deploy it to Azure with a Windows app service plan, this is called This is called "Java SE deployment" in Azure.
On a Linux app service plan, I can simply deploy the app.jar file (using vs code plugin, zipdeploy, or whatever), set the environment variable PORT, and everything is fine.
With a Windows app service plan, attempting to access the app gives a 500 error with the body "The web server failed to respond within the specified time". I've turned on all the logging I can, and I can see the request gets into IIS but no indication that it's attempted to send the request to my app.
However I can access my app directly from the Azure console using curl http://localhost:<port>. so I know it has started up.
I've done this tutorial https://learn.microsoft.com/en-us/azure/app-service/quickstart-java?tabs=javase&pivots=platform-windows which works fine, but I'm not using maven or spring boot - I need to build the jar file myself.
I've read https://learn.microsoft.com/en-us/azure/app-service/deploy-zip and https://learn.microsoft.com/en-us/azure/app-service/configure-language-java?pivots=platform-windows but they doesn't seem to be telling me anything I don't already know.
By dumping out the environment in my app, I discovered that Azure sets the environment variable SERVER_PORT to a number and that if you listen on that number, the requests are forwarded correctly. It actually sets quite a few environment variables to the same port number, but I chose SERVER_PORT because it looks like the most meaningful name, and there are some references to it in various blogs etc. HTTP_PLATFORM_PORT is also set.
I'd still be grateful for any references to official Microsoft documentation, so at least I know whether there's a "proper" way to do this.
I work with a web service (SOAP) that is installed on a remote server (Websphere). Since I do not fully understand its operation, I would like to use debugging to understand the code step by step. I want to use the local instance Intellij (ultimate). My problem is that due to little experience I do not know how to do it. I have questions:
to check the operation of WS I want to send queries to the server using SOAPUI. Is there a possibility for me to look at Intellij (using breakpoints) what values are returned at a given stage?
how to connect it all together?
is there a different, better way to check the code?
First, make sure that debug is enabled on your remote server. This can probably be configured in Websphere. Then, in IntelliJ select the "run configurations" dropdown and "Edit Configurations". Hit the "+" and select remote. Set the correct host and port, and click "OK". Then, start the run configuration in debug mode, add some breakpoints and debug away!
I have an application with GUI. GUI is used for settings management only. Now I need to turn this into Windows service. I thought of splitting my app into 2: service itself and GUI-tool for providing settings. Main problem is that I'm not sure, how this tools should "communicate". Settings are stored mostly in files, and after new settings applied, service should restart.
As for now, I thought of admin-tool sending few requests to service over TCP/IP, that also allows to control service from the network. Problem is that I need to hardcode, or use some text file, to set default port on which service would listen for admin-tool connections after it's installation.
May be there is any alternative solution, which is more suitable here?
You are creating a service. If all you need in the communication layer is being able to stop and start the services, then you don't need to open a port and start listening. The system gives you means to do that with commands that you can run. you are talking about windows, so for example you can run the command "sc start MyServiceName" to start service "MyServiceName". there is also a command called "net" which allows you to start and stop services. These OS commands can be then called from java code in various ways that are available to execute external code.
here is a link that shows how to do that with sc command, check the accepted answer: start-windows-service-from-java
here is another link that shows difference between two commands "sc" and "net": net-start-service-and-sc-start-what-is-the-difference
Note that "sc" supports starting services on remote machines: simplest-way-to-restart-service-on-a-remote-computer
First, this is not the first time I ask a question related to this problem, but now that we have talked with the network admin guys and we know we absolutely HAVE to get through that proxy, I will ask again the question but with further details.
So here is the deal. We have an application built for Lotus Notes. That application needs to talk with a web service that is located outside the network of our client, but nothing can get out of the network without going through a proxy server. Since the Agent is running on the server, we need to tell the server to go through the proxy first. That can be achieved in Java using the System's properties (http.proxyHost, etc). That being said, I set all the properties related to the proxy settings in my Java Agent, and then I try getting the XML file from the web service. What I get is a connection time out exception. So, I was wondering why? We did a network analysis with WireShark, and the application is not trying to go through the proxy. Here is what it STRANGELY does.
I built the application and set the proxy host to a dummy address, just for the time I get the real proxy address and my credentials. Let's say proxy.mydomain.com
I get my credentials, so I change the proxy config with the real ones, say webproxy.ca.mydomain.net
Nothing works, so we restart the Domino server and do a clearcache, thinking it might be related to this
We did a network analysis with WireShark and the application queries the DNS for this:
proxy.mydomain.com
proxy.mydomain.com.ca.mydomain.com
proxy.mydomain.com.eu.mydomain.com
proxy.mydomain.com.anotherknowdomain.com
And that goes for a while. BUT, I can see it's still using the dummy address. Where does it get it. It's not in notes.ini, it's not in the server's cache, it's not in my source code, it's not in java.properties, it not in the JVM (since we restarted the machine). Any idea? We're at the end of a project and we need this to work to deliver it and preassure is building!!! I searched the WHOLE WEB!!!
One more thing I would say, when I set my properties in java code, I tryied to print them before to see if it was ok and everything is fine...
For your information, even though it was a web proxy going through HTTP, the JVM setting sockProxyHost was set and preceds on the other. That was our problem...
So I have an executable jar file which when run in windows or in Linux by using the command
`java -jar filename.jar`
the output is this.
But when the same thing is viewed via a remote connection using VNC client, the output is reduced to this
I have tried changing the resolution of the vncserver instance by using -geometry attribute and have also tried supplying values for "-cc" and the "-depth" attributes. But to no avail. Can someone tell me what I have to do so as to get the intended display properly in the vnc session as well?
This may be seen when the GUI is not constructed on the event dispatch thread. The remote connection adds enough latency to expose the underlying problem.
Because the two images have differing dialog names, verify that both represent the same code. Also, check the remote server's .vnc log to see what window manager is being used.
Addendum: I'm not sure what VNC server your server is using, but you may be able to edit $HOME/.vnc/xstartup to specify the window manager. Gnome's Metacity has worked for me.
VNC Clients also have settings, like color depth etc, that effect the output quality. And it also depends on capabilities of VNC. Which SErver and and which client are you using? If you have set in in the VNCSErver, check the params of VNCViewer.