Stream: Mirror: Isabelle Users Mailing List

Topic: [isabelle] Isabelle2021-RC0: Java/VM monitor


view this post on Zulip Email Gateway (Dec 04 2020 at 22:57):

From: "Eugene W. Stark" <isabelle-users@starkeffect.com>
After attending Makarius' presentation earlier today, I tried to use the Java/VM monitor in Isabelle2021-RC0.
Two issues arose:

Big issue: Could not convince JConsole to connect to the Isabelle/JEdit Java VM. Local connection
failed. JConsole documentation suggests that it should be possible for a user to connect to
local JVM instances that are running under the same user ID, but this did not seem to work.
SSH connections are not an option, because I do not enable password authentication via SSH and
there seems to be no provision for public key authentication.

Smaller issue: The "Help" link to the "Online User Guide" for JConsole is stale. If I run JConsole
from shell level (this presumably does not run the version that is part of the Isabelle distribution),
then the same menu selection does not result in a stale link.

This under Ubuntu 18.04LTS. JConsole from the command line also was unable to connect.

view this post on Zulip Email Gateway (Dec 04 2020 at 23:04):

From: "Eugene W. Stark" <isabelle-users@starkeffect.com>
Sorry for some misstatements below. I am not sure why I had "ssh" in my head.

"Secure connection" (via SSL) does not succeed.
"Insecure connection" also does not succeed.

I tried to use "Remote process" with "localhost" as the host name, but the port number required was not
evident. If I use "netstat -apn" to find ports on which JVM is listening, I see only tcp6, no tcp4.
It wasn't clear to me what parameters to enter in the dialog that would be likely to make this work.

view this post on Zulip Email Gateway (Jan 01 2021 at 09:39):

From: Makarius <makarius@sketis.net>
On 04/12/2020 23:56, Eugene W. Stark wrote:

After attending Makarius' presentation earlier today, I tried to use the Java/VM monitor in Isabelle2021-RC0.
Two issues arose:

Big issue: Could not convince JConsole to connect to the Isabelle/JEdit Java VM. Local connection
failed. JConsole documentation suggests that it should be possible for a user to connect to
local JVM instances that are running under the same user ID, but this did not seem to work.
SSH connections are not an option, because I do not enable password authentication via SSH and
there seems to be no provision for public key authentication.

How does this work in Isabelle2021-RC1?

The standard "jconsole" tool has some complexity and fragility in connecting
to processes (local or remote).

In
https://isabelle.sketis.net/repos/isabelle/file/Isabelle2021-RC1/src/Pure/Tools/java_monitor.scala
I have taken over more responsibility for the monitor, trying to make it more
robust.

Smaller issue: The "Help" link to the "Online User Guide" for JConsole is stale. If I run JConsole
from shell level (this presumably does not run the version that is part of the Isabelle distribution),
then the same menu selection does not result in a stale link.

This is beyond my responsibility. The situation might change again with a
future version of OpenJDK.

Makarius

view this post on Zulip Email Gateway (Jan 03 2021 at 16:35):

From: "Eugene W. Stark" <isabelle-users@starkeffect.com>
I just tried it in Isabelle2021-RC1 and the behavior seems the same. I cannot connect the console to
the Isabelle/JEdit VM. Now running under Ubuntu 20.04 LTS (previous attempts were under 18.04).

view this post on Zulip Email Gateway (Jan 10 2021 at 15:56):

From: Makarius <makarius@sketis.net>
Isabelle2021-RC2 has a different setup, using Java 15 instead of Java 11. Does
this make any difference for you?

I somehow suspect that you have special security settings for Linux.

On Windows 10, I do get a user request to confirm that the Java monitor should
be allowed to open a socket connection to the Java process of Isabelle/jEdit.

Makarius

view this post on Zulip Email Gateway (Jan 10 2021 at 19:25):

From: "Eugene W. Stark" <isabelle-users@starkeffect.com>
The look-and-feel is different under Isabelle2021-RC2, but the behavior is the same.
I do not know of any "special security settings" in place. The JConsole Connection
dialog lists the isabelle.Main process and attempts to connect to it, but does not
succeed.

I played around a little with "strace", to try to see if I could figure out what was
failing, but I don't have very much of an idea what their connection protocol is supposed
to be doing. If I list all the "connect" system calls that are performed, there aren't
very many and none of them appear that they could be making a connection to a socket
associated with a specific JVM process. The last ones that occur, which fail,
apparently attempt to make an IPv6 connection to one of my DNS servers. I am not
surprised that they fail, because my ISP doesn't route IPv6 and I don't have any services
bound to IPv6 ports, but that is as far as I get with it.

view this post on Zulip Email Gateway (Feb 01 2021 at 15:12):

From: Makarius <makarius@sketis.net>
I suppose this is still unchanged in Isabelle2021-RC4?

Nobody else has reported this problem so far. There must be something special
on your Linux box to prevent local JVM process connections.

Makarius

view this post on Zulip Email Gateway (Feb 01 2021 at 15:34):

From: "Eugene W. Stark" <isabelle-users@starkeffect.com>
I recently built a new box and did a fresh install of Ubuntu 20.04 on it.
I just tried the Java VM monitor on it under Isabelle2021-RC3 and it worked OK.
So I guess you are right, but I don't have a clue what is causing the issue on
my old box.


Last updated: Dec 05 2021 at 22:18 UTC