专业网站建设电话做网站找个人

张小明 2026/1/10 9:05:30
专业网站建设电话,做网站找个人,怎么加入平台卖货,做科技汽车的视频网站Ubuntu datasophon1.2.1 二开之二#xff1a;解决三大监控组件安装后#xff0c;启动失败#xff1a;报缺失common.sh背景问题解决最后背景 在上次安装集群成功后#xff0c;继续往下安装监控三大组件#xff1a;AlertManager,Prometheus,Grafana.已经做好安装失败准备 …Ubuntu datasophon1.2.1 二开之二解决三大监控组件安装后启动失败报缺失common.sh背景问题解决最后背景在上次安装集群成功后继续往下安装监控三大组件AlertManager,Prometheus,Grafana.已经做好安装失败准备问题结果安装后启动报common.sh找不到为何找不到呢我看压缩包也有啊tar命令没看出问题。后来问一下ai说缺少个参数–strip-components1后来详细了解一下这个参数作用 去掉第一层目录解决根据ai提示修改了InstallServiceHandler.java,主要是decompressTarGzdecompressWithStripComponents方法/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the License); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */packagecom.datasophon.worker.handler;importcn.hutool.core.io.FileUtil;importcn.hutool.core.io.StreamProgress;importcn.hutool.core.lang.Console;importcn.hutool.http.HttpUtil;importcom.datasophon.common.Constants;importcom.datasophon.common.cache.CacheUtils;importcom.datasophon.common.command.InstallServiceRoleCommand;importcom.datasophon.common.model.RunAs;importcom.datasophon.common.utils.ExecResult;importcom.datasophon.common.utils.FileUtils;importcom.datasophon.common.utils.PropertyUtils;importcom.datasophon.common.utils.ShellUtils;importcom.datasophon.worker.utils.TaskConstants;importlombok.Data;importorg.apache.commons.lang.StringUtils;importorg.slf4j.Logger;importorg.slf4j.LoggerFactory;importjava.io.File;importjava.util.ArrayList;importjava.util.Objects;DatapublicclassInstallServiceHandler{privatestaticfinalStringHADOOPhadoop;privateStringserviceName;privateStringserviceRoleName;privateLoggerlogger;publicInstallServiceHandler(StringserviceName,StringserviceRoleName){this.serviceNameserviceName;this.serviceRoleNameserviceRoleName;StringloggerNameString.format(%s-%s-%s,TaskConstants.TASK_LOG_LOGGER_NAME,serviceName,serviceRoleName);loggerLoggerFactory.getLogger(loggerName);}publicExecResultinstall(InstallServiceRoleCommandcommand){ExecResultexecResultnewExecResult();try{StringdestDirConstants.INSTALL_PATHConstants.SLASHDDP/packagesConstants.SLASH;StringpackageNamecommand.getPackageName();StringpackagePathdestDirpackageName;BooleanneedDownLoad!Objects.equals(PropertyUtils.getString(Constants.MASTER_HOST),CacheUtils.get(Constants.HOSTNAME))isNeedDownloadPkg(packagePath,command.getPackageMd5());if(Boolean.TRUE.equals(needDownLoad)){downloadPkg(packageName,packagePath);}booleanresultdecompressPkg(packageName,command.getDecompressPackageName(),command.getRunAs(),packagePath);execResult.setExecResult(result);}catch(Exceptione){execResult.setExecOut(e.getMessage());e.printStackTrace();}returnexecResult;}privateBooleanisNeedDownloadPkg(StringpackagePath,StringpackageMd5){BooleanneedDownLoadtrue;logger.info(Remote package md5 is {},packageMd5);if(FileUtil.exist(packagePath)){// check md5Stringmd5FileUtils.md5(newFile(packagePath));logger.info(Local md5 is {},md5);if(StringUtils.isNotBlank(md5)packageMd5.trim().equals(md5.trim())){needDownLoadfalse;}}returnneedDownLoad;}privatevoiddownloadPkg(StringpackageName,StringpackagePath){StringmasterHostPropertyUtils.getString(Constants.MASTER_HOST);StringmasterPortPropertyUtils.getString(Constants.MASTER_WEB_PORT);StringdownloadUrlhttp://masterHost:masterPort/ddh/service/install/downloadPackage?packageNamepackageName;logger.info(download url is {},downloadUrl);HttpUtil.downloadFile(downloadUrl,FileUtil.file(packagePath),newStreamProgress(){Overridepublicvoidstart(){Console.log(start to install。。。。);}Overridepublicvoidprogress(longprogressSize,longl1){Console.log(installed{},FileUtil.readableFileSize(progressSize));}Overridepublicvoidfinish(){Console.log(install success);}});logger.info(download package {} success,packageName);}privatebooleandecompressPkg(StringpackageName,StringdecompressPackageName,RunAsrunAs,StringpackagePath){StringinstallPathConstants.INSTALL_PATH;StringtargetDirinstallPathConstants.SLASHdecompressPackageName;logger.info(Target directory for decompression: {},targetDir);// 确保父目录存在FileparentDirnewFile(installPath);if(!parentDir.exists()){parentDir.mkdirs();}BooleandecompressResultdecompressTarGz(packagePath,targetDir);// 直接解压到目标目录if(Boolean.TRUE.equals(decompressResult)){// 验证解压结果if(FileUtil.exist(targetDir)){logger.info(Verifying installation in: {},targetDir);File[]filesnewFile(targetDir).listFiles();booleanhasControlShfalse;booleanhasBinaryfalse;if(files!null){for(Filefile:files){if(file.getName().equals(control.sh)){hasControlShtrue;}if(file.getName().equals(decompressPackageName.split(-)[0])){hasBinarytrue;}}}logger.info(control.sh exists: {}, binary exists: {},hasControlSh,hasBinary);if(Objects.nonNull(runAs)){ShellUtils.exceShell( chown -R runAs.getUser():runAs.getGroup() targetDir);}ShellUtils.exceShell( chmod -R 775 targetDir);returntrue;}}returnfalse;}publicBooleandecompressTarGz(StringsourceTarGzFile,StringtargetDir){logger.info(Start to use tar -zxvf to decompress {} to {},sourceTarGzFile,targetDir);// 新增创建目标目录如果不存在 - 增强版本FiletargetDirFilenewFile(targetDir);if(!targetDirFile.exists()){logger.info(Target directory does not exist, creating: {},targetDir);// 尝试创建目录booleancreatedtargetDirFile.mkdirs();if(!created){logger.error(Failed to create target directory: {},targetDir);// 添加更多诊断信息FileparentDirtargetDirFile.getParentFile();if(parentDir!null){logger.error(Parent directory exists: {}, writable: {},parentDir.exists(),parentDir.canWrite());}// 检查是否有权限问题logger.error(Current user: {},System.getProperty(user.name));returnfalse;}logger.info(Successfully created target directory: {},targetDir);}// 1. 首先列出tar包中的文件数量inttarFileCountgetTarFileCount(sourceTarGzFile);logger.info(Tar file contains {} files/directories,tarFileCount);// 2. 记录目标目录当前的文件数量intinitialFileCounttargetDirFile.exists()?(targetDirFile.listFiles()!null?targetDirFile.listFiles().length:0):0;// 3. 执行解压使用 --strip-components1ArrayListStringcommandnewArrayList();command.add(tar);command.add(-zxvf);command.add(sourceTarGzFile);command.add(-C);command.add(targetDir);command.add(--strip-components1);ExecResultexecResultShellUtils.execWithStatus(targetDir,command,120,logger);// 4. 验证解压结果if(execResult.getExecResult()){// 等待文件系统同步try{Thread.sleep(1000);}catch(InterruptedExceptione){// ignore}// 检查目标目录的文件数量intfinalFileCounttargetDirFile.exists()?(targetDirFile.listFiles()!null?targetDirFile.listFiles().length:0):0;intextractedFileCountfinalFileCount-initialFileCount;logger.info(Initial files: {}, Final files: {}, Extracted files: {},initialFileCount,finalFileCount,extractedFileCount);if(extractedFileCount0){logger.info(Decompression successful, extracted {} files to {},extractedFileCount,targetDir);// 列出前几个文件作为验证File[]filestargetDirFile.listFiles();if(files!null){intlimitMath.min(files.length,5);for(inti0;ilimit;i){logger.debug(Extracted file: {},files[i].getName());}}// 关键文件验证if(sourceTarGzFile.contains(alertmanager)){FilecontrolShnewFile(targetDirConstants.SLASHcontrol.sh);FilebinarynewFile(targetDirConstants.SLASHalertmanager);if(!controlSh.exists()||!binary.exists()){logger.error(Missing key files after decompression: control.sh{}, alertmanager{},controlSh.exists(),binary.exists());returnfalse;}}elseif(sourceTarGzFile.contains(prometheus)){FilecontrolShnewFile(targetDirConstants.SLASHcontrol.sh);FilebinarynewFile(targetDirConstants.SLASHprometheus);if(!controlSh.exists()||!binary.exists()){logger.error(Missing key files after decompression: control.sh{}, prometheus{},controlSh.exists(),binary.exists());returnfalse;}}returntrue;}else{logger.error(No files extracted! Something went wrong with decompression.);returnfalse;}}logger.error(Decompression command failed: {},execResult.getExecOut());returnfalse;}/** * 获取tar包中的文件数量 */privateintgetTarFileCount(StringtarFile){try{ArrayListStringcommandnewArrayList();command.add(tar);command.add(-tzf);command.add(tarFile);ExecResultexecResultShellUtils.execWithStatus(.,command,30,logger);if(execResult.getExecResult()execResult.getExecOut()!null){// 按行分割统计非空行String[]linesexecResult.getExecOut().split(\n);intcount0;for(Stringline:lines){if(line!null!line.trim().isEmpty()){count;}}returncount;}}catch(Exceptione){logger.warn(Failed to count tar files: {},e.getMessage());}return-1;// 未知}privateBooleandecompressWithStripComponents(StringsourceTarGzFile,StringtargetDir){logger.info(Retrying decompression with --strip-components1);ArrayListStringcommandnewArrayList();command.add(tar);command.add(-zxvf);command.add(sourceTarGzFile);command.add(-C);command.add(targetDir);command.add(--strip-components1);ExecResultexecResultShellUtils.execWithStatus(targetDir,command,120,logger);if(execResult.getExecResult()){// 验证解压的文件StringpackageNameextractPackageName(sourceTarGzFile);FiletargetDirFilenewFile(targetDir);File[]filestargetDirFile.listFiles((dir,name)-name.contains(packageName.split(-)[0]));if(files!nullfiles.length0){logger.info(Decompression with --strip-components1 successful);returntrue;}}returnfalse;}privateStringextractPackageName(StringtarFile){StringfileNamenewFile(tarFile).getName();// 移除 .tar.gz 或 .tgz 后缀if(fileName.endsWith(.tar.gz)){returnfileName.substring(0,fileName.length()-7);}elseif(fileName.endsWith(.tgz)){returnfileName.substring(0,fileName.length()-4);}returnfileName;}privatevoidchangeHadoopInstallPathPerm(StringdecompressPackageName){ShellUtils.exceShell( chown -R root:hadoop Constants.INSTALL_PATHConstants.SLASHdecompressPackageName);ShellUtils.exceShell( chmod 755 Constants.INSTALL_PATHConstants.SLASHdecompressPackageName);ShellUtils.exceShell( chmod -R 755 Constants.INSTALL_PATHConstants.SLASHdecompressPackageName/etc);ShellUtils.exceShell( chmod 6050 Constants.INSTALL_PATHConstants.SLASHdecompressPackageName/bin/container-executor);ShellUtils.exceShell( chmod 400 Constants.INSTALL_PATHConstants.SLASHdecompressPackageName/etc/hadoop/container-executor.cfg);ShellUtils.exceShell( chown -R yarn:hadoop Constants.INSTALL_PATHConstants.SLASHdecompressPackageName/logs/userlogs);ShellUtils.exceShell( chmod 775 Constants.INSTALL_PATHConstants.SLASHdecompressPackageName/logs/userlogs);}}最后安装成功后界面截图总览AlertManager:Prometheus:Grafana:界面还是挺酷的总览监控了集群所有节点但是后面三大组件好像只是localhost节点(ddp1),这是美中不足。如果有哪位高手知道如何修改可以沟通指点一下lita2lz
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

怎样给网站登录界面做后台为什么计算机鄙视软工

如何在 Miniconda 中切换 Python 版本以兼容 PyTorch 在深度学习项目开发中,一个看似简单却频繁困扰开发者的问题是:为什么我安装的 PyTorch 就是导入不了?明明 pip install 成功了,可一运行 import torch 就报错。这类问题背后&a…

张小明 2026/1/8 2:58:42 网站建设

连云港新站优化wordpress最新模板下载

在数字内容爆炸式增长的时代,一款真正优秀的视频播放器应该能够无缝连接各种媒体来源,为用户提供统一的观影体验。Playback播放器正是基于这一理念打造的开源解决方案,它巧妙地将本地播放、在线流媒体和去中心化内容融合在一个简洁的界面中。…

张小明 2026/1/8 23:37:39 网站建设

有没有公司直招的网站WordPress星评插件

Linly-Talker能否输出IMF通用母版?电影发行标准兼容性 在流媒体平台对内容产能提出空前要求的今天,影视制作正面临一个矛盾:观众期待高质量、多语言、跨区域的内容交付,而传统母版制作流程却依然耗时耗力。与此同时,AI…

张小明 2026/1/8 23:37:38 网站建设

网站建设有哪些常用行为seo发展现状

想要快速上手SNKRX游戏开发吗?这是一款基于LVE2D引擎打造的像素风格动作游戏,让你轻松掌握游戏开发的核心技能。无论你是刚接触游戏开发的新手,还是想要了解独立游戏制作流程的开发者,本文都将为你提供实用的指导。 【免费下载链接…

张小明 2026/1/8 12:50:03 网站建设

站长工具精华为什么这么多人嫌弃top域名

Codex效率命令安全审查:防止Anything-LLM生成危险指令 在现代AI驱动的工作流中,开发者越来越依赖大语言模型(LLM)来自动生成代码或系统命令。像 Anything-LLM 这样的开源平台,集成了RAG引擎与多模型支持能力&#xff0…

张小明 2026/1/9 12:31:21 网站建设

站长统计幸福宝网站统计吉林省吉林市区号

XV3DGS-UEPlugin 实战指南:快速解决高斯泼溅模型渲染三大难题 【免费下载链接】XV3DGS-UEPlugin 项目地址: https://gitcode.com/gh_mirrors/xv/XV3DGS-UEPlugin XV3DGS-UEPlugin 作为基于 Unreal Engine 5 的高斯泼溅模型可视化插件,为三维重建…

张小明 2026/1/8 22:18:29 网站建设