pegarm
11/15/2022, 7:24 PMservices:
intranet_cfml:
image: ortussolutions/commandbox:latest
container_name: intranet_cfml
hostname: intranet_cfml
environment:
- BOX_INSTALL=true
- BOX_SERVER_APP_CFENGINE=adobe@2021
- cfconfig_adminPassword=password
- TZ="US/Pacific"
ports:
- 80:8080
volumes:
- ./app:/app
networks:
- intranet_network
But the log in the Docker dashboard does nothing. Running on an Apple M2 MacBook Air.bdw429s
11/15/2022, 7:31 PMpegarm
11/15/2022, 7:33 PMbdw429s
11/15/2022, 7:34 PMpegarm
11/15/2022, 7:35 PMdocker compose up -d
in the same directory with the docker-compose.yml file. Would you like the entire .yml file contents?bdw429s
11/15/2022, 7:35 PM-d
and what do you see?bdw429s
11/15/2022, 7:35 PMintranet_cfml
servicepegarm
11/15/2022, 7:38 PMbdw429s
11/15/2022, 7:38 PMbdw429s
11/15/2022, 7:39 PMdocker run
by itself (to avoid attaching to the container). I assume there's some sort of low level error but I can't imagine whatpegarm
11/15/2022, 7:39 PMbdw429s
11/15/2022, 7:39 PMpegarm
11/15/2022, 7:40 PMpegarm
11/15/2022, 7:44 PMpegarm
11/15/2022, 7:45 PMpegarm
11/15/2022, 7:46 PMpegarm
11/15/2022, 7:47 PMPatrick
11/15/2022, 7:53 PMPatrick
11/15/2022, 7:53 PMPatrick
11/15/2022, 7:54 PMpegarm
11/15/2022, 7:57 PMpegarm
11/15/2022, 7:58 PMPatrick
11/15/2022, 7:58 PMpegarm
11/15/2022, 7:58 PMpegarm
11/15/2022, 7:59 PMPatrick
11/15/2022, 7:59 PMPatrick
11/15/2022, 7:59 PMpegarm
11/15/2022, 7:59 PMPatrick
11/15/2022, 8:01 PMpegarm
11/15/2022, 8:03 PMpegarm
11/15/2022, 8:13 PMPatrick
11/15/2022, 8:14 PMPatrick
11/15/2022, 8:15 PMPatrick
11/15/2022, 8:16 PMpegarm
11/15/2022, 8:16 PMPatrick
11/15/2022, 8:17 PMpegarm
11/15/2022, 8:17 PMPatrick
11/15/2022, 8:17 PMPatrick
11/15/2022, 8:17 PMpegarm
11/15/2022, 8:18 PMpegarm
11/15/2022, 8:18 PMPatrick
11/15/2022, 8:19 PMpegarm
11/15/2022, 8:30 PMbdw429s
11/15/2022, 9:52 PMbdw429s
11/15/2022, 9:53 PMCMD
to be something like bash
and then poke around inside the container
• try running box
directly
• try running run.sh
directlybdw429s
11/15/2022, 9:53 PMbox
bdw429s
11/15/2022, 9:53 PMpegarm
11/15/2022, 9:54 PMjclausen
11/15/2022, 9:56 PMjclausen
11/15/2022, 9:56 PMpegarm
11/15/2022, 9:56 PMjclausen
11/15/2022, 9:57 PMpegarm
11/15/2022, 9:57 PMjclausen
11/15/2022, 9:58 PMdocker-compose up -d --build
after you changed the compose config? It won’t pick up changes to the compose file unless you rebuild.jclausen
11/15/2022, 9:58 PMdocker run ortussolutions/commandbox /bin/sh -c "box version"
jclausen
11/15/2022, 9:58 PMpegarm
11/15/2022, 9:59 PMdocker system prune -a
, docker volume prune
and docker network prune
in between?pegarm
11/15/2022, 9:59 PMjclausen
11/15/2022, 10:01 PMpegarm
11/15/2022, 10:02 PMjclausen
11/15/2022, 10:04 PMintranet_network
declared as a network on the definition. I would try the whole compose file without network declarations. You don’t need them in a single stack.pegarm
11/15/2022, 10:05 PM--build
in between.jclausen
11/15/2022, 10:05 PMpegarm
11/15/2022, 10:06 PMjclausen
11/15/2022, 10:06 PMBOX_SERVER_APP_CFENGINE=adobe@2021
You can just use the image ortussolutions/commandbox:adobe2021
instead.jclausen
11/15/2022, 10:06 PMjclausen
11/15/2022, 10:07 PMjclausen
11/15/2022, 10:07 PMpegarm
11/15/2022, 10:09 PMversion: "3.8"
services:
intranet_cfml:
image: ortussolutions/commandbox:adobe2021
container_name: intranet_cfml
hostname: intranet_cfml
environment:
- BOX_INSTALL=true
- cfconfig_adminPassword=redacted
- TZ="US/Pacific"
ports:
- 80:8080
- 8500:8500
volumes:
- ./app:/app
- ../common/app:/app/common
intranet_sql:
image: <http://mcr.microsoft.com/azure-sql-edge:latest|mcr.microsoft.com/azure-sql-edge:latest>
container_name: intranet_sql
hostname: intranet_sql
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=P@ssword
ports:
- 1433:1433
volumes:
- mssqldata:/var/opt/mssql
- ./data:/data
networks:
- intranet_network
volumes:
mssqldata:
jclausen
11/15/2022, 10:11 PMhostname
declared, as those will be the same names you already have present.pegarm
11/15/2022, 10:12 PMjclausen
11/15/2022, 10:13 PMjclausen
11/15/2022, 10:14 PMdocker run --rm -p 80:8080 ortussolutions/commandbox:adobe2021
jclausen
11/15/2022, 10:15 PMjclausen
11/15/2022, 10:15 PMpegarm
11/15/2022, 10:16 PMpegarm
11/15/2022, 10:19 PMjclausen
11/15/2022, 10:19 PMpegarm
11/15/2022, 10:19 PMjclausen
11/15/2022, 10:21 PMserver.json
file have any heap size settings? I would also suggest turning on the VirtioFS experimental feature. On the M1, it makes file operations on volume mounts about 20x or more faster.jclausen
11/15/2022, 10:22 PMjclausen
11/15/2022, 10:23 PMdocker-compose down
in the root directory of that compose file?jclausen
11/15/2022, 10:24 PMpegarm
11/15/2022, 10:25 PMpegarm
11/15/2022, 10:26 PMjclausen
11/15/2022, 10:28 PMjclausen
11/15/2022, 10:29 PMpegarm
11/15/2022, 10:30 PMpegarm
11/15/2022, 10:31 PMjclausen
11/15/2022, 10:31 PMpegarm
11/15/2022, 10:31 PMjclausen
11/15/2022, 10:32 PMdocker inspect relaxed_thompson
?pegarm
11/15/2022, 10:32 PMpegarm
11/15/2022, 10:33 PMjclausen
11/15/2022, 10:42 PMpegarm
11/15/2022, 10:42 PMjclausen
11/15/2022, 10:42 PMdocker exec -it relaxed_thompson bash
jclausen
11/15/2022, 10:43 PMbox server list
jclausen
11/15/2022, 10:43 PMjclausen
11/15/2022, 10:43 PMbox server log
and see if there’s any output there?pegarm
11/15/2022, 10:43 PMbox server list
gives the same result... it just hangs.pegarm
11/15/2022, 10:44 PMbox server log
jclausen
11/15/2022, 10:44 PMjclausen
11/15/2022, 10:44 PMjclausen
11/15/2022, 10:45 PMjclausen
11/15/2022, 10:45 PMpegarm
11/15/2022, 10:46 PMpegarm
11/15/2022, 10:47 PMpegarm
11/15/2022, 10:47 PMjclausen
11/15/2022, 10:48 PMdocker system prune
to remove any old images
3. Run export DOCKER_DEFAULT_PLATFORM=linux/arm64
4. Try to run the docker run
command above again.jclausen
11/15/2022, 10:48 PMpegarm
11/15/2022, 10:48 PMpegarm
11/15/2022, 10:50 PMpegarm
11/15/2022, 10:50 PMpegarm
11/15/2022, 10:51 PMjclausen
11/15/2022, 10:52 PMjclausen
11/15/2022, 10:54 PMdocker run --rm ortussolutions/commandbox:adobe2021 /bin/sh -c "java --version"
jclausen
11/15/2022, 10:55 PMpegarm
11/15/2022, 10:56 PMpegarm
11/15/2022, 10:56 PMjclausen
11/15/2022, 10:57 PMbox
just hangs inside the container.pegarm
11/15/2022, 10:57 PMjclausen
11/15/2022, 10:58 PMjclausen
11/15/2022, 10:58 PMpegarm
11/15/2022, 10:59 PMpegarm
11/15/2022, 11:00 PMjclausen
11/15/2022, 11:01 PMpegarm
11/15/2022, 11:02 PMjclausen
11/15/2022, 11:02 PMjclausen
11/15/2022, 11:03 PMarm64
architectures, but maybe there’s some differencepegarm
11/15/2022, 11:03 PMpegarm
11/15/2022, 11:03 PMjclausen
11/15/2022, 11:06 PMjclausen
11/15/2022, 11:08 PMpegarm
11/15/2022, 11:13 PMbdw429s
11/15/2022, 11:13 PMbox -clidebug
to get some more information about when it hangspegarm
11/15/2022, 11:15 PMbdw429s
11/15/2022, 11:22 PMbdw429s
11/15/2022, 11:22 PMbdw429s
11/15/2022, 11:22 PMjstack
to grab a stack trace of the JVM to see what it's doing!jclausen
11/15/2022, 11:27 PMdocker run --rm ortussolutions/commandbox:adobe2021 /bin/sh -c "box -clidebug version"
), I see this:
Nov 15, 2022 11:24:26 PM org.jline.utils.Log logr
FINE: Using terminal DumbTerminal
CommandBox 5.6.1+00618
I notice in the output above, it is using a different terminal after the error:
Nov 15, 2022 11:14:37 PM org.jline.utils.Log logr
FINE: Registering shutdown-hook: Thread[JLine Shutdown Hook,5,main]
Nov 15, 2022 11:14:37 PM org.jline.utils.Log logr
FINE: Adding shutdown-hook task: org.jline.terminal.impl.PosixSysTerminal$$Lambda$166/0x0000000840302c40@11bac6d7
Nov 15, 2022 11:14:37 PM org.jline.utils.Log logr
FINE: Using terminal PosixSysTerminal
Nov 15, 2022 11:14:37 PM org.jline.utils.Log logr
FINE: Using pty ExecPty
How is the terminal detected?bdw429s
11/16/2022, 12:47 AM-it
flag to make it interactive 🙂jclausen
11/16/2022, 1:07 AMbdw429s
11/16/2022, 3:01 PMbdw429s
11/16/2022, 3:01 PMbdw429s
11/16/2022, 3:02 PMjclausen
11/16/2022, 3:02 PMjclausen
11/16/2022, 3:02 PMbdw429s
11/16/2022, 3:03 PMbdw429s
11/16/2022, 3:03 PMbdw429s
11/16/2022, 3:03 PMjstack -l <pid>
bdw429s
11/16/2022, 3:03 PMjclausen
11/16/2022, 3:04 PMdocker exec
in to it and run the stack trace command above, that might help.pegarm
11/16/2022, 3:06 PMpegarm
11/16/2022, 8:06 PMjstack -l <pid>
, or does pid represent a value?bdw429s
11/16/2022, 8:07 PMjclausen
11/16/2022, 8:07 PMbdw429s
11/16/2022, 8:07 PMbdw429s
11/16/2022, 8:08 PMbdw429s
11/16/2022, 8:08 PMjclausen
11/16/2022, 8:08 PMbdw429s
11/16/2022, 8:08 PMbdw429s
11/16/2022, 8:08 PMbin
folder thenpegarm
11/16/2022, 8:10 PMbdw429s
11/16/2022, 8:12 PMbdw429s
11/16/2022, 8:13 PMbdw429s
11/16/2022, 8:13 PMjava.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(java.base@11.0.16.1/Native Method)
at java.net.SocketInputStream.socketRead(java.base@11.0.16.1/SocketInputStream.java:115)
at java.net.SocketInputStream.read(java.base@11.0.16.1/SocketInputStream.java:168)
at java.net.SocketInputStream.read(java.base@11.0.16.1/SocketInputStream.java:140)
at java.io.BufferedInputStream.fill(java.base@11.0.16.1/BufferedInputStream.java:252)
at java.io.BufferedInputStream.read1(java.base@11.0.16.1/BufferedInputStream.java:292)
at java.io.BufferedInputStream.read(java.base@11.0.16.1/BufferedInputStream.java:351)
- locked <0x000000008f55cdd0> (a java.io.BufferedInputStream)
at sun.net.www.http.HttpClient.parseHTTPHeader(java.base@11.0.16.1/HttpClient.java:788)
at sun.net.www.http.HttpClient.parseHTTP(java.base@11.0.16.1/HttpClient.java:723)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(java.base@11.0.16.1/HttpURLConnection.java:1615)
- locked <0x000000008f54b5d0> (a sun.net.www.protocol.http.HttpURLConnection)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(java.base@11.0.16.1/HttpURLConnection.java:1520)
- locked <0x000000008f54b5d0> (a sun.net.www.protocol.http.HttpURLConnection)
at java.net.HttpURLConnection.getResponseCode(java.base@11.0.16.1/HttpURLConnection.java:527)
at lucee.loader.engine.CFMLEngineFactory.downloadBundle(CFMLEngineFactory.java:709)
at lucee.runtime.osgi.OSGiUtil._loadBundle(OSGiUtil.java:566)
bdw429s
11/16/2022, 8:13 PMbdw429s
11/16/2022, 8:13 PMjclausen
11/16/2022, 8:13 PMpegarm
11/16/2022, 8:14 PMpegarm
11/16/2022, 8:14 PMjclausen
11/16/2022, 8:14 PMcurl <https://forgebox.io>
bdw429s
11/16/2022, 8:14 PMpegarm
11/16/2022, 8:14 PMbdw429s
11/16/2022, 8:14 PMbdw429s
11/16/2022, 8:14 PMpegarm
11/16/2022, 8:14 PMbdw429s
11/16/2022, 8:14 PMbdw429s
11/16/2022, 8:15 PMbdw429s
11/16/2022, 8:15 PMbdw429s
11/16/2022, 8:15 PMpegarm
11/16/2022, 8:16 PMbdw429s
11/16/2022, 8:16 PMbdw429s
11/16/2022, 8:16 PMpegarm
11/16/2022, 8:16 PMbdw429s
11/16/2022, 8:16 PMbox
LUCEE_ENABLE_BUNDLE_DOWNLOAD=false
bdw429s
11/16/2022, 8:16 PMbdw429s
11/16/2022, 8:18 PMpegarm
11/16/2022, 8:18 PMbdw429s
11/16/2022, 8:19 PMpegarm
11/16/2022, 8:20 PMversion: "3.8"
services:
intranet_cfml:
image: ortussolutions/commandbox:adobe2021
container_name: intranet_cfml
environment:
- BOX_INSTALL=true
- LUCEE_ENABLE_BUNDLE_DOWNLOAD=false
- cfconfig_adminPassword=redacted
- TZ="US/Pacific"
ports:
- 80:8080
- 8500:8500
volumes:
- ./app:/app
- ../common/app:/app/common
intranet_sql:
image: <http://mcr.microsoft.com/azure-sql-edge:latest|mcr.microsoft.com/azure-sql-edge:latest>
container_name: intranet_sql
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=P@ssword
ports:
- 1433:1433
volumes:
- mssqldata:/var/opt/mssql
- ./data:/data
volumes:
mssqldata:
pegarm
11/16/2022, 8:20 PMbdw429s
11/16/2022, 8:20 PMbdw429s
11/16/2022, 8:20 PMpegarm
11/16/2022, 8:22 PMpegarm
11/16/2022, 8:23 PMdocker run --rm -p 80:8080 ortussolutions/commandbox:adobe2021
pegarm
11/16/2022, 8:23 PMpegarm
11/16/2022, 8:23 PMpegarm
11/16/2022, 8:24 PMjclausen
11/16/2022, 8:25 PMjclausen
11/16/2022, 8:26 PMjar
files? )pegarm
11/16/2022, 8:26 PMbdw429s
11/16/2022, 8:30 PMbdw429s
11/16/2022, 8:30 PMbdw429s
11/16/2022, 8:30 PMcurl
pegarm
11/16/2022, 8:30 PMpegarm
11/16/2022, 8:38 PMalert http $HOME_NET any -> $EXTERNAL_NET any (msg:"ET POLICY Vulnerable Java Version 11.0.x Detected"; flow:established,to_server; flowbits:set,ET.http.javaclient.vulnerable; threshold: type limit, count 2, seconds 300, track by_src; http.user_agent; content:"Java/11.0."; content:!"13"; within:2; reference:url,<http://www.oracle.com/technetwork/java/javase/11u-relnotes-5093844.html;|www.oracle.com/technetwork/java/javase/11u-relnotes-5093844.html;> classtype:bad-unknown; sid:2028867; rev:8; metadata:affected_product Java, attack_target Client_Endpoint, created_at 2019_10_18, deployment Perimeter, signature_severity Informational, updated_at 2021_12_22;)
pegarm
11/16/2022, 8:38 PMpegarm
11/16/2022, 8:38 PMalert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET INFO JAVA - Java Archive Download By Vulnerable Client"; flow:from_server,established; flowbits:isset,ET.http.javaclient.vulnerable; file_data; content:"PK"; depth:2; classtype:trojan-activity; sid:2014473; rev:5; metadata:created_at 2012_04_04, updated_at 2022_05_03;)
pegarm
11/16/2022, 8:39 PMbdw429s
11/16/2022, 8:40 PMbdw429s
11/16/2022, 8:40 PMpegarm
11/16/2022, 8:40 PMbdw429s
11/16/2022, 8:41 PMbdw429s
11/16/2022, 8:42 PMpegarm
11/16/2022, 8:42 PMbdw429s
11/16/2022, 8:51 PMbdw429s
11/16/2022, 8:51 PMbdw429s
11/16/2022, 8:51 PMpegarm
11/16/2022, 8:52 PMpegarm
11/16/2022, 9:00 PMpegarm
11/16/2022, 9:12 PM- LUCEE_ENABLE_BUNDLE_DOWNLOAD=false
ENV variable, it works just fine.pegarm
11/16/2022, 9:12 PMbdw429s
11/16/2022, 9:13 PMbdw429s
11/16/2022, 9:13 PMpegarm
11/16/2022, 9:15 PMdocker system prune -a
4. Spun up the docker compose
...and observed it working. I then repeated the process, but removed the ENV variable, and observed it not working.pegarm
11/16/2022, 9:15 PMbdw429s
11/16/2022, 9:15 PMpegarm
11/16/2022, 9:16 PMbdw429s
11/16/2022, 9:16 PMbox
to fail, which would cause the container to errorbdw429s
11/16/2022, 9:18 PMbdw429s
11/16/2022, 9:20 PMbash
• edit path/to/.CommandBox/engine/cfml/cli/lucee-server/context/lucee-server.xml
and set level="trace"
for the deploy.log
logger (I usually install nano
at this point)
• Now run box something
and let it error (or perhaps just hang)
• Go open up path/to/.CommandBox/engine/cfml/cli/lucee-server/context/logs/deploy.log
and see what goodness was logged there.