[jira] [Commented] (NETBEANS-5949) remote debugger does not work

2022-01-06 Thread pat (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17470236#comment-17470236
 ] 

pat commented on NETBEANS-5949:
---

Here is the platform file that I am using.  Hopefully that is the last of the 
config files used to remote debug a program.


http://www.netbeans.org/dtds/remote-java-platformdefinition-1_0.dtd;>


































































> remote debugger does not work 
> --
>
> Key: NETBEANS-5949
> URL: https://issues.apache.org/jira/browse/NETBEANS-5949
> Project: NetBeans
>  Issue Type: Bug
>  Components: debugger - Java, projects - Ant
>Affects Versions: 12.4
> Environment: Host is Windows 10, Netbeans 12.4
> Remote Host is raspberry pi with java 11.0.12.
>Reporter: pat
>Priority: Major
>
> Create a java application project.
> Add this code to main and fix the imports
>public static void main(String[] args) {
> try {
> InetAddress id = InetAddress.getLocalHost();
> System.out.println(id.getHostName());
> System.out.println("java version is " + 
> System.getProperty("java.version"));
> System.out.println("VM is " + 
>   
> ManagementFactory.getRuntimeMXBean().getVmVersion());
> } catch (UnknownHostException ex) {
> Logger.getLogger(HelloWorld.class.getName()).log(Level.SEVERE, 
> null, ex);
> }
> }
> Run natively to verify you got it right.
> Follow the instructions here to create a remote java standard edition 
> platform targeting a different Linux computer.   My computer is a raspberry 
> pi with java 11 installed, Oracle Java SE 8 Embedded is no longer available 
> for most people but java 11 works fine.  (The bug is independent of java 
> version on the target).
> https://netbeans.apache.org/kb/docs/java/javase-embedded.html?print=yes
> Select the remote platform you created and run the program.  The output 
> should show that it ran on the remote host.
> Now debug the program.I get the following error.
> ant -f C:\\Users\\PATGI\\OneDrive\\Documents\\NetBeansProjects\\HelloWorld 
> -Dnb.internal.action.name=debug -Dremote.platform.passphrase=* 
> -Dremote.platform.rp.target=linuxarm-15 
> -Dremote.platform.rp.filename=linuxarm -Ddebug.class=helloworld.HelloWorld 
> -Dremote.platform.java.spec.ver=11 debug-remote
> init:
> deps-jar:
> Updating property file: 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build\built-jar.properties
> compile:
> Copying 1 file to 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build
> Nothing to copy.
> To run this application from the command line without Ant, try:
> java -jar 
> "C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\dist\HelloWorld.jar"
> deploy:
> jar:
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\nbproject\remote-platform-impl.xml:143:
>  Unable to create javax script engine for javascript
> BUILD FAILED (total time: 0 seconds)
> I was able to for the debugger to work by manually starting the debugger on 
> the remote host with something like
>  /usr/bin/java 
> -agentlib:jdwp=transport=dt_socket,address=*:8000,suspend=y,server=y 
> -Dfile.encoding=UTF-8   -jar 
> /home/pi/NetBeansProjects/HelloWorld/dist/HelloWorld.jar
> And then connect the debugger to a process already running on the remote host 
> at port 8000.
> I traced this back to javascript not being supported in this installation of 
> Ant.  I also think several of the configuration variables for remote 
> debugging are not setup.  e.g.  jdpa.address and jdpa.port but I could easily 
> be wrong about this.  
> The good news is it can be made to work and it is very nice when it is 
> working.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Commented] (NETBEANS-5949) remote debugger does not work

2022-01-06 Thread pat (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17470184#comment-17470184
 ] 

pat commented on NETBEANS-5949:
---

Here is the contents of my HelloWorld.properties

$target.debug=debug-remote
$target.profile=profile-remote
$target.run=run-remote
compile.on.save.unsupported.remote.platform=true
debug-transport=dt_socket
platform.runtime=Remote_Platform_Raspberry_Pi
debug-args-line=


> remote debugger does not work 
> --
>
> Key: NETBEANS-5949
> URL: https://issues.apache.org/jira/browse/NETBEANS-5949
> Project: NetBeans
>  Issue Type: Bug
>  Components: debugger - Java, projects - Ant
>Affects Versions: 12.4
> Environment: Host is Windows 10, Netbeans 12.4
> Remote Host is raspberry pi with java 11.0.12.
>Reporter: pat
>Priority: Major
>
> Create a java application project.
> Add this code to main and fix the imports
>public static void main(String[] args) {
> try {
> InetAddress id = InetAddress.getLocalHost();
> System.out.println(id.getHostName());
> System.out.println("java version is " + 
> System.getProperty("java.version"));
> System.out.println("VM is " + 
>   
> ManagementFactory.getRuntimeMXBean().getVmVersion());
> } catch (UnknownHostException ex) {
> Logger.getLogger(HelloWorld.class.getName()).log(Level.SEVERE, 
> null, ex);
> }
> }
> Run natively to verify you got it right.
> Follow the instructions here to create a remote java standard edition 
> platform targeting a different Linux computer.   My computer is a raspberry 
> pi with java 11 installed, Oracle Java SE 8 Embedded is no longer available 
> for most people but java 11 works fine.  (The bug is independent of java 
> version on the target).
> https://netbeans.apache.org/kb/docs/java/javase-embedded.html?print=yes
> Select the remote platform you created and run the program.  The output 
> should show that it ran on the remote host.
> Now debug the program.I get the following error.
> ant -f C:\\Users\\PATGI\\OneDrive\\Documents\\NetBeansProjects\\HelloWorld 
> -Dnb.internal.action.name=debug -Dremote.platform.passphrase=* 
> -Dremote.platform.rp.target=linuxarm-15 
> -Dremote.platform.rp.filename=linuxarm -Ddebug.class=helloworld.HelloWorld 
> -Dremote.platform.java.spec.ver=11 debug-remote
> init:
> deps-jar:
> Updating property file: 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build\built-jar.properties
> compile:
> Copying 1 file to 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build
> Nothing to copy.
> To run this application from the command line without Ant, try:
> java -jar 
> "C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\dist\HelloWorld.jar"
> deploy:
> jar:
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\nbproject\remote-platform-impl.xml:143:
>  Unable to create javax script engine for javascript
> BUILD FAILED (total time: 0 seconds)
> I was able to for the debugger to work by manually starting the debugger on 
> the remote host with something like
>  /usr/bin/java 
> -agentlib:jdwp=transport=dt_socket,address=*:8000,suspend=y,server=y 
> -Dfile.encoding=UTF-8   -jar 
> /home/pi/NetBeansProjects/HelloWorld/dist/HelloWorld.jar
> And then connect the debugger to a process already running on the remote host 
> at port 8000.
> I traced this back to javascript not being supported in this installation of 
> Ant.  I also think several of the configuration variables for remote 
> debugging are not setup.  e.g.  jdpa.address and jdpa.port but I could easily 
> be wrong about this.  
> The good news is it can be made to work and it is very nice when it is 
> working.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Commented] (NETBEANS-5949) remote debugger does not work

2022-01-06 Thread pat (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17470166#comment-17470166
 ] 

pat commented on NETBEANS-5949:
---

I added the remote-platform-impl.xml to the git repository for the project so I 
can revert the file when netbeans generates a new one. (And I have anther 
backup copy, just in case).

I also add the jar files to the project so everything is in one place.



> remote debugger does not work 
> --
>
> Key: NETBEANS-5949
> URL: https://issues.apache.org/jira/browse/NETBEANS-5949
> Project: NetBeans
>  Issue Type: Bug
>  Components: debugger - Java, projects - Ant
>Affects Versions: 12.4
> Environment: Host is Windows 10, Netbeans 12.4
> Remote Host is raspberry pi with java 11.0.12.
>Reporter: pat
>Priority: Major
>
> Create a java application project.
> Add this code to main and fix the imports
>public static void main(String[] args) {
> try {
> InetAddress id = InetAddress.getLocalHost();
> System.out.println(id.getHostName());
> System.out.println("java version is " + 
> System.getProperty("java.version"));
> System.out.println("VM is " + 
>   
> ManagementFactory.getRuntimeMXBean().getVmVersion());
> } catch (UnknownHostException ex) {
> Logger.getLogger(HelloWorld.class.getName()).log(Level.SEVERE, 
> null, ex);
> }
> }
> Run natively to verify you got it right.
> Follow the instructions here to create a remote java standard edition 
> platform targeting a different Linux computer.   My computer is a raspberry 
> pi with java 11 installed, Oracle Java SE 8 Embedded is no longer available 
> for most people but java 11 works fine.  (The bug is independent of java 
> version on the target).
> https://netbeans.apache.org/kb/docs/java/javase-embedded.html?print=yes
> Select the remote platform you created and run the program.  The output 
> should show that it ran on the remote host.
> Now debug the program.I get the following error.
> ant -f C:\\Users\\PATGI\\OneDrive\\Documents\\NetBeansProjects\\HelloWorld 
> -Dnb.internal.action.name=debug -Dremote.platform.passphrase=* 
> -Dremote.platform.rp.target=linuxarm-15 
> -Dremote.platform.rp.filename=linuxarm -Ddebug.class=helloworld.HelloWorld 
> -Dremote.platform.java.spec.ver=11 debug-remote
> init:
> deps-jar:
> Updating property file: 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build\built-jar.properties
> compile:
> Copying 1 file to 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build
> Nothing to copy.
> To run this application from the command line without Ant, try:
> java -jar 
> "C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\dist\HelloWorld.jar"
> deploy:
> jar:
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\nbproject\remote-platform-impl.xml:143:
>  Unable to create javax script engine for javascript
> BUILD FAILED (total time: 0 seconds)
> I was able to for the debugger to work by manually starting the debugger on 
> the remote host with something like
>  /usr/bin/java 
> -agentlib:jdwp=transport=dt_socket,address=*:8000,suspend=y,server=y 
> -Dfile.encoding=UTF-8   -jar 
> /home/pi/NetBeansProjects/HelloWorld/dist/HelloWorld.jar
> And then connect the debugger to a process already running on the remote host 
> at port 8000.
> I traced this back to javascript not being supported in this installation of 
> Ant.  I also think several of the configuration variables for remote 
> debugging are not setup.  e.g.  jdpa.address and jdpa.port but I could easily 
> be wrong about this.  
> The good news is it can be made to work and it is very nice when it is 
> working.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Commented] (NETBEANS-5949) remote debugger does not work

2022-01-06 Thread pat (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17470164#comment-17470164
 ] 

pat commented on NETBEANS-5949:
---

Joao,  Here is my complete remote-platform-impl.xml  so you can look at 
everything.  I am using ssh with key key file rather than password to open the 
tunnel between the two hosts.  So I am using the debug-remote-key rather than 
the debug-remote-password

I set a breakpoint in my program and ran netstat on the remote host looking for 
the port on the command line.  Here is the output.  It looks like what you are 
describing.


Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Jan  6 08:17:13 2022
pi@raspberrypi:~ $ netstat -a | grep 62096
tcp0  0 localhost:62096 0.0.0.0:*   LISTEN
tcp0  0 localhost:62096 localhost:60420 ESTABLISHED
tcp0  0 localhost:60420 localhost:62096 ESTABLISHED
tcp6   0  0 localhost:62096 [::]:*  LISTEN
pi@raspberrypi:~ $

Here is netstat on the remote host looking for connections to my development 
box.
pi@raspberrypi:~ $ netstat -a | grep 192.168.1.7
tcp0  0 192.168.1.34:ssh192.168.1.7:62100   ESTABLISHED
tcp0 36 192.168.1.34:ssh192.168.1.7:63911   ESTABLISHED
tcp0  0 192.168.1.34:ssh192.168.1.7:62097   ESTABLISHED
tcp0  0 192.168.1.34:ssh192.168.1.7:59179   ESTABLISHED
pi@raspberrypi:~ $





http://www.netbeans.org/ns/j2se-project/remote-platform/1; 
xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1; 
xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3;>






Runtime platform (platform.runtime) 
must be set.








Must set 
remote.platform.home.dir
Must set 
remote.platform.work.dir
Must set remote.platform.host
Must set remote.platform.port
Must set remote.platform.user
Must set remote.platform.auth













  





 

   
  



  



  http://www.netbeans.org/ns/j2se-project/remote-platform/1;>










http://www.netbeans.org/ns/j2se-project/remote-platform/1;>


Must set 
remote.platform.keyfile














































































 



















   
   
   













Must set 
remote.platform.keyfile

















> remote debugger does not work 
> --
>
> Key: NETBEANS-5949
> URL: https://issues.apache.org/jira/browse/NETBEANS-5949
> Project: NetBeans
>  Issue Type: Bug
>  Components: debugger - Java, projects - Ant
>Affects Versions: 12.4
> Environment: Host is Windows 10, Netbeans 12.4
> Remote Host is raspberry pi with java 11.0.12.
>Reporter: pat
>Priority: Major
>
> Create a java application project.
> Add this code to main and fix the imports
>public static void main(String[] args) {
> try {
> InetAddress id = InetAddress.getLocalHost();
> System.out.println(id.getHostName());
> System.out.println("java version is " + 
> System.getProperty("java.version"));
> System.out.println("VM is " + 
>   
> 

[jira] [Commented] (NETBEANS-5949) remote debugger does not work

2022-01-06 Thread Joao Graca da Nobrega (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17470142#comment-17470142
 ] 

Joao Graca da Nobrega commented on NETBEANS-5949:
-

Hi Pat,

There is no other program using the ip port to be used by the debugger. Also 
notice that every time you run the program a different port is used... The 
issue seems to be related to the tunnel used to connect to the application. In 
the remote-platform-impl.xml file we can see

        
            **

This is a smart way for the debugger to connect to the application. First the 
remote java application only allows debug connections from the local machine 
(notice the address 127.0.0.1:53738 on your example). This is much better from 
the security point of view. Second the actual connection to the process being 
debugged goes through a tunnel created inside the SSH channel. The issue here 
is that the remotetunnel itself is using that same port, hence we get the 
"address already in use" error. If we comment the remotetunnel config, the 
error is gone but, of course, netbeans fails to connect to the application to 
debug it.

Additionally using remotetunnel instead of localtunnel seems to be an 
implementation problem. If we are not mistaken NetBeans connects to the 
application it wants to debug, and not the other way around. Now, what an ssh 
remote tunnel allows us to do is:

"allows anyone on the remote server to connect to TCP port X on the remote 
server. The connection will then be tunneled back to the client host, and the 
client then makes a TCP connection to port Y on {{{}localhost{}}}. Any other 
host name or IP address could be used instead of {{localhost}} to specify the 
host to connect to."

[https://ant.apache.org/manual/Tasks/sshsession.html#RemoteTunnel]
[https://www.ssh.com/academy/ssh/tunneling/example#remote-forwarding]

 

We tried using a localtunnel instead but we have a similar problem:

com.jcraft.jsch.JSchException: PortForwardingL: local port 127.0.0.1:53601 
cannot be bound.
[...]
Caused by: java.net.BindException: Address already in use: bind
    at java.base/sun.nio.ch.Net.bind0(Native Method)
[...]

 

We don't understand how you don't have the same issue. Can you confirm that the 
following in your "remote-platform-impl.xml" file is as follows:

    
        
        
            
            
                
            
        
    

> remote debugger does not work 
> --
>
> Key: NETBEANS-5949
> URL: https://issues.apache.org/jira/browse/NETBEANS-5949
> Project: NetBeans
>  Issue Type: Bug
>  Components: debugger - Java, projects - Ant
>Affects Versions: 12.4
> Environment: Host is Windows 10, Netbeans 12.4
> Remote Host is raspberry pi with java 11.0.12.
>Reporter: pat
>Priority: Major
>
> Create a java application project.
> Add this code to main and fix the imports
>public static void main(String[] args) {
> try {
> InetAddress id = InetAddress.getLocalHost();
> System.out.println(id.getHostName());
> System.out.println("java version is " + 
> System.getProperty("java.version"));
> System.out.println("VM is " + 
>   
> ManagementFactory.getRuntimeMXBean().getVmVersion());
> } catch (UnknownHostException ex) {
> Logger.getLogger(HelloWorld.class.getName()).log(Level.SEVERE, 
> null, ex);
> }
> }
> Run natively to verify you got it right.
> Follow the instructions here to create a remote java standard edition 
> platform targeting a different Linux computer.   My computer is a raspberry 
> pi with java 11 installed, Oracle Java SE 8 Embedded is no longer available 
> for most people but java 11 works fine.  (The bug is independent of java 
> version on the target).
> https://netbeans.apache.org/kb/docs/java/javase-embedded.html?print=yes
> Select the remote platform you created and run the program.  The output 
> should show that it ran on the remote host.
> Now debug the program.I get the following error.
> ant -f C:\\Users\\PATGI\\OneDrive\\Documents\\NetBeansProjects\\HelloWorld 
> -Dnb.internal.action.name=debug -Dremote.platform.passphrase=* 
> -Dremote.platform.rp.target=linuxarm-15 
> -Dremote.platform.rp.filename=linuxarm -Ddebug.class=helloworld.HelloWorld 
> -Dremote.platform.java.spec.ver=11 debug-remote
> init:
> deps-jar:
> Updating property file: 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build\built-jar.properties
> compile:
> Copying 1 file to 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build
> Nothing to copy.
> To run this application from the command line without Ant, try:
> java -jar 
> "C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\dist\HelloWorld.jar"
> deploy:
> jar:
> 

[jira] [Commented] (NETBEANS-5949) remote debugger does not work

2022-01-06 Thread pat (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17470084#comment-17470084
 ] 

pat commented on NETBEANS-5949:
---

Jaoa,  Here is the complete output from my run with a debugger on a remote 
host.  Somehow the port is being used twice.  Perhaps through a console window 
use netstat to determine which processes are using that port.

Copying 1 file to 
C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build
Nothing to copy.
To run this application from the command line without Ant, try:
java -jar 
"C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\dist\HelloWorld.jar"
deploy:
jar:
Connecting to 192.168.1.34:22
Connecting to 192.168.1.34:22
cmd : mkdir -p '/home/pi/NetBeansProjects//HelloWorld/dist'
Connecting to 192.168.1.34:22
done.
profile-rp-calibrate-key:
Connecting to 192.168.1.34:22
cmd : cd '/home/pi/NetBeansProjects//HelloWorld'; '/usr/bin/java'  
-Xrunjdwp:transport=dt_socket,address=127.0.0.1:53738 -Dfile.encoding=UTF-8   
-jar /home/pi/NetBeansProjects//HelloWorld/dist/HelloWorld.jar 
raspberrypi
java version is 11.0.12
VM is 11.0.12+7-post-Raspbian-2deb10u1
debug-remote:
BUILD SUCCESSFUL (total time: 11 seconds)

> remote debugger does not work 
> --
>
> Key: NETBEANS-5949
> URL: https://issues.apache.org/jira/browse/NETBEANS-5949
> Project: NetBeans
>  Issue Type: Bug
>  Components: debugger - Java, projects - Ant
>Affects Versions: 12.4
> Environment: Host is Windows 10, Netbeans 12.4
> Remote Host is raspberry pi with java 11.0.12.
>Reporter: pat
>Priority: Major
>
> Create a java application project.
> Add this code to main and fix the imports
>public static void main(String[] args) {
> try {
> InetAddress id = InetAddress.getLocalHost();
> System.out.println(id.getHostName());
> System.out.println("java version is " + 
> System.getProperty("java.version"));
> System.out.println("VM is " + 
>   
> ManagementFactory.getRuntimeMXBean().getVmVersion());
> } catch (UnknownHostException ex) {
> Logger.getLogger(HelloWorld.class.getName()).log(Level.SEVERE, 
> null, ex);
> }
> }
> Run natively to verify you got it right.
> Follow the instructions here to create a remote java standard edition 
> platform targeting a different Linux computer.   My computer is a raspberry 
> pi with java 11 installed, Oracle Java SE 8 Embedded is no longer available 
> for most people but java 11 works fine.  (The bug is independent of java 
> version on the target).
> https://netbeans.apache.org/kb/docs/java/javase-embedded.html?print=yes
> Select the remote platform you created and run the program.  The output 
> should show that it ran on the remote host.
> Now debug the program.I get the following error.
> ant -f C:\\Users\\PATGI\\OneDrive\\Documents\\NetBeansProjects\\HelloWorld 
> -Dnb.internal.action.name=debug -Dremote.platform.passphrase=* 
> -Dremote.platform.rp.target=linuxarm-15 
> -Dremote.platform.rp.filename=linuxarm -Ddebug.class=helloworld.HelloWorld 
> -Dremote.platform.java.spec.ver=11 debug-remote
> init:
> deps-jar:
> Updating property file: 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build\built-jar.properties
> compile:
> Copying 1 file to 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build
> Nothing to copy.
> To run this application from the command line without Ant, try:
> java -jar 
> "C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\dist\HelloWorld.jar"
> deploy:
> jar:
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\nbproject\remote-platform-impl.xml:143:
>  Unable to create javax script engine for javascript
> BUILD FAILED (total time: 0 seconds)
> I was able to for the debugger to work by manually starting the debugger on 
> the remote host with something like
>  /usr/bin/java 
> -agentlib:jdwp=transport=dt_socket,address=*:8000,suspend=y,server=y 
> -Dfile.encoding=UTF-8   -jar 
> /home/pi/NetBeansProjects/HelloWorld/dist/HelloWorld.jar
> And then connect the debugger to a process already running on the remote host 
> at port 8000.
> I traced this back to javascript not being supported in this installation of 
> Ant.  I also think several of the configuration variables for remote 
> debugging are not setup.  e.g.  jdpa.address and jdpa.port but I could easily 
> be wrong about this.  
> The good news is it can be made to work and it is very nice when it is 
> working.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For 

[jira] [Commented] (NETBEANS-5949) remote debugger does not work

2022-01-05 Thread Joao Graca da Nobrega (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17469485#comment-17469485
 ] 

Joao Graca da Nobrega commented on NETBEANS-5949:
-

Fixing remote-platform-impl.xml as suggested "works", but be aware that the 
remote-platform-impl.xml file gets recreated if you open an close netbeans.

After this fix we are still not being able to debug our project, we get the 
following error (using java 17):

cmd : cd '[...]'; '/usr/java/jdk-17.0.1/bin/java' 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=127.0.0.1:63890 
-Dfile.encoding=UTF-8   -jar [...]/HelloWorld.jar 
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized 
[open/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:734]

Port 63890 is random, and it was not used on remote machine, Debugging always 
fails with this error on a new random port, we still don't know why (looking 
into it at the moment). Executing the command line directly on the remote 
machine has no issue.

> remote debugger does not work 
> --
>
> Key: NETBEANS-5949
> URL: https://issues.apache.org/jira/browse/NETBEANS-5949
> Project: NetBeans
>  Issue Type: Bug
>  Components: debugger - Java, projects - Ant
>Affects Versions: 12.4
> Environment: Host is Windows 10, Netbeans 12.4
> Remote Host is raspberry pi with java 11.0.12.
>Reporter: pat
>Priority: Major
>
> Create a java application project.
> Add this code to main and fix the imports
>public static void main(String[] args) {
> try {
> InetAddress id = InetAddress.getLocalHost();
> System.out.println(id.getHostName());
> System.out.println("java version is " + 
> System.getProperty("java.version"));
> System.out.println("VM is " + 
>   
> ManagementFactory.getRuntimeMXBean().getVmVersion());
> } catch (UnknownHostException ex) {
> Logger.getLogger(HelloWorld.class.getName()).log(Level.SEVERE, 
> null, ex);
> }
> }
> Run natively to verify you got it right.
> Follow the instructions here to create a remote java standard edition 
> platform targeting a different Linux computer.   My computer is a raspberry 
> pi with java 11 installed, Oracle Java SE 8 Embedded is no longer available 
> for most people but java 11 works fine.  (The bug is independent of java 
> version on the target).
> https://netbeans.apache.org/kb/docs/java/javase-embedded.html?print=yes
> Select the remote platform you created and run the program.  The output 
> should show that it ran on the remote host.
> Now debug the program.I get the following error.
> ant -f C:\\Users\\PATGI\\OneDrive\\Documents\\NetBeansProjects\\HelloWorld 
> -Dnb.internal.action.name=debug -Dremote.platform.passphrase=* 
> -Dremote.platform.rp.target=linuxarm-15 
> -Dremote.platform.rp.filename=linuxarm -Ddebug.class=helloworld.HelloWorld 
> -Dremote.platform.java.spec.ver=11 debug-remote
> init:
> deps-jar:
> Updating property file: 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build\built-jar.properties
> compile:
> Copying 1 file to 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build
> Nothing to copy.
> To run this application from the command line without Ant, try:
> java -jar 
> "C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\dist\HelloWorld.jar"
> deploy:
> jar:
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\nbproject\remote-platform-impl.xml:143:
>  Unable to create javax script engine for javascript
> BUILD FAILED (total time: 0 seconds)
> I was able to for the debugger to work by manually starting the debugger on 
> the remote host with something like
>  /usr/bin/java 
> -agentlib:jdwp=transport=dt_socket,address=*:8000,suspend=y,server=y 
> -Dfile.encoding=UTF-8   -jar 
> /home/pi/NetBeansProjects/HelloWorld/dist/HelloWorld.jar
> And then connect the debugger to a process already running on the remote host 
> at port 8000.
> I traced this back to javascript not being supported in this installation of 
> Ant.  I also think several of the configuration variables for remote 
> debugging are not setup.  e.g.  jdpa.address and jdpa.port but I could easily 
> be wrong about this.  
> The good news is it can be made to work and it is very nice when it is 
> working.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans 

[jira] [Commented] (NETBEANS-5949) remote debugger does not work

2021-08-26 Thread pat (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17405493#comment-17405493
 ] 

pat commented on NETBEANS-5949:
---

I went down the path to figure out what all was necessary to make remote 
debugging work.

The scriptdef target in remote-platform-impl.xml needs to look something like 
below.  Of course the paths to the jar files need to match where they are 
installed.

 





 



And HelloWorld.properties needs to have the following line added.  The 
debug-args-line needs to be defined but can be empty.

debug-args-line=

An then the debugger can launch and debug the application on the remote host.

> remote debugger does not work 
> --
>
> Key: NETBEANS-5949
> URL: https://issues.apache.org/jira/browse/NETBEANS-5949
> Project: NetBeans
>  Issue Type: Bug
>  Components: debugger - Java, projects - Ant
>Affects Versions: 12.4
> Environment: Host is Windows 10, Netbeans 12.4
> Remote Host is raspberry pi with java 11.0.12.
>Reporter: pat
>Priority: Major
>
> Create a java application project.
> Add this code to main and fix the imports
>public static void main(String[] args) {
> try {
> InetAddress id = InetAddress.getLocalHost();
> System.out.println(id.getHostName());
> System.out.println("java version is " + 
> System.getProperty("java.version"));
> System.out.println("VM is " + 
>   
> ManagementFactory.getRuntimeMXBean().getVmVersion());
> } catch (UnknownHostException ex) {
> Logger.getLogger(HelloWorld.class.getName()).log(Level.SEVERE, 
> null, ex);
> }
> }
> Run natively to verify you got it right.
> Follow the instructions here to create a remote java standard edition 
> platform targeting a different Linux computer.   My computer is a raspberry 
> pi with java 11 installed, Oracle Java SE 8 Embedded is no longer available 
> for most people but java 11 works fine.  (The bug is independent of java 
> version on the target).
> https://netbeans.apache.org/kb/docs/java/javase-embedded.html?print=yes
> Select the remote platform you created and run the program.  The output 
> should show that it ran on the remote host.
> Now debug the program.I get the following error.
> ant -f C:\\Users\\PATGI\\OneDrive\\Documents\\NetBeansProjects\\HelloWorld 
> -Dnb.internal.action.name=debug -Dremote.platform.passphrase=* 
> -Dremote.platform.rp.target=linuxarm-15 
> -Dremote.platform.rp.filename=linuxarm -Ddebug.class=helloworld.HelloWorld 
> -Dremote.platform.java.spec.ver=11 debug-remote
> init:
> deps-jar:
> Updating property file: 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build\built-jar.properties
> compile:
> Copying 1 file to 
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build
> Nothing to copy.
> To run this application from the command line without Ant, try:
> java -jar 
> "C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\dist\HelloWorld.jar"
> deploy:
> jar:
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\nbproject\remote-platform-impl.xml:143:
>  Unable to create javax script engine for javascript
> BUILD FAILED (total time: 0 seconds)
> I was able to for the debugger to work by manually starting the debugger on 
> the remote host with something like
>  /usr/bin/java 
> -agentlib:jdwp=transport=dt_socket,address=*:8000,suspend=y,server=y 
> -Dfile.encoding=UTF-8   -jar 
> /home/pi/NetBeansProjects/HelloWorld/dist/HelloWorld.jar
> And then connect the debugger to a process already running on the remote host 
> at port 8000.
> I traced this back to javascript not being supported in this installation of 
> Ant.  I also think several of the configuration variables for remote 
> debugging are not setup.  e.g.  jdpa.address and jdpa.port but I could easily 
> be wrong about this.  
> The good news is it can be made to work and it is very nice when it is 
> working.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists