juewuy / ShellCrash

Run sing-box/mihomo as client in shell
8.48k stars 1.43k forks source link

[Bug] 1.9.1rc3中使用meta内核无法设置自启动 #772

Closed PickaxeHit closed 1 day ago

PickaxeHit commented 2 days ago

Verify steps

Description

脚本似乎将CrashCore解压到$TMPDIR(/tmp/ShellCrash/CrashCore)中,service无法启动,报错找不到CrashCore(/etc/ShellCrash/CrashCore)

× shellcrash.service - ShellCrash Core
     Loaded: loaded (/etc/systemd/system/shellcrash.service; disabled; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2024-09-17 11:13:34 CST; 6s ago
 Invocation: 6e713a19c15142e5afba1d331467d56e
    Process: 17531 ExecStartPre=/etc/ShellCrash/start.sh bfstart (code=exited, status=0/SUCCESS)
    Process: 17703 ExecStart=/etc/ShellCrash/CrashCore run -D /etc/ShellCrash -C /tmp/ShellCrash/jsons >/dev/null (code=exited, status=203/EXEC)
    Process: 17704 ExecStartPost=/etc/ShellCrash/start.sh afstart (code=exited, status=0/SUCCESS)
    Process: 17847 ExecStopPost=/etc/ShellCrash/start.sh stop_firewall (code=exited, status=0/SUCCESS)
    Process: 17991 ExecStopPost=/etc/ShellCrash/start.sh unset_proxy (code=exited, status=0/SUCCESS)
   Main PID: 17703 (code=exited, status=203/EXEC)
   Mem peak: 44.7M
        CPU: 594ms

9月 17 11:13:32 debian systemd[1]: Starting shellcrash.service - ShellCrash Core...
9月 17 11:13:33 debian (rashCore)[17703]: shellcrash.service: Unable to locate executable '/etc/ShellCrash/CrashCore': No such file or directory
9月 17 11:13:33 debian (rashCore)[17703]: shellcrash.service: Failed at step EXEC spawning /etc/ShellCrash/CrashCore: No such file or directory
9月 17 11:13:33 debian systemd[1]: shellcrash.service: Main process exited, code=exited, status=203/EXEC
9月 17 11:13:34 debian start.sh[17704]: /etc/ShellCrash/start.sh: line 1350: [: missing `]'
9月 17 11:13:34 debian crontab[17837]: (root) LIST (root)
9月 17 11:13:34 debian crontab[17843]: (root) REPLACE (root)
9月 17 11:13:34 debian systemd[1]: shellcrash.service: Failed with result 'exit-code'.
9月 17 11:13:34 debian systemd[1]: Failed to start shellcrash.service - ShellCrash Core.

将/stc/systemd/system/shellcrash.servie中CrashCore的路径修改成/tmp/ShellCrash/CrashCore后运行良好

● shellcrash.service - ShellCrash Core
     Loaded: loaded (/etc/systemd/system/shellcrash.service; disabled; preset: enabled)
     Active: active (running) since Tue 2024-09-17 11:36:18 CST; 1min 21s ago
 Invocation: 1696dcbea95746bea858403230441fef
    Process: 22200 ExecStartPre=/etc/ShellCrash/start.sh bfstart (code=exited, status=0/SUCCESS)
    Process: 22372 ExecStartPost=/etc/ShellCrash/start.sh afstart (code=exited, status=0/SUCCESS)
   Main PID: 22371 (CrashCore)
      Tasks: 14 (limit: 37162)
     Memory: 37.9M (peak: 48.7M)
        CPU: 660ms
     CGroup: /system.slice/shellcrash.service
             └─22371 /tmp/ShellCrash/CrashCore run -D /etc/ShellCrash -C /tmp/ShellCrash/jsons ">/dev/null"

9月 17 11:36:17 debian CrashCore[22371]: time="2024-09-17T11:36:17.12403366+08:00" level=info msg="Start initial configuration in progress"
9月 17 11:36:17 debian CrashCore[22371]: time="2024-09-17T11:36:17.12406041+08:00" level=info msg="Geodata Loader mode: memconservative"
9月 17 11:36:17 debian CrashCore[22371]: time="2024-09-17T11:36:17.124063035+08:00" level=info msg="Geosite Matcher implementation: succinct"
9月 17 11:36:17 debian CrashCore[22371]: time="2024-09-17T11:36:17.124212387+08:00" level=info msg="Initial configuration complete, total time: 0ms"
9月 17 11:36:17 debian CrashCore[22371]: time="2024-09-17T11:36:17.129306216+08:00" level=info msg="Sniffer is closed"
9月 17 11:36:17 debian CrashCore[22371]: time="2024-09-17T11:36:17.129357934+08:00" level=error msg="Start Mixed(http+socks) server error: listen tcp 127.0.0.1:7890: bind: address already in use"
9月 17 11:36:17 debian CrashCore[22371]: time="2024-09-17T11:36:17.139629269+08:00" level=info msg="Start initial Compatible provider default"
9月 17 11:36:18 debian start.sh[22372]: /etc/ShellCrash/start.sh: line 1350: [: missing `]'
9月 17 11:36:18 debian crontab[22517]: (root) LIST (root)
9月 17 11:36:18 debian systemd[1]: Started shellcrash.service - ShellCrash Core.

不过脚本似乎有问题,

/etc/ShellCrash/start.sh: line 1350: [: missing `]'

是怎么一回事

PickaxeHit commented 1 day ago

另:似乎用systemd没办法启动面板服务,只有用脚本开启才能正常启动?

juewuy commented 1 day ago

尝试使用保守模式

PickaxeHit commented 1 day ago

尝试使用保守模式

已启用保守模式,过了许久面板自启动了

PickaxeHit commented 1 day ago

重新安装后可以使用了,,我猜是1.9.1rc2->rc3环境不太对