Yicong-Huang opened a new issue, #7065:
URL: https://github.com/apache/texera/issues/7065

   ### What happened?
   
   `bin/local-dev.sh up` cannot bring the stack up on Linux. The script already
   carries Linux support in places (`_find_jdk17` globs `/usr/lib/jvm/*`, the
   docker install hint has a `Linux:` line), but three platform assumptions are
   macOS-only. The first is fatal, the other two degrade silently.
   
   | # | Where | Assumption | Effect on Linux |
   | --- | --- | --- | --- |
   | 1 | `_detect_host_lan_ip` (main.sh ~465) | `route get default`, `ipconfig 
getifaddr en0..en10` | Neither command exists (`route` is net-tools with 
different syntax; `ipconfig` is macOS/Windows; interfaces are `eth0`/`enp*`, 
not `en0`). `_require_host_lan_ip` aborts `up`/`auto`. **Hard blocker.** |
   | 2 | `svc_artifact_mtime` (main.sh 1674, 1680, 1681) | BSD `stat -f "%Sm" 
-t FMT` | GNU coreutils `stat` reads `-f` as "file system info" and treats the 
format strings as filenames: it writes an error to stderr, prints filesystem 
garbage on stdout, and exits 1. `watch`'s ARTIFACT MTIME column renders that 
garbage (the JVM call site at 1674 has no `2>/dev/null` guard at all, so the 
error also leaks into the table). |
   | 3 | `listen_pid_for_port` (main.sh ~1199) | `lsof` is installed | `lsof` 
is not a default package on Debian/Ubuntu/Fedora. Without it every service 
reads as `stopped`, so `up` re-launches services that are already running and 
`down` silently no-ops. |
   
   The in-file comment on the second LAN-IP loop even says it is the "linux
   `hostname -I`-equivalent walk", but the body still calls `ipconfig`.
   
   ```
   Before:  linux + up -> FATAL: could not detect a host LAN IP
   After:   linux + up -> LAN IP from `ip route` / `ip -4 addr`, stack comes up
   ```
   
   Detection has to keep excluding loopback **and** the docker bridge: on a
   typical box `hostname -I` prints `10.10.10.30 172.17.0.1`, and picking
   `172.17.0.1` (docker0) would defeat the purpose of the variable, which is to
   be one address reachable from both the host JVMs and the lakekeeper
   container.
   
   Also, the printed docker install hint names a package that does not exist on
   stock Ubuntu: `docker-compose-plugin` only ships in Docker's own apt repo; 
the
   distro package is `docker-compose-v2`. Most of the other hints
   (jdk/python/node/yarn/bun/sbt) have no `Linux:` line at all.
   
   ### How to reproduce?
   
   On any Linux host (reproduced on Ubuntu 24.04.4, x86_64) with JDK 17, sbt,
   node, yarn, bun and docker all installed:
   
   ```sh
   bin/local-dev.sh up
   # FATAL: could not detect a host LAN IP.
   
   HOST_LAN_IP=$(ip -4 route get 1.1.1.1 | awk '{print $7; exit}') 
bin/local-dev.sh up
   # now proceeds and the stack comes up
   ```
   
   For #2 and #3, with the stack up:
   
   ```sh
   stat -f "%Sm" -t "%Y-%m-%d %H:%M" build.sbt   # GNU stat: error + garbage, 
rc=1
   bin/local-dev.sh watch                        # ARTIFACT MTIME column is 
garbage
   
   # simulate a box without lsof
   d=$(mktemp -d); printf '#!/bin/sh\nexit 127\n' > "$d/lsof"; chmod +x 
"$d/lsof"
   PATH="$d:$PATH" bin/local-dev.sh status       # all 9 native services read 
"stopped"
   ```
   
   ### Version/Branch
   
   1.3.0-incubating-SNAPSHOT (main)
   
   ### Relevant log output
   
   ```shell
   FATAL: could not detect a host LAN IP.
          MinIO needs an address reachable from both docker (lakekeeper
          does S3 ops) and the host (JVMs read signed URLs back); none
          of `route get default` / en0-en10 had a non-loopback IPv4.
          Connect to a network or export HOST_LAN_IP=<your-IP> explicitly.
   
   $ stat -f "%Sm" -t "%Y-%m-%d %H:%M" some.jar
   stat: cannot read file system information for '%Sm': No such file or 
directory
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to