fix(config,cli,tui): move the correx server off :8080 to :8090 (#695)
mavgpud.service, the Maven GPU supervisor, is an enabled systemd user unit that binds *:8080 and restarts on kill. The correx server wanted the same port, so qa-stack died with BindException and the QA stack never came up. Worse, qa-stack's --stop ran `fuser -k 8080/tcp`, which killed mavgpud rather than a correx server; systemd then restarted it straight into the port it had just freed, so it won the race every time. Moves the default to 8090 in the four places that have to agree: ServerConfig, ConfigLoader's fallback, the CLI's DEFAULT_PORT, and the TUI's -port flag. A mismatch between any two of them is a client that cannot find its own server. The machine-local halves are not in this diff and were applied on disk: `~/.config/correx/config.toml` pinned `port = 8080` explicitly, which overrides the code default, and `scripts/` is gitignored so qa-stack.sh's five references (including the --stop kill, now aimed at 8090) live only on this box. Verified live: the server binds 8090 and answers /health while mavgpud keeps 8080. Left open in #695: mavgpud also spawns a llama-server on :10000, which is qa-stack's router port, and qa-stack pkills that pattern. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
package com.correx.apps.cli
|
||||
|
||||
internal const val DEFAULT_PORT = 8080
|
||||
internal const val DEFAULT_PORT = 8090
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
func main() {
|
||||
host := flag.String("host", "localhost", "server host")
|
||||
port := flag.Int("port", 8080, "server port")
|
||||
port := flag.Int("port", 8090, "server port")
|
||||
flag.Parse()
|
||||
|
||||
if path := os.Getenv("CORREX_TUI_LOG"); path != "" {
|
||||
|
||||
@@ -184,7 +184,7 @@ object ProfileLoader {
|
||||
}
|
||||
|
||||
object ConfigLoader {
|
||||
private const val DEFAULT_SERVER_PORT = 8080
|
||||
private const val DEFAULT_SERVER_PORT = 8090
|
||||
private const val DEFAULT_SESSION_LIST_LIMIT = 5
|
||||
private const val DEFAULT_EMBEDDER_DIMENSION = 1536
|
||||
private const val DEFAULT_L3_DIM = 1536
|
||||
|
||||
@@ -184,7 +184,7 @@ data class ArtifactKindConfig(
|
||||
@Serializable
|
||||
data class ServerConfig(
|
||||
val host: String = "localhost",
|
||||
val port: Int = 8080,
|
||||
val port: Int = 8090,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
|
||||
@@ -9,7 +9,7 @@ class ConfigLoaderTest {
|
||||
fun `load returns defaults when config file missing`() {
|
||||
val config = CorrexConfig()
|
||||
assertEquals("localhost", config.server.host)
|
||||
assertEquals(8080, config.server.port)
|
||||
assertEquals(8090, config.server.port)
|
||||
assertEquals("dark", config.tui.theme)
|
||||
assertEquals(5, config.tui.sessionListLimit)
|
||||
assertEquals("human", config.cli.defaultOutput)
|
||||
|
||||
+2
-2
@@ -76,7 +76,7 @@ scripts/qa/searxng-down.sh
|
||||
## 4. Start the server
|
||||
|
||||
```bash
|
||||
./gradlew :apps:server:run # mainClass com.correx.apps.server.MainKt, listens on :8080
|
||||
./gradlew :apps:server:run # mainClass com.correx.apps.server.MainKt, listens on :8090
|
||||
# or build a runnable dist once and reuse it:
|
||||
./gradlew :apps:server:installDist
|
||||
apps/server/build/install/server/bin/server
|
||||
@@ -90,7 +90,7 @@ apps/server/build/install/server/bin/server
|
||||
```bash
|
||||
cd apps/tui-go
|
||||
GOTOOLCHAIN=auto go build -o correx-tui .
|
||||
./correx-tui -host localhost -port 8080 # flags default to localhost:8080
|
||||
./correx-tui -host localhost -port 8090 # flags default to localhost:8090
|
||||
```
|
||||
|
||||
## 6. Evidence tools (what the plans cite)
|
||||
|
||||
Reference in New Issue
Block a user