1
t133 2023-05-08 20:24:34 +08:00 via iPhone
你把错误那个语句的输出全部重定向了 盲猜一个环境变量
|
2
defunct9 2023-05-08 20:40:01 +08:00
开 ssh ,让我上去看看
|
3
Sharuru 2023-05-08 20:50:22 +08:00 via iPhone
137 没毛病,因为你是用 SIGKILL 把服务停的。
直接或一下 exit 0 让 action 不检测到错误就行。 比较好的方法是直接把 jar 写成服务,用 systemctl start ,stop 也比较好管理。 |
4
tudoutiaoya OP 我的想法是把 jar 包部署到服务器,先停掉原先的 java 进程,之后重新-jar 运行一下
|
5
tudoutiaoya OP 这样吗
pgrep -f dousheng-0.0.1-SNAPSHOT.jar | xargs -r kill -9 | exit 0 |
6
tudoutiaoya OP 总是在这里出现问题:137 信号是进程被强制终止是由于什么原因
Run appleboy/ssh-action@master /usr/bin/docker run --name ed866e57e73017a1ca41e08688d89a3502c97e_3817af --label ed866e --workdir /github/workspace --rm -e "JAVA_HOME" -e "INPUT_HOST" -e "INPUT_USERNAME" -e "INPUT_KEY" -e "INPUT_SCRIPT" -e "INPUT_PORT" -e "INPUT_PASSPHRASE" -e "INPUT_PASSWORD" -e "INPUT_SYNC" -e "INPUT_USE_INSECURE_CIPHER" -e "INPUT_CIPHER" -e "INPUT_TIMEOUT" -e "INPUT_COMMAND_TIMEOUT" -e "INPUT_KEY_PATH" -e "INPUT_FINGERPRINT" -e "INPUT_PROXY_HOST" -e "INPUT_PROXY_PORT" -e "INPUT_PROXY_USERNAME" -e "INPUT_PROXY_PASSWORD" -e "INPUT_PROXY_PASSPHRASE" -e "INPUT_PROXY_TIMEOUT" -e "INPUT_PROXY_KEY" -e "INPUT_PROXY_KEY_PATH" -e "INPUT_PROXY_FINGERPRINT" -e "INPUT_PROXY_CIPHER" -e "INPUT_PROXY_USE_INSECURE_CIPHER" -e "INPUT_SCRIPT_STOP" -e "INPUT_ENVS" -e "INPUT_ENVS_FORMAT" -e "INPUT_DEBUG" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/dousheng/dousheng":"/github/workspace" ed866e:57e73017a1ca41e08688d89a3502c97e ======CMD====== cd /home/springboot/dousheng/test/target/ pgrep -f dousheng-0.0.1-SNAPSHOT.jar | xargs -r kill -9 || true nohup java -jar dousheng-0.0.1-SNAPSHOT.jar >/dev/null 2>&1 & ======END====== 2023/05/11 08:41:54 Process exited with status 137 from signal KILL |
7
tudoutiaoya OP 搞定了,想学习的可以看我的文章: https://juejin.cn/post/7231920813217316901
|