{"record":{"id":"e5685d497845355f","repo":"elunez/eladmin","slug":"error-e5685d","errorCode":null,"errorMessage":"部署信息不存在","messagePattern":"部署信息不存在","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"eladmin-system/src/main/java/me/zhengjie/modules/maint/service/impl/DeployServiceImpl.java","lineNumber":125,"sourceCode":"\t\t\tdeployRepository.deleteById(id);\n\t\t}\n\t}\n\n\t@Override\n\tpublic void deploy(String fileSavePath, Long id) {\n\t\tdeployApp(fileSavePath, id);\n\t}\n\n\t/**\n\t * @param fileSavePath 本机路径\n\t * @param id ID\n\t */\n\tprivate void deployApp(String fileSavePath, Long id) {\n\n\t\tDeployDto deploy = findById(id);\n\t\tif (deploy == null) {\n\t\t\tsendMsg(\"部署信息不存在\", MsgType.ERROR);\n\t\t\tthrow new BadRequestException(\"部署信息不存在\");\n\t\t}\n\t\tAppDto app = deploy.getApp();\n\t\tif (app == null) {\n\t\t\tsendMsg(\"包对应应用信息不存在\", MsgType.ERROR);\n\t\t\tthrow new BadRequestException(\"包对应应用信息不存在\");\n\t\t}\n\t\tint port = app.getPort();\n\t\t//这个是服务器部署路径\n\t\tString uploadPath = app.getUploadPath();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString msg;\n\t\tSet<ServerDeployDto> deploys = deploy.getDeploys();\n\t\tfor (ServerDeployDto deployDTO : deploys) {\n\t\t\tString ip = deployDTO.getIp();\n\t\t\tExecuteShellUtil executeShellUtil = getExecuteShellUtil(ip);\n\t\t\t//判断是否第一次部署\n\t\t\tboolean flag = checkFile(executeShellUtil, app);\n\t\t\t//第一步要确认服务器上有这个目录","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/elunez/eladmin/blob/55fbf705956949697dbd68bf9003776609d3d029/eladmin-system/src/main/java/me/zhengjie/modules/maint/service/impl/DeployServiceImpl.java#L107-L143","documentation":"DeployServiceImpl.deployApp loads the Deploy record for the given id; if findById returns null it first pushes a WebSocket message '部署信息不存在' (MsgType.ERROR) and then throws BadRequestException with the same text. It aborts a deployment before any server contact when the deploy definition is missing.","triggerScenarios":"Uploading a deploy package (POST /api/deploy/upload/{id} or the deploy flow) with a deployId whose mnt_deploy row was deleted or never existed. The error also appears live in the deploy log panel via sendMsg.","commonSituations":"Stale deploy page after another admin removed the deploy entry; wrong id passed by scripts; environment data reset while the browser kept an old id.","solutions":["Refresh the deploy list, select an existing deploy record, and retry with its id.","If the record should exist, check the mnt_deploy table and re-create the Deploy definition (app + target servers).","Guard automated deploy scripts by GET-verifying the deploy id before upload."],"exampleFix":"// before\nPOST /api/deploy/upload/42  (mnt_deploy id 42 deleted) -> 部署信息不存在\n\n// after\nGET /api/deploy -> confirm id=7 exists\nPOST /api/deploy/upload/7","handlingStrategy":"validation","validationCode":"// Verify the deploy record exists before uploading a package\nDeployDto deploy = deployService.findById(id);\nif (deploy == null) {\n    throw new IllegalStateException(\"部署信息不存在 id=\" + id);\n}\npost(\"/api/deploy/upload/\" + id, file);","typeGuard":"boolean isExistingDeployId(Long id) {\n    return id != null && deployService.findById(id) != null;\n}","tryCatchPattern":"try {\n    deployService.deploy(fileSavePath, id);\n} catch (BadRequestException e) {\n    if (\"部署信息不存在\".equals(e.getMessage())) { refreshDeployList(); return; } // error already pushed via WebSocket\n    throw e;\n}","preventionTips":["Refresh the deploy list before starting a deploy; ids go stale after deletions.","Automation: GET-verify the deploy id right before upload, not long before.","Watch the deploy log WebSocket — sendMsg already reports the failure reason live."],"tags":["deployment","not-found","eladmin","websocket","maintenance"],"backgroundTag":null,"analyzedSha":"55fbf705956949697dbd68bf9003776609d3d029","analyzedAt":"2026-08-14T11:56:12.758Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}