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

Matthias Bläsing commented on NETBEANS-3903:
--------------------------------------------

[~fgrillo0] you did not get an update because you did not step up to do the 
work and did not contribute. This might sound rude, but there are many people 
helping with netbeans and fixing things they don't use, so please keep that in 
mind before demanding things.

> Netbeans 11.2 fails to detect successful startup of Tomcat 9.0.31
> -----------------------------------------------------------------
>
>                 Key: NETBEANS-3903
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3903
>             Project: NetBeans
>          Issue Type: Bug
>          Components: debugger - Java, serverplugins - Tomcat
>    Affects Versions: 11.0, 11.1, 11.2, 11.3
>         Environment: MacOS Catalina 10.15.3
> Netbeans 11.2 (using installer)
> Netbeans 11.0 (using binary download)
> Tomcat 9.0.31 (via brew and binary download)
> Tomcat 8.5.51 (via brew and binary download)
>            Reporter: Rob
>            Assignee: Nam Nguyen
>            Priority: Blocker
>              Labels: ide, pull-request-available, server, tomcat, tomcat9
>             Fix For: 12.0
>
>         Attachments: Netbeans11.0-terminal-output.log, Screenshot 2020-02-20 
> at 21.17.36.png, apache-tomcat-9.0.31.zip, netbeans11-2-log.zip, 
> org-netbeans-modules-tomcat5.jar
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> * Example code - Not applicable 
>  * Example project - Not applicable
>  * Attachments...
>  * Screenshot 1) Console shows success whilst minutes later Netbeans error 
> appears
>  * Screenshot 2) Netbeans 11.0 terminal output included and I suspect it the 
> same error in Netbeans 11.2
>  * apache-tomcat-9.0.31.zip that includes the tomcat configuration and logs 
> for one attempt of running Tomcat (all looks good here) 
>  * netbeans11-2-log for the latest Netbeans 11.2 logs
>  * Exact steps 1. Add tomcat server 2. Run tomcat server, 3. Confirm it 
> starts (browser success and console logs success), 4. Minutes later error 
> appears to say "Starting of Tomcat Failed"
>  * Actual results - Tomcat should start than then Netbeans would usually 
> deploy the app, but Netbeans fails to detect Tomcat started successfully.  No 
> projects required to recreate this - starting Tomcat up from within the 
> Netbeans IDE shows success in the console <500ms but then reports as failed 
> minutes later
>  * Expected results - Netbeans should continue to deploy an application once 
> detecting tomcat has started
>  * NetBeans version - Multiple (11.0, 11.2)
>  * JDK version JDK 13 Open JDK and Sun JDK
>  * OS (Environment) Mac Catalina 10.15.3
> Deeper information follows...
> I installed the pre-requisite Open JDK 13 first.
> I had Netbeans 8.2 running on my iMac and decided to install the latest 
> version of Netbeans on my MacBook Pro running Mac OS Catalina 10.15.3, so I 
> opted for the latest NetBeans 11.2 installer.  
> I was surprised to see no 'customise' option during installation to choose 
> Tomcat (which is what used to happen in Netbeans 8.2).  Once Netbeans 11.2 
> was running I went to the server tab and added Tomcat 9.0.31 by pointing to 
> the Tomcat brew installation folder and added a private configuration folder, 
> I entered a new user 'ide' and password and ticked the 'Create user if does 
> not exist'.
> I can confirm it created the user in the tomcat-users.xml file correctly.
> ```
> <?xml version="1.0" encoding="UTF-8"?>
> <tomcat-users xmlns="http://tomcat.apache.org/xml"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="1.0" 
> xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd">
>  <role rolename="manager-script"/>
>  <role rolename="manager-gui"/>
>  <role rolename="admin"/>
>  <user password="password" roles="manager-script,admin,manager-gui" 
> username="ide"/>
> </tomcat-users>
> ```
> When I right-click on the server and choose "Start", or "Start in debug mode" 
> tomcat starts and it is confirmed as starting within 317 milliseconds.
> I can load a browser manually and navigate to 
> [http://localhost:8084/manager/status] and confirm Tomcat is indeed running.
> ```
> NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED 
> --add-opens=java.base/java.io=ALL-UNNAMED 
> --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
> 20-Feb-2020 21:09:28.879 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Server version name: 
> Apache Tomcat/9.0.31
> 20-Feb-2020 21:09:28.883 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 5 
> 2020 19:32:12 UTC
> 20-Feb-2020 21:09:28.883 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Server version number: 
> 9.0.31.0
> 20-Feb-2020 21:09:28.883 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log OS Name: Mac OS X
> 20-Feb-2020 21:09:28.883 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.15.3
> 20-Feb-2020 21:09:28.883 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86_64
> 20-Feb-2020 21:09:28.883 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log Java Home: 
> /Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home
> 20-Feb-2020 21:09:28.883 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 13.0.2+8
> 20-Feb-2020 21:09:28.883 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle 
> Corporation
> 20-Feb-2020 21:09:28.884 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: 
> /Users/rob/Apache-Tomcat-Netbeans/apache-tomcat-9.0.31
> 20-Feb-2020 21:09:28.884 INFO [main] 
> org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: 
> /usr/local/Cellar/tomcat/9.0.31/libexec
> ... (full details in attachment)
> 20-Feb-2020 21:09:29.494 INFO [main] 
> org.apache.catalina.startup.Catalina.start Server startup in [317] 
> milliseconds
> ```
> However a few minutes later the IDE reports it has not started Tomcat
> Please note that Netbeans 11.0 also reports the following error, but I just 
> choose to 'Cancel' that.  The error doesn't appear in Netbeans 11.2.
> ```
> "libjnidispatch-440.jnilib" cannot be opened because the developer cannot be 
> verified.
> ```
>  
> Things I've tried based on 
> https://stackoverflow.com/questions/22225764/starting-of-tomcat-failed-from-netbeans
>  * Changing internet proxy settings -  try in NetBeans choose No Proxy in the 
> Tools -> Options -> General tab.
>  * In the server.xml file, in the Connector element for HTTP/1.1, adding the 
> following attribute: server="Apache-Coyote/1.1".- see 
>  * Ensuring the manager-script role is declared
> I've also tried in desperation 
>  * Various Netbeans versions
>  * Various Tomcat versions
>  * Running Netbeans from Applications, Downloads, Documents folders
>  * OpenJDK (via brew) then Oracle JDK (by uninstalling OpenJDK and using the 
> Oracle JDK 13 installer)
>  * Rebooting the Mac 🤷‍♂️
>  * Running Netbeans 11.2 as sudo via 
> sudo /Applications/NetBeans/Apache\ NetBeans\ 
> 11.2.app/Contents/Resources/NetBeans/netbeans/bin/netbeans
> Suspicions
>  * Installed Mac OS fresh with case SenSitiVe filenames - maybe this could 
> upset something?
>  * Mac OS Catalina has more security restrictions - maybe it's blocking some 
> sort of file / process ID access
>  * Network issue? I've seen reports of needing to bypass the proxy, or 
> ticking the first three proxy settings, I've tried them all
>  * When running as Sudo I did see some warnings about reflective access / 
> FileMapStorage
> WARNING: package com.sun.tools.javadoc.main not in jdk.javadoc
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by 
> org.netbeans.core.output2.FileMapStorage 
> (jar:file:/Applications/NetBeans/Apache%20NetBeans%2011.2.app/Contents/Resources/NetBeans/netbeans/platform/modules/org-netbeans-core-output2.jar!/)
>  to method java.nio.DirectByteBuffer.cleaner()
> WARNING: Please consider reporting this to the maintainers of 
> org.netbeans.core.output2.FileMapStorage
> WARNING: Use --illegal-access=warn to enable warnings of further illegal 
> reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> Because NetBeans 11.0 runs with the terminal open (full logs uploaded) I can 
> see errors relating to MonitorSupport and DebugSupport and 
> synchronizeMonitorWithFlag smells like the reason why Netbeans can't detect 
> Tomcat has actually run successfully.
> Here's an excerpt
> ```
> INFO [org.netbeans.modules.tomcat5.optional.MonitorSupport]
> java.lang.Exception: 
> tomcat90:home=/usr/local/Cellar/tomcat/9.0.31/libexec:base=/Users/rob/Apache-Tomcat-Netbeans/apache-tomcat-9.0.31
>  at 
> org.netbeans.modules.tomcat5.optional.MonitorSupport.synchronizeMonitorWithFlag(MonitorSupport.java:109)
>  at 
> org.netbeans.modules.tomcat5.optional.StartTomcat$StartRunnable.run(StartTomcat.java:315)
>  at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
>  at 
> org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
>  at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
>  at 
> org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
> INFO [org.netbeans.modules.tomcat5.optional.DebugSupport]
> java.lang.Exception: 
> tomcat90:home=/usr/local/Cellar/tomcat/9.0.31/libexec:base=/Users/rob/Apache-Tomcat-Netbeans/apache-tomcat-9.0.31
>  at 
> org.netbeans.modules.tomcat5.optional.DebugSupport.allowDebugging(DebugSupport.java:58)
>  at 
> org.netbeans.modules.tomcat5.optional.StartTomcat$StartRunnable.run(StartTomcat.java:332)
>  at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
>  at 
> org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
>  at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
>  at 
> org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
> ```
>  



--
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

Reply via email to