gbit
04/01/2022, 1:57 PMcreateObject("java", "java.net.InetAddress").getLocalHost().getHostName()
gbit
04/01/2022, 1:58 PMRUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
gbit
04/01/2022, 4:33 PMgbit
04/01/2022, 4:34 PMgbit
04/01/2022, 4:41 PMgbit
04/01/2022, 4:42 PM<cfset local.xmlVar = xmlformat(createObject("java", "java.net.InetAddress").getLocalHost().getHostName())>
<cfscript>
writedump(xmlVar);
private string function getMachineName() output=false {
try {
cfexecute( arguments="", variable="local.machineNameResult", name="hostname", timeout=10 );
return Trim(local.machineNameResult);
} catch (any cfcatch) {
writeDump( var=cfcatch );
abort;
}
}
writeOutput(getMachineName().toString());
</cfscript>
gbit
04/01/2022, 4:43 PMgbit
04/01/2022, 4:55 PMgbit
04/01/2022, 5:30 PMcfexecute( arguments="", variable="local.machineNameResult", name="hostname", timeout=10 );
dswitzer
04/01/2022, 6:26 PMjava -cp . JavaInetAddressGetHostNameExample1
dswitzer
04/01/2022, 6:28 PMjavac JavaInetAddressGetHostNameExample1.java
gbit
04/01/2022, 6:29 PMLucee 5.3.8.189 Error (java.lang.RuntimeException) Message lucee.commons.lang.ClassException: cannot load class through its string name, because no definition for the class with the specified name [com.microsoft.sqlserver.jdbc.SQLServerDriver] could be found caused by (java.lang.ClassNotFoundException:com.microsoft.sqlserver.jdbc.SQLServerDriver;java.lang.ClassNotFoundException:com.microsoft.sqlserver.jdbc.SQLServerDriver not found by lucee.core [48];) StacktraceThe Error Occurred in
/org/lucee/cfml/Query.cfc: line 227
called from /org/lucee/cfml/Query.cfc: line 37
called from /app/Application.cfc: line 525
523: SET NOCOUNT OFF;
524: ");
525: var res = qry.execute();
526: var saveLog = res.getResult();
527:
gbit
04/01/2022, 6:30 PMFROM ortussolutions/commandbox:lucee5-alpine
gbit
04/01/2022, 6:35 PMgbit
04/01/2022, 6:42 PMgbit
04/01/2022, 6:45 PM[0.508s][info][class,load] java.util.concurrent.atomic.Striped64$1 source: jrt:/java.base
[0.509s][info][class,load] java.lang.SecurityException source: jrt:/java.base
[0.509s][info][class,load] jdk.internal.misc.TerminatingThreadLocal$1 source: jrt:/java.base
[0.510s][info][class,load] java.lang.Shutdown source: jrt:/java.base
[0.510s][info][class,load] java.lang.Shutdown$Lock source: jrt:/java.base
gbit
04/01/2022, 6:46 PM[0.629s][info][class,load] java.util.concurrent.atomic.Striped64$1 source: jrt:/java.base
[0.632s][info][class,load] java.net.InetAddress$CachedLocalHost source: jrt:/java.base
[0.634s][info][class,load] java.lang.Readable source: jrt:/java.base
[0.635s][info][class,load] java.nio.CharBuffer source: jrt:/java.base
[0.636s][info][class,load] java.nio.HeapCharBuffer source: jrt:/java.base
[0.637s][info][class,load] java.nio.charset.CoderResult source: jrt:/java.base
rrvmus
[0.639s][info][class,load] jdk.internal.misc.TerminatingThreadLocal$1 source: jrt:/java.base
[0.640s][info][class,load] java.lang.Shutdown source: jrt:/java.base
[0.641s][info][class,load] java.lang.Shutdown$Lock source: jrt:/java.base
dswitzer
04/01/2022, 7:02 PMdswitzer
04/01/2022, 7:03 PMgbit
04/01/2022, 7:05 PMgbit
04/01/2022, 7:06 PMjava -version
openjdk version "11.0.14.1" 2022-02-08
OpenJDK Runtime Environment Temurin-11.0.14.1+1 (build 11.0.14.1+1)
OpenJDK 64-Bit Server VM Temurin-11.0.14.1+1 (build 11.0.14.1+1, mixed mode)
The version installed on the Ubuntu host
java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
dswitzer
04/01/2022, 7:07 PMgbit
04/01/2022, 7:12 PMgbit
04/01/2022, 7:18 PMgbit
04/01/2022, 7:41 PMgbit
04/01/2022, 7:42 PMsudo /etc/init.d/iptables save
sudo /etc/init.d/iptables start
dswitzer
04/04/2022, 12:11 PM