Netbeans GlassFish Server 6, deploy, Connection refused: connect, false error on Mac - netbeans

After deploying my javaee application from the Apache Netbeans 12.4 console, I get the the below error on the output pane.
GlassFish Server 6, deploy, Connection refused: connect, false
This error shows even after the output "GlassFish server is running" was displayed earlier in the deployment messages.
I have checked the GlassFish folder in my mac and there are no error logs showing. Attempting to start GlassFish in debug mode gives the same issue.
Any advices on what could be the issue?

After some investigation, I figured that this issue was as a result of GlassFish not having administrative privileges to make changes to my filesystem.
All I needed to do was to start up GlassFish as an admin.
Usually, GlassFish is installed on the below path of your Mac.
/Users/YourUsername/GlassFish_Server
The below are the steps to achieve that.
Navigate to the bin folder of your GlassFish Server.
/Users/YourUsername/GlassFish_Server/bin
Run the asadmin command using the below command.
./asadmin
Then in the console that opens, type the below command.
start-domain
After a few seconds, the GlassFish server is now running. You can test this on your browser at the default admin port using localhost:4848 or http port of localhost:8080
To stop GlassFish, follow the same steps above, however execute the "stop-domain" command for step 3.
I hope it reduces some stress for someone.

Related

Confused about "Remote Debugging" Wildfly 20 from Eclipse 2020-06

I need to be able to "remotely debug" a Java/Jakarta EE servlet running under Wildfly 20 under Ubuntu 20 from Eclipse 2020-06 running on Windows 10 at a different IP.
My research has discovered what appears to be two different approaches: one is what I want and the other is a simpler "subset".
*** First the "simple" approach. This approach is supposed to let me debug from Eclipse an app that is already deployed and running on Wildfly. To do this I uncomment this line in standalone.conf:
JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"
Then I start Wildfly and ensure the app also starts.
In Eclipse I create in Debug Configuration a new Remote Java Application and ensure I use the same port 8787 as above. Then I just push "Debug".
I get this error:
Failed to connect to remote VM. Connection refused. Connection refused: connect
If I return to the Wildfly system and run the following I see that port 8787 is not being monitored so that sure looks like a problem:
ss -tp | grep 8787
(nothing is found)
*** The other approach appears to be what I want to do which is to have Eclipse deploy changed files to Wildfly and also allow me to debug remotely. That is how I worked with Eclipse Oxygen and Wildfly 10 when both were installed on the same Windows machine.
In this case I set up a new Remote Connection in Eclipse and then a new Server (and attach my Project to the Server) using that Connection. I then start the Server in Debug mode. In the Progress View I can see files being copied to a Path on the Wildfly server so that seems like progress but after 20 seconds I see the same error I got in the "simple" approach above.
Failed to connect to remote VM. Connection refused.
What's interesting is that if, in the Remote Systems View I open the Remote Connection I created, I am able to use the sftp item to see files on the remote Wildfly system. So it seems that I am able to connect to Wildfly.
I need help fixing both of these problems but especially the last one since I need to have Eclipse deploy changes to Wildfly as it did when Wildfly was local.
Thank you in advance.

WildFly 8.2.0 - Lost connection to the server

I try the new version of WildFly: 8.2.0 (I was with the 8.1.0) on Windows 8.1 with JDK 1.8u25
So I install wildfly, add user, add WildFly to NetBeans, go to the admin console (on Firefox 34), add jdbc driver in runtime and then click on Configuration to setup the datasource but there is a popup saying "Lost connection to the server", I restart but the problem remain, I reinstall and the problem remain
Each time I click on configuration I have the popup : "Lost connection to the server"
Reloading the admin page (using F5 or Ctrl+R) also worked for me. I think the browser cached the old console.

GlassFish Server 4.0 start error with JDK

I'm using NetBeans 7.3.1 with GlassFish Server 4
When I try to run a(any) project I get the following error.
Starting GlassFish Server
GlassFish Server Server start failed. Cant create start proccess.
C:\Users\ENES\Documents\NetBeansProjects\Tezmaksan\nbproject\build-impl.xml:1041: Deployment error: GlassFish Server Server start failed. Cant create start proccess.
See the server log for details.
BUILD FAILED (total time: 2 seconds)
I don't know where the log file is, I couldn't find it.
When I go bin directory of GlassFish and run startserv.bat, it looks like working because localhost:8080/ and localhost:4848/ are working. But my application still can't start.
When I go localhost:8080/Tezmaksan/ there is this error there
HTTP Status 500 - Internal Server Error
type Exception report
messageInternal Server Error
descriptionThe server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.0 logs.
GlassFish Server Open Source Edition 4.0
I have last verison of JDK (1.7u25) installed and when I check from NetBeans it is selected for GlassFish. I'm using x64 Windows 7. I didn't have this problem 2-3 months ago, it just popped out. I tried uninstalling and reinstalling NetBeans, GlassFish and JDK and problem is still there.
Thanks for your helps
I got the solution after searching through the web.
Adding an option to a NetBeans setting file will do it.
Open NETBEANS_DIRECTORY/etc/netbeans.conf
Search for "netbeans_default_options"
Then add "--locale en"
So it will look like from this
netbeans_default_options="-J-client...
to this
netbeans_default_options="--locale en -J-client...
restart NetBeans, problem solved.

GlassFish Server works on Netbeans 7.2 but not on 7.3

I have just installed Netbeans 7.3. Prepared a sample web application.
But Glassfish does not start.
Error message is "....\nbproject\build-impl.xml:1036: Deployment error: GlassFish Server 3+ Server start failed. Cant create start proccess.
See the server log for details."
Unfortunately nothing in the server log.
I deleted domains folder and server then recreated. Nothing changed. :(
Is it a bug related to http://netbeans.org/bugzilla/show_bug.cgi?id=217228 ?
Any solution?
My system is 64 Bit Windows 7 with Turkish locale.
Web application is Primefaces based, JSF 2.1
I think this is about language settings.
You can change localization settings in the netBeans configuration file($NETBEANSHOME/etc/netbeans.conf).
Just add "--locale en" to end of the "netbeans_default_options" line.
Also you can start glassfish with asaadmin tool with following these steps.
1- execute C:\Program Files\glassfish-3.1.2.2\bin\asaadmin.bat
2- start-domain

Tomcat port in use in NetBeans

I tried searching for this problem here and in other forums but could not resolve this issue.
I have downloaded NetBeansBeans 7.0 Java EE pack which also installs Tomcat 7 which it did.
I created sample web application and when trying to deploy I get an error:
Starting of Tomcat failed, the server port 8080 is already in use.
I tried changing the ports but no success. However, when i try to run same Tomcat from Command prompt using "startup.bat" command, it runs successfully.
Operating system is Vista. I tried checking for open ports using "netstat -a" but no open port for 8080. also tried to see if any "java.exe" process is running but it was not.
Thanks in advance for the help.
Sometimes Vista, especially after hibernation, doesn't free a previously used port. Have you tried restarting the pc?