Al Koch

Ranch Hand
+ Follow
since Aug 24, 2011
Al likes ...
Eclipse IDE Firefox Browser Tomcat Server
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
3
Received in last 30 days
0
Total given
17
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Al Koch

Hi Tim,

Thanks again for your feedback. Unfortunately, I am working with an Ubuntu server so your CentOS technique won;t work. Plus, I moved away from certbot because it requires that the server be restarted after a cert refresh. The Elytron subsystem to the Wildfly server eliminates that need to reboot. I think I am close to figuring out how to use Elytron to do this. I'll post the final results here.

Thanks again.
3 years ago
Hi Tim,

Thanks for the additional info. Any chance you would share your script that does the daily check (using cron I suppose)?

I've run several attempts to get these certs set up using the Wildfly Elytron facility and I just hit "Duplicate Certificate limit of 5 per week" (per https://letsencrypt.org/docs/rate-limits/) so now I can't move forward for a week!

Thanks!
3 years ago
Thanks Stephan and Tim for your feedback.

Here is a helpful post that answers a couple of the questions:  https://wildfly-security.github.io/wildfly-elytron/blog/obtaining-certificates-from-lets-encrypt-using-the-wildfly-cli/

Tim, can you elaborate on your suggestion about fronting the Wildfly server with Apache or Nginx? You said "auto-renew is a done deal for Apache and Nginx". Is this really fully automatic (for Let's Encrypt), plus Stephan expressed the opinion that " I also don't think it is a good idea to do this automatically".

Thanks!
3 years ago
Hello,

Its my understanding that Wildfly can perform some level of "management" of Lets Encrypt certs. Can someone point me to documentation and instructions for how to set that up?

In particular, can Wildfly be configured so that the process is fully automatic where it refreshes the certs before they expire?

Thank you in advance.
3 years ago
Hi Tim,

As with several other recent posts your responses contain helpful "background" info

Both Wildfly and our servlet use Log4j to log (by default) to system.out/console. (Our servlet also used log4j to log to a set of rotating files for a history.)

In the past, this has been very helpful for quick debug message monitoring of both a Wildfly startup failure or servlet bug. (This was for Wildfly as a dev server.) For local infrastructure reasons we've now upgraded both Wildfly and Eclipse to current versions and also installed them into different VMs. In the past when both Wildfly and Eclipse were running in the same VM the Eclipse console "automatically" showed the Wildfly console output in the Eclipse Console View. We never had to configure this and assumed that JBoss Tools set that up.

As I understand it, even when both systems were in the same VM Eclipse launched Wildfly in a JVM different from its own JVM so I don't understand why this is now failing; it would seem that since Eclipse and Wildfly have been set up to to support remote deployment and debugging that JBoss Tools would have also gotten the "console capture" working.

Any other ideas?

Thanks again.
3 years ago
Thanks to Tim and Dave but do you have any idea what I'm actually doing wrong/missing that is causing me to no longer see Wildfly output in the Eclipse console when both were previously running in the same VM? What exactly do I need to do to get this working again?
3 years ago
Hello,

Previously, I was running both Eclipse Oxygen and Wildfly 10 in the same Virtual Machine. When I debugged in Eclipse I would right click the Wildfly server in the Servers View and select "Debug". I could set breakpoints and the Wildfly log appeared in the Console View.

I have recently upgraded to Eclipse 2020-06 and Wildfly 20 but this time they are each running in a separate VM. I now start debugging by running the Remote Debug Configuration and then I start Remoter debugging with <Alt><Shft>d,r.

The breakpoints are triggered so that is working well but nothing is showing in the Console View.

How do I get the Wildfly log to appear in the Eclipse Console View as it did previously? Other than version upgrades the only significant difference is that Eclipse and Wildfly are no longer running in the same VM.

Thank you in advance.
3 years ago
Hello,

I have I have configured Eclipse 2020-06 to deploy changed code to a Wildfly 20 Service running on a remote Ubuntu 20 VM (on a LAN).

In the Remote Server configuration I have "Management Operations" selected and I am able to deploy changes to the remote Wildfly server. However I chose this through trial and error.

What is the meaning of "Management Operations" and "Filesystem and shell operations" and how do you decided which to use when?

Thank you in advance.
3 years ago
Hello,

I have I have configured Eclipse 2020-06 to deploy changed code to a Wildfly 20 Service running on a remote Ubuntu 20 VM (on a LAN). Doing this created a Remote Debug Configuration.

In the Remote Server configuration I have "Management Operations" selected and I am able to deploy changes to the remote Wildfly server. However I cannot get Remote Debug working.

With the server started in Debug mode (and being able to deploy to the remote server) I run the Remote Debug Configuration (that was created when I defined the server - it uses port 8787). I set a breakpoint and through the browser activate the app. The server app runs but I do not stop at my breakpoint.

If I change from "Management Operations" to "Filesystem and shell operations" and again run the Remote Debug Configuration I immediately see:
Failed to connect to remote VM. Connection refused.
Connection refused: connect

Yes, in standalone.conf I have uncommented the following (which uses 8787 also):
JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=*:8787,server=y,suspend=n"

Note that I stumbled across a post that said that the latest JVM locks address=8787 to localhost so I added the *: to allow the Eclipse system to access Wildfly.

I have struggled for a month trying to get this to work. Can anyone explain what's going wrong?

Also, where do I provide credentials for the Remote Debug Configuration? I would expect that that is needed to allow connection.

Thank you in advance.
3 years ago
Hi Tim,

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 https://coderanch.com/t/734334/application-servers/Attempt-debug-remote-Wildfly-server.
3 years ago
Hello,

I have I have configured Eclipse 2020-06 to deploy to a Wildfly 20 Service running on a remote Ubuntu 20 VM. Doing this created a Remote Debug Configuration.

When I Run that Remote Debug Configuration I instantly get the error:
Failed to connect to remote VM. Connection refused.
Connection refused: connect


Here are what I think are important facts:

1) Wildfly is running as a service @ 192.168.1.19.

2) I have uncommented the JAVA_OPTS line in standalone.conf so that the service starts up in Debug on port 8787. I confirm this with:
ps -aux | grep wildfly

wildfly    19124  0.0  0.0  18208  2816 ?        Ss   16:41   0:00 /bin/bash /opt/wildfly/bin/launch.sh standalone standalone.xml 0.0.0.0
wildfly    19134  0.0  0.0   2612  1560 ?        S    16:41   0:00 /bin/sh /opt/wildfly/bin/standalone.sh -c standalone.xml -b 0.0.0.0
wildfly    19238  8.3 23.3 1724264 936448 ?      Sl   16:41   3:52 java -D[Standalone] -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -agentlib:jdwp=transport=dt_socket,address=0.0.0.0:8787,server=y,suspend=n --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED -Dorg.jboss.boot.log.file=/opt/wildfly/standalone/log/server.log -Dlogging.configuration=file:/opt/wildfly/standalone/configuration/logging.properties -jar /opt/wildfly/jboss-modules.jar -mp /opt/wildfly/modules org.jboss.as.standalone -Djboss.home.dir=/opt/wildfly -Djboss.server.base.dir=/opt/wildfly/standalone -c standalone.xml -b 0.0.0.0
wizard     20383  0.0  0.0  17664   664 pts/3    S+   17:27   0:00 grep --color=auto wildfly

3) In Eclipse, the Remote Debug Configuration shows:
Host = 192.168.1.19
Port = 8787

4) In the Remote Systems View I can select 192.168.1.19 and sftp Files and I am able to roam the file system on the Wildfly server so I know there is connectivity between the two systems.

5) As soon as I run the Remote Debug Configuration I instantly get the error.

One question is where do I provide credentials for the Remote Debug Configuration? I would expect that that is needed to allow connection.

Wildfly is running in debug mode on 8787 and the Remote Debug Configuration uses 8787 so what is going wrong here?

Thank you in advance.
3 years ago
Hello,

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:

1) The path /opt/wildfly-20.0.1.Final/standalone/deployments DOES exist on the Wildfly 20 server @ 192.168.1.19.

2) 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.

3) 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.

4) 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.
3 years ago
Hi Tim,

Thanks for the background/context. You are right that trying to set LD_LIBRARY_PATH=/opt/wildfly-20.0.1.Final/modules/system/layers/base/com/sybase/main fails with a service. It turns out that there is a wildfly.conf file that Wildfly refers to to see such settings. By adding LD_LIBRARY_PATH=/opt/wildfly-20.0.1.Final/modules/system/layers/base/com/sybase/main to that file I am able to tell Wildfly where to look for the sajdbc4 support files.

The Type 4 (pure Java) driver for Sybase is jConnect. However, to access a High Availability SQL Anywhere "cluster" I have to us the Type 2 sajdbc4 driver. (In fact, Sybase recommends using that driver even when accessing a single instance of the SQL Anywhere server for better performance.) That's why I needed to get the driver support files path set up with Wildfly.

I finally have this thing running as a service with connectivity to the database server.  Thanks for taking the time to provide this background info that helped me better understand what's going on here.
3 years ago
Hello,

I have a problem setting up some critical paths when I run Wildfly 20 as a service.

When I install (in "VM1") Wildfly in /home/myuser/ instead of /opt and NOT as a service and run it with the following, I am able to use the Admin console's "Test Connection" to connect to a Sybase SQL Anywhere database using the sajdbc4 driver.
cd ~/wildfly-20.0.1.Final/bin
export LD_LIBRARY_PATH=/home/myuser/wildfly-20.0.1.Final/modules/system/layers/base/com/sybase/main
export CLASSPATH=.:/home/myuser/wildfly-20.0.1.Final/modules/system/layers/base/com/sybase/main/sajdbc4.jar
./standalone.sh

LD_LIBRARY_PATH sets the path to the driver support files.

On the other hand, when I install Wildfly (in "VM2") exactly the same way as before except for installing into /opt and the extra steps to run Wildfly as a service as below, the Admin console's "Test Connection" fails with:
cd ~/wildfly-20.0.1.Final/bin
export LD_LIBRARY_PATH=/opt/wildfly-20.0.1.Final/modules/system/layers/base/com/sybase/main
export CLASSPATH=.:/opt/wildfly-20.0.1.Final/modules/system/layers/base/com/sybase/main/sajdbc4.jar
sudo systemctl start wildfly


2020-08-28 13:13:41,341 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183:
Service status report WFLYCTL0184: New missing/unsatisfied dependencies: service jboss.jdbc-driver.sajdbc4_jar (missing) dependents: [service jboss.driver-demander.java:jboss/datasources/TestDB, service org.wildfly.data-source.TestDB]

I can run a simple Java test app on the "VM02" system that connects and dumps a database table with:
cd $HOME/Desktop
export LD_LIBRARY_PATH=/opt/wildfly-20.0.1.Final/modules/system/layers/base/com/sybase/main
export CLASSPATH=.:/opt/wildfly-20.0.1.Final/modules/system/layers/base/com/sybase/main/sajdbc4.jar
java sajdbc4DriverTest.java

This suggest to me that all of the driver files are present at and the LD_LIBRARY_PATH location. Note that the launch of Wildlfly as a service uses the same paths.

Can anyone explain why Wildfly is ignoring the two paths I set prior to starting the service?

Thank you in advance.
3 years ago
Hi Tim,

Thanks for all of the background on JVM debugging - it's always helpful to have a context to better understand what's going on.

The few docs/posts I have found on how to do this state that if the Wildfly server is started as ./standalone.sh --debug it turns on debugging using the default port of 8787. That port is also set as the (default) on the Eclipse side when I select a Wildfly type of server. When I try to launch remote debugging in Eclipse, Eclipse shows files from my Project being copied from the Eclipse machine to the Wildfly machine so I conclude that I do have a connection between the machines. The problem is that after the files have been deployed to the remote server, Eclipse just sits for about 5 minutes showing the remote server as "Starting, Synchronized" and then eventually shows "Stopped". Do you have any other ideas?

Thanks again for the help.
3 years ago