I am currently using Eclipse to develop a fairly straight-forward Java EE dynamic web application. I have just been using Eclipse to deploy the web app to a GlassFish 3.1 server locally running on my dev machine for development and debugging purposes.
So far, so good. But now, I am looking into deploying the app to a remote GF server for further testing.
In Eclipse, I open the "Servers" tab and select the "New->Server" context menu. I enter the IP address of the remote server running GlassFish, but the "New Server" dialog won't let me proceed. Instead, it gives me the error message:
Remote Server is not secured: It
cannot be used remotely...
Some initial research suggests that remote deployment/debugging is currently not supported by Eclipse. Is that what Eclipse is trying to tell me with this weird error message? Surely "Remote deployment/debugging not supported" would be more apt. Am I overlooking something fundamental here?
Read http://blogs.oracle.com/quinn/entry/securing_adminstration_in_glassfish_server1
Access to remote servers can only be done if the server has been secured...
You want to make sure you have enabled secure administration. Generally you should do the following:
using ./asadmin change-admin-password command to set a password on the 'admin' user. By default there is none (so when it asks for your current admin password just hit Enter assuming you've never set one)
using ./asadmin start-domain to startup the default 'domain1'
using ./asadmin --host localhost --port 4848 enable-secure-admin will enable remote administration access (which you want) and tell Glassfish to start on the localhost at the default admin port 4848
finally use ./asadmin restart-domain to restart and apply those changes.
You should be able to now access the remote server and manage it via your Eclipse install. This works for Eclipse Luna and Glassfish4 open-source edition. Also note that you need to have a glassfish install on your Local development machine and point to that when it asks for the path to the Glassfish installation when setting up the server in Eclipse Wizard...despite the fact that you are connecting to a remote Glassfish instance. (See my SO post for more details/screenshots).
I am adding this because the current accepted answer only points to a link which is typically frowned upon here on SO since links have a tendency to go dead unexpectedly.
Related
Where can I find current instructions for how to set up Remote Debugging of Wildfly 20 from Eclipse 2020-06? My searches have found posts going back to 2014 they don't work. My most recent attempt is to follow https://tools.jboss.org/documentation/howto/configure_remote_server.html. This has no date on it and it is for connection to EAP 6.1 instead of Wildfly 20 but at least it is from tools.jboss.org and the instructions matched Eclipse 2020-06.
The problem is that when I right click on on the new Server just created with these instructions and select Debug I get the following error:
failed to copy to /opt/wildfly-20.0.1.Final/standalone/deployments/MyApp.war/META-INF/MANIFEST.MF on host 192.168.1.19
The requested path is not found on the remote system.
Here are what I think are important facts:
The path /opt/wildfly-20.0.1.Final/standalone/deployments DOES exist on the Wildfly 20 server # 192.168.1.19.
The Wildfly 20 server is started with /opt/wildfly-20.0.1.Final/standalone/deployments/MyApp.war in place. The Management console shows that MyApp is Deployed and I can access the app from a remote machine so Wildfly and the server are running.
I can connect from Eclipse to the Wildfly server using the Remote Systems item that creating the new Server created. In particular, I can use the root item to "roam around" the file system on the Wildfly server so that suggest to me that Eclipse can establish a connection to the Wildfly server.
The instructions in the URL above did not include this but in the Server's Properties the Web and Management ports were both 0. I manually set them to 8080 and 9990 respectively.
Thank you in advance.
Since your installation is on /opt I guess it was done with root privileges. I'm not sure your user has sufficient rights to be able to access those paths.
As far as I can tell /opt is the recommended installation location but I finally got the server to at least deploy so that problem is solved. See updated question at Attempt to debug a remote Wildfly 20 server failing.
I deployed my backend code(used framework is drop-wizard) in the form of jar file on AWS(Amazon Web service) server. I want to know is it possible to debug that jar file(jar file deployed on the AWS server) using eclipse on my local pc?? If yes than please display the way of how to do it??
Looking for a good response
Thanks
First, you need to start your application with remote debugging
enabled. With dropwizard, you are typically starting the application
on a server with:
java -jar myapp-0.0.1-SNAPSHOT.jar
Change this to:
java -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n -jar myapp-0.0.1-SNAPSHOT.jar
This sets up Java to listen for remote debugging sessions on port
9999. Make sure you choose a port that's not blocked by firewalls or
your AWS security configuration.
Next, you have to configure Eclipse to connect to the remote
application for debugging. In Eclipse, right click on the project and
select Debug, Debug Configuration. Create a new configuration of
Remote Java Application. Set the host to your AWS server and the port
to 9999, as above.
Now you should be able to set a breakpoint in your code and start a
debug session on the remote server.
I am searching for a way to start the Websphere Liberty profile in debug mode from the command line? I want to be able to start Liberty, so that it is listening for debug connections on a specific port. Then I would like to connect to Liberty from Eclipse, so that I can step through and debug the server code running in Liberty.
I've tried integrating Liberty into Eclipse and using the Eclipse 'Servers' view. This works great and I can start and stop Liberty using debug mode. Unfortunately, this method does not satisfy my use case because the build process uses tools external to Eclipse.
Essentially, I need a way to do this via the command line.
I tried creating a jvm.options file for Liberty and starting it, but I still can't connect to the port I specified. I'm sure I'm doing something wrong, but thus far I haven't figured it out.
This page has some info on jvm.options
The Administering the Liberty profile from the command prompt page describes how to do this:
[bin]$ export WLP_DEBUG_ADDRESS=7778
[bin]$ ./server debug
Listening for transport dt_socket at address: 7778
You can then connect from Eclipse using Remote Debugging.
I'm trying to reach my GlassFish 4.0 console, which is at localhost 4848. I start my GlassFish server from my NetBeans, then I go my port. It starts itself and then it asks me for a password and username. But the problem is that I have just downloaded and run that and I haven't authenticated any password and user and I can't open my GlassFish server admin panel.
if you downloaded your AS instance from Oracle web site(separately from NetBeans)
https://glassfish.java.net/download.html
and start domain from console with
asadmin start-domain domain1
you would not have any troubles with authentication. However it looks like NetBeans puzzles you. You may find a solution here. See Quaternion's answer.
This is Netbeans 6.9.1 and a Glassfish 3.0.1 server registered as a remote domain. Somewhere along the line Netbeans stopped storing the Glassfish admin password, and it prompts me on startup. I actually have quite a few remote domains registered for different test and dev levels so this is very annoying.
How do I change configuration to start storing these passwords again? I really don't care if they're secured as these are development servers on an isolated network.
After some fiddling I found it's actually not the Netbeans version but the glassfish 3 support. If I register a glassfish 2.x server then the password setting is available.
Go to the services tab, expand Servers. Right click on the instance in question and view the properties. The password is right there.