On Amazon Linux 2 AMI:
$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.7.10-4.amzn2.0.1.x86_64/
$ export PATH=$PATH:$JAVA_HOME/bin
$ cd /opt/wildfly/bin
$ ./jboss-cli.sh -c
Authenticating against security realm: ManagementRealm
Username: wildflyadmin
Password:
[standalone@localhost:9990 /] /subsystem=undertow/configuration=handler/file=PhotosDirHandler/:add(cache-buffer-size=1024,cache-buffers=1024,directory-listing=true,follow-symlink=true,path=/home/ec2-user/DocRoot/CloudStorage/PhotoStorage/)
{
"outcome" => "failed",
"failure-description" => "WFLYUT0095: the path ['/home/ec2-user/DocRoot/CloudStorage/PhotoStorage/'] doesn't exist on file system"
,
"rolled-back" => true
}
[standalone@localhost:9990 /]
The path exists on Linux 2 file system:
$ ls /home/ec2-user/DocRoot/CloudStorage/PhotoStorage/
defaultUserPhoto.png
DocRoot is owned by ec2-user with read/write/delete permissions recursively so that WildFly can write into the directories.
$ ls -l
drwxrwxrwx 3 ec2-user ec2-user 26 Feb 12 19:51 DocRoot
Why does WildFly think that the path does not exist?
--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/5c03ec4c-109c-48a1-bbef-83a0b4d2186dn%40googlegroups.com.
Balci@dolphin ~ % ssh -i Documents/AWS/EC2ServerAccessKeyPair.pem ec2-...@54.92.194.218
ec2-...@54.92.194.218's password:
Last login: Fri Feb 19 10:00:23 2021 from dolphin.cs.vt.edu
__| __|_ )
_| ( / Amazon Linux 2 AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-2/
[ec2-user@ip-172-31-18-211 ~]$ ls /home/ec2-user/docroot/cloudstorage/photostorage/
defaultUserPhoto.png
[ec2-user@ip-172-31-18-211 ~]$ sudo chmod -R a+rw /home/ec2-user/docroot
[ec2-user@ip-172-31-18-211 ~]$ ls -l /home/ec2-user
total 3880
-rw-rw-rw- 1 ec2-user ec2-user 1821 Feb 12 12:57 CloudDriveDB.sql
-rw-rw-rw- 1 ec2-user ec2-user 7142 Feb 3 14:22 CountriesDB.sql
drwxrwxrwx 3 ec2-user ec2-user 26 Feb 19 10:08 docroot
drwxrwxrwx 3 root root 149 Jun 16 2020 mysql-connector-java-8.0.21
-rw-rw-rw- 1 root root 3956740 Jun 16 2020 mysql-connector-java-8.0.21.tar.gz
[ec2-user@ip-172-31-18-211 ~]$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.7.10-4.amzn2.0.1.x86_64/
[ec2-user@ip-172-31-18-211 ~]$ export PATH=$PATH:$JAVA_HOME/bin
[ec2-user@ip-172-31-18-211 ~]$ cd /opt/wildfly/bin
[ec2-user@ip-172-31-18-211 bin]$ ./jboss-cli.sh -c
Authenticating against security realm: ManagementRealm
Username: wildflyadmin
Password:
[standalone@localhost:9990 /] /subsystem=undertow/configuration=handler/file=PhotosDirHandler/:add(cache-buffer-size=1024,cache-buffers=1024,directory-listing=true,follow-symlink=true,path=/home/ec2-user/docroot/cloudstorage/photostorage/)
{
"outcome" => "failed",
"failure-description" => "WFLYUT0095: the path
['/home/ec2-user/docroot/cloudstorage/photostorage/'] doesn't exist on file system",
"rolled-back" => true
}
[standalone@localhost:9990 /]
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/f397c38a-2882-420b-baef-bcb46bb59560n%40googlegroups.com.
I am trying to use lettuce on wildfly 10 but then wildfly gives me following error.
How do I let wildfly know about using SSLParameters. I am using Corretto JDK.
22:09:46,623 ERROR [com.icare.elasticacheclient] (Thread-104) [MSC service thread 1-1] Invocation of 'init' failed.: org.apache.felix.log.LogException: java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: javax/net/ssl/SSLParameters
at io.lettuce.core.SslOptions$Builder.<init>(SslOptions.java:170)
at io.lettuce.core.SslOptions$Builder.<init>(SslOptions.java:148)
at io.lettuce.core.SslOptions.builder(SslOptions.java:133)
at io.lettuce.core.SslOptions.create(SslOptions.java:142)
at io.lettuce.core.ClientOptions.<clinit>(ClientOptions.java:57)
at io.lettuce.core.AbstractRedisClient.<init>(AbstractRedisClient.java:88)
at io.lettuce.core.cluster.RedisClusterClient.<init>(RedisClusterClient.java:175)
at io.lettuce.core.cluster.RedisClusterClient.create(RedisClusterClient.java:243)
at io.lettuce.core.cluster.RedisClusterClient.create(RedisClusterClient.java:230)
at com.icare.elasticacheclnt.util.ConnectToRedisCluster.establishConnection(ConnectToRedisCluster.java:92)
at com.icare.elasticacheclnt.util.ConnectToRedisCluster.createWrappedConnectionPool(ConnectToRedisCluster.java:104)
at com.icare.elasticacheclnt.util.ConnectToRedisCluster.<init>(ConnectToRedisCluster.java:45)
at com.icare.elasticacheclnt.service.impl.ElastiCacheClientImpl.init(ElastiCacheClientImpl.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_275]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_275]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_275]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_275]
at org.apache.felix.dm.impl.InvocationUtil.invokeMethod(InvocationUtil.java:131)
at org.apache.felix.dm.impl.InvocationUtil.invokeCallbackMethod(InvocationUtil.java:86)
at org.apache.felix.dm.impl.ComponentImpl.invokeCallbackMethod(ComponentImpl.java:540)
at org.apache.felix.dm.impl.ComponentImpl.invoke(ComponentImpl.java:1493)
at org.apache.felix.dm.impl.ComponentImpl.performTransition(ComponentImpl.java:984)
at org.apache.felix.dm.impl.ComponentImpl.handleChange(ComponentImpl.java:926)
at org.apache.felix.dm.impl.ComponentImpl.lambda$2(ComponentImpl.java:408)
at org.apache.felix.dm.impl.SerialExecutor.runTask(SerialExecutor.java:138)
at org.apache.felix.dm.impl.SerialExecutor.runTasks(SerialExecutor.java:120)
at org.apache.felix.dm.impl.SerialExecutor.execute(SerialExecutor.java:86)
at org.apache.felix.dm.impl.SerialExecutor.execute(SerialExecutor.java:105)
at org.apache.felix.dm.impl.ComponentImpl.start(ComponentImpl.java:406)
at org.apache.felix.dm.impl.ComponentScheduler.add(ComponentScheduler.java:69)
at org.apache.felix.dm.DependencyManager.add(DependencyManager.java:175)
at com.icare.common.service.BaseDependencyResolver.init(BaseDependencyResolver.java:52)
at org.apache.felix.dm.DependencyActivatorBase.start(DependencyActivatorBase.java:75)
at org.jboss.osgi.framework.internal.UserBundleState.startInternalNow(UserBundleState.java:598) [jbosgi-framework-core-5.0.1.Final.jar:5.0.1.Final]
at org.jboss.osgi.framework.internal.UserBundleState.startInternal(UserBundleState.java:524) [jbosgi-framework-core-5.0.1.Final.jar:5.0.1.Final]
at org.jboss.osgi.framework.internal.BundleManagerPlugin.startBundle(BundleManagerPlugin.java:576) [jbosgi-framework-core-5.0.1.Final.jar:5.0.1.Final]
at org.jboss.as.osgi.deployment.BundleActivateProcessor$BundleActivateService.start(BundleActivateProcessor.java:129)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_275]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_275]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_275]
Caused by: org.apache.felix.log.LogException: java.lang.NoClassDefFoundError: javax/net/ssl/SSLParameters
... 42 more
Caused by: java.lang.ClassNotFoundException: javax.net.ssl.SSLParameters from [Module "deployment.elasticacheclient-1.0.0.jar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198) [jboss-modules.jar:1.5.2.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363) [jboss-modules.jar:1.5.2.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351) [jboss-modules.jar:1.5.2.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93) [jboss-modules.jar:1.5.2.Final]
... 42 mor
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/CAMquZP5whCWK-rYJBFJerkrNHh7v5_vxuLo8zKhLiXU%2BqtwAPw%40mail.gmail.com.
https://aws.amazon.com/amazon-linux-2/
ec2-user@ip-172-31-18-211 ~]$ lsattr /home
---------------- /home/ec2-user
Interesting! What does this imply? How should I specify the path? Thanks!
https://aws.amazon.com/amazon-linux-2/
[ec2-user@ip-172-31-18-211 ~]$ lsattr /opt/wildfly/DocRoot/CloudStorage/PhotoStorage/
---------------- /opt/wildfly/DocRoot/CloudStorage/PhotoStorage/defaultUserPhoto.png
---------------- /opt/wildfly/DocRoot/CloudStorage/PhotoStorage/2.jpeg
---------------- /opt/wildfly/DocRoot/CloudStorage/PhotoStorage/2_thumbnail.jpeg
[ec2-user@ip-172-31-18-211 ~]$ lsattr /opt/wildfly/DocRoot/CloudStorage/FileStorage/
---------------- /opt/wildfly/DocRoot/CloudStorage/FileStorage/2_Notes.txt
---------------- /opt/wildfly/DocRoot/CloudStorage/FileStorage/2_Sample WebM File.webm
---------------- /opt/wildfly/DocRoot/CloudStorage/FileStorage/2_Sample MP4 File.mp4
---------------- /opt/wildfly/DocRoot/CloudStorage/FileStorage/2_Catching Fire.png
---------------- /opt/wildfly/DocRoot/CloudStorage/FileStorage/2_CSD Platforms.pdf
---------------- /opt/wildfly/DocRoot/CloudStorage/FileStorage/2_Sample OGG File.ogg
[ec2-user@ip-172-31-18-211 ~]$
[ec2-user@ip-172-31-18-211 ~]$ java -version
openjdk version "11.0.7" 2020-04-14 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.7+10-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.7+10-LTS, mixed mode, sharing)
[ec2-user@ip-172-31-18-211 ~]$
-------------
I agree with you about the a+rw security issues and I will correct it in my tutorials later. I have been very busy trying to convert all my tutorial apps from NetBeans / GlassFish to IntelliJ IDEA Ultimate / WildFly.
I can testify that WildFly is at least ten times better than GlassFish!