无法远程连接Linux服务器故障排查记录

服务器ssh服务 在服务器上查看ssh服务, 或直接用本账号直接登陆服务器. 查看服务器网络服务, 打印路由表 ifconfig 或 ip addr ip route show route ping 查看是否ping通或有没有被跳转到其他ip地址 其他设备 ping 服务器 服务器 ping 其他设备 其他设备 ping 网关 服务器 ping 网关 查看防火墙设置 iptables -L 查看系统日志 需要事先启动服务 Ubuntu系统配置日志/var/log/message ...

2022年2月14日 · 2 分钟 · sun510001

Linux下无root权限编译安装nccl2(30系列显卡)

遇到问题 使用PaddleOCR进行多卡训练的时候, 显示错误 server not ready, wait 3 sec to retry... not ready endpoints:['127.0.0.1:49741'] W0213 13:56:36.361328 41053 dynamic_loader.cc:258] You may need to install 'nccl2' from NVIDIA official website: https://developer.nvidia.com/nccl/nccl-downloadbefore install PaddlePaddle. Traceback (most recent call last): File "tools/train.py", line 145, in <module> main(config, device, logger, vdl_writer) File "tools/train.py", line 44, in main dist.init_parallel_env() File "/home/xxx/.conda/envs/paddle/lib/python3.8/site-packages/paddle/distributed/parallel.py", line 225, in init_parallel_env parallel_helper._init_parallel_ctx() File "/home/xxx/.conda/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/parallel_helper.py", line 42, in _init_parallel_ctx __parallel_ctx__clz__.init() RuntimeError: (PreconditionNotMet) The third-party dynamic library (libnccl.so) that Paddle depends on is not configured correctly. (error code is libnccl.so: cannot open shared object file: No such file or directory) Suggestions: 1. Check if the third-party dynamic library (e.g. CUDA, CUDNN) is installed correctly and its version is matched with paddlepaddle you installed. 2. Configure third-party dynamic library environment variables as follows: - Linux: set LD_LIBRARY_PATH by `export LD_LIBRARY_PATH=...` - Windows: set PATH by `set PATH=XXX; (at /paddle/paddle/fluid/platform/dynload/dynamic_loader.cc:285) INFO 2022-02-13 13:56:37,879 launch_utils.py:320] terminate process group gid:41058 INFO 2022-02-13 13:56:41,884 launch_utils.py:341] terminate all the procs ERROR 2022-02-13 13:56:41,884 launch_utils.py:602] ABORT!!! Out of all 2 trainers, the trainer process with rank=[0] was aborted. Please check its log. INFO 2022-02-13 13:56:45,888 launch_utils.py:341] terminate all the procs INFO 2022-02-13 13:56:45,888 launch.py:311] Local processes completed. 推测错误是系统缺少nccl2导致的. ...

2022年2月13日 · 2 分钟 · sun510001

Notion + Next.js 搭建个人博客

0. 背景 最近想整一个个人主页玩玩, 可是平时时间紧张, 所以需要一个建立之后, 可以快速编写博文或直接从我的笔记转换为博文, 并且需要能够快速简单的上传方式. ...

2021年12月26日 · 4 分钟 · sun510001

智能体育内容生产服务相关调研

1. 体育赛事相关服务内容目 目前找到的,与媒体或体育赛事播放相关的人工智能内容生产服务大致有以下三种: 比赛视频内容标记和自动剪辑 WSC Sports 阿里云 百度云 VidPress 赛事自动拍摄 AIGC Veo Sports Camera 思锐科技 赛事之窗 比赛语音智能转化及生成 百度 Amazon SageMaker 其他 2. 比赛视频内容标记和自动剪辑 自动对于比赛直播的内容进行多模态识别,切片和标记,并在赛后实现的人工或自动快速剪辑。 ...

2021年12月23日 · 8 分钟 · sun510001

人体姿态估计研究调研

可行性分析 根据需求和调研,目前最佳的的方案的研究方向为:使用多个单目相机拍摄的照片实时获取3D人体姿态估计结果(multi-view 3D HPE)。不过,多视角的3D HPE可能无法达到50fps的效果。 可使用的数据集 多人多视角 可使用的模型 模型论文和源码 模型精度和选用的数据集 其他可行的方案是单一单目相机拍摄的照片进行多人3D HPE(single-view 3D MHPE),并使用bottom-up方法(预测耗时更少)或top-down方法(精度更高),相对于前者,可能遇到人体遮挡问题,但是对于数据的要求更低、消耗的计算资源更低。 可使用的数据集,所有数据集整理在:https://github.com/zczcwh/DL-HPE 多人单一视角 可使用的模型 模型论文和源码 模型精度和选用的数据集 ...

2021年11月19日 · 5 分钟 · sun510001

逆向建模软件 Geomagic Design X 点云数据处理和导出面片模型的方法

1. 导入点云数据文件 文件-导入-仅导入 导入需要的点云模型, 可以全选. 2. 处理点云数据 点云的选择方式有多种, 处于模型正上方快捷栏. 可以使用套索模式对点云不需要的点, 使用del键进行删减. (右键按住可以转动模型; ctrl+右键可以移动模型) ...

2021年11月16日 · 4 分钟 · sun510001

人像重照明数据采集设备调研

1. 背景 将人物从一张照片或视频中扣出, 并放入其他光照环境下的照片或视频中时会产生违和感, 那是因为背景中的光和照在人物身上的光的方向和亮度等信息并不相同. 为了使照在人物身上的光与背景光源的信息保持一致, 需要使用人像重照明 (portrait relighting) 技术. 而进行人像重照明任务的深度学习模型需要在不同光照环境下的人像照片数据, 所以需要搭建数据采集设备. ...

2021年11月12日 · 9 分钟 · sun510001

谷歌上搜不到我的博客?!

1. 将自己的博客加入谷歌的search-console 打开 search-console Google Search Console 添加自己的网站域名, 自建博客的话可以选择网址前缀 确认后, 谷歌会生成一个googlexxxxxxxxxxxxx.html 文件, 将这个文件加入自己博客的public文件夹, 更新博客之后, 就可以完成认证. 进入自己网站的 search-console 之后, 在顶端的搜索栏搜索自己的网站域名, 会显示网址尚未被收录到 Google, 点击提交请求, 等待1-2分钟, 如果你的网站可以被爬取, 那么会显示网址已收录到 Google. 一般等待1天就可以在谷歌搜索中查到自己的网站内容. 可以谷歌搜索: site:[自己网站的域名] ...

2021年9月1日 · 2 分钟 · sun510001

Linux 问题整理

Linux Ubuntu 20.04 系统安装流程 NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. $ sudo add-apt-repository ppa:graphics-drivers/ppa $ ubuntu-drivers devices $ sudo apt install nvidia-driver-460 # edit GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub. 可以不用 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=realloc" or GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" $ sudo update-grub $ sudo reboot 移动文件夹下所有文件, 包括子文件夹下的内容 Open a terminal and execute this command: mv -v ~/Downloads/* ~/Videos/ It will move all the files and folders from Downloads folder to Videos folder. To move all files, but not folders: If you are interested in moving all files (but not folders) from Downloads folder to Videos folder, use this command find ~/Downloads/ -type f -print0 | xargs -0 mv -t ~/Videos To move only files from the Download folders, but not from sub-folders: If you want to move all files from the Downloads folder, but not any files within folders in the Download folder, use this command: find ~/Downloads/ -maxdepth 1 -type f -print0 | xargs -0 mv -t ~/Videos here, -maxdepth option specifies how deep find should try, 1 means, only the directory specified in the find command. You can try using 2, 3 also to test. 文件大小查看命令 查看某一个文件夹的大小 du -sh [文件夹] 查看当前文件夹下的文件大小总和 ls | wc -l 文件查找命令 查找遍历文件夹下所有文件后缀为jpg的文件并复制 find [查找文件夹] -name "*.jpg" | xargs -i cp {} [输出文件夹] 批量执行命令 awk 查找文件后批量处理 ls | grep zip | awk -F . '{system("echo " $1)}' "ffmpeg -i " $1 ".wav -ar 36000 ../Wave_2/" $1 ".wav" for %a in ("*.wav") do ffmpeg -i "%a" -ar 36000 "\%~na.wav" script 输入参数: 直接写 $1 就是第一个参数 获得当前文件夹名 echo $(basename $(pwd)) DNS服务器地址修改 找到/etc/resolv.conf nameserver 就是DNS服务器地址 图形界面添加自动启动项 gnome-session-properties 文本界面设置子启动服务 写服务文件,如nginx.service、redis.service、supervisord.service [Unit]:服务的说明 Description:描述服务 After:描述服务类别 [Service]服务运行参数的设置 Type=forking 是后台运行的形式 ExecStart 为服务的具体运行命令 ExecReload 为服务的重启命令 ExecStop 为服务的停止命令 PrivateTmp=True 表示给服务分配独立的临时空间 注意:启动、重启、停止命令全部要求使用绝对路径 [Install] 服务安装的相关设置,可设置为多用户 WantedBy=multi-user.target 文件保存在目录下:以754的权限。目录路径:/usr/lib/systemd/system/ 设置开机自启动 [root@localhost ~]# systemctl enable nginx.service [root@localhost ~]# systemctl enable supervisord 停止开机自启动 [root@localhost ~]# systemctl disable nginx.service [root@localhost ~]# systemctl disable supervisord 验证一下是否为开机启动 [root@localhost ~]# systemctl is-enabled nginx [root@localhost ~]# systemctl is-enabled supervisord 开机自动启动脚本 写脚本放入/etc/profile.d/ Ubuntu引导损坏 引导修复 双系统Ubuntu 引导修复(Boot Repair)_碧海凌云的博客-CSDN博客_ubuntu引导修复 linux 使用rar https://www.rarlab.com/download.htm找到对应linux的压缩包 wget https://www.rarlab.com/rar/rarlinux-x64-6.0.2.tar.gz tar -xvf rarlinux-x64-6.0.2.tar.gz cd rar sudo make # 解压 unrar x xxx.rar # 压缩 ubuntu tar 多线程压缩 安装pigz apt-get install -y pigz 压缩文件夹(默认占用所有cpu核心, 占用率50%-80%) tar --use-compress-program=pigz -h -cvpf [tar file name] [dir] 解压文件夹 tar --use-compress-program=pigz -xvpf [tar file name] -C [dir] 需要限制cpu占用的话 taskset -c [core number start]-[core number end] [command] 向压缩包里追加文件 tar -rvf [tar file name] [file you need to add] 格式化新的磁盘 Installing A New Hard Drive InstallingANewHardDrive Start parted as follows: sudo parted /dev/sdb Create a new GPT disklabel (aka partition table): (parted) mklabel gpt Set the default unit to TB: (parted) unit TB Create one partition occupying all the space on the drive. For a 4TB drive: (parted) mkpart Partition name? []? primary File system type? [ext2]? ext4 Start? 0 End? 4 Check that the results are correct: (parted) print There should be one partition occupying the entire drive. Save and quit “parted”: (parted) quit Command Line Formatting To format the new partition as ext4 file system (best for use under Ubuntu): sudo mkfs -t ext4 /dev/sdb1 To format the new partition as fat32 file system (best for use under Ubuntu & Windows): sudo mkfs -t fat32 /dev/sdb1 As always, substitute “/dev/sdb1” with your own partition’s path. 匹配k380键盘 可能成功 Pairing LOGITECH K380 in Ubuntu 20.04 Arch Linux 开发常用组件安装,遇到gcc之类的基础组件缺失时使用 apt-get install build-essential 向日葵 远程登录失败问题 需要轻量化桌面 sudo apt install lightdm 查看某个文件夹下文件或文件夹的数量(递归) # 查看文件数量 ls -lR | grep "^-" | wc -l # 查看文件夹数量 ls -lR | grep "^d" | wc -l 非root用户cuda安装 安装CUDA和cuDNN到指定目录_kxqt233的博客-CSDN博客_cudnn安装位置 磁盘空间清理 rm -rf ~/.cache/pip conda clean -a htop设置 使用htop命令查看进程的时候可以关闭重复线程方便查看 F2 (Setup) -Display options --Hide userland threads F10 (Done) Ubuntu 隐藏上方状态栏、左边任务栏及菜单按钮移到下方居中及隐藏(详细) Ubuntu 隐藏上方状态栏、左边任务栏及菜单按钮移到下方居中及隐藏(详细)_锵锵锵锵~蒋的博客-CSDN博客_ubuntu隐藏任务栏 ubuntu 20.04 vps 开机自启动 cd /etc/profile.d/ vim xxx.sh chmod a+x xxx.sh zip相关指令 1.1. 查看压缩包内容和统计 zip -sf images.zip | grep -v *.jpg | wc -l zip -sf: 查看zip压缩包内容 grep -v: 去除不需要的行, 筛选需要的文件名 wc -l: 按行统计 1.2. 解压压缩包内部分文件 zip -sf images.zip | head -n 10 # 查看压缩包前10行内容 unzip images.zip "images/00001/000003.jpg" -d . # 解压单个文件到当前文件夹 1.3. 批量压缩文件夹并删除原文件夹 find . -maxdepth 1 -type d ! -name "." -exec sh -c 'zip -r -6 "{}.zip" "{}" && rm -r "{}"' \; ...

2021年8月1日 · 8 分钟 · sun510001

Python 问题整理

PIP spacepy安装失败 pip install git+https://github.com/spacepy/spacepy.git pip换源 修改 ~/.pip/pip.conf (没有就创建一个) [global] timeout = 6000 index-url = https://pypi.tuna.tsinghua.edu.cn/simple trusted-host = pypi.tuna.tsinghua.edu.cn 使用默认源 pip install 模块名 -i https://pypi.org/simple 快速使用指定源 pip install 模块名 -i https://pypi.tuna.tsinghua.edu.cn/simple pip install 模块名 -i https://pypi.douban.com/simple/ 使用proxy下载, 开着vpn就无法使用第三方源, 这时需要使用—-proxy --proxy http://127.0.0.1:xxxx conda直接输入 windows terminal 调用虚拟环境 # 管理员打开powershell set-executionpolicy remotesigned ...

2021年8月1日 · 6 分钟 · sun510001

Windows 问题整理

Windows 10 win10下使用vim win10-PowerShell下使用vim_秋雨、、的博客-CSDN博客_powershell vim windows启动时隐藏cmd窗口 隐藏system窗口你也行(就是那个cmd窗口,好多方法)_冷月醉雪的博客-CSDN博客 删除Windows10侧边栏项目 如果您需要删除【资源管理器】左边面板的OneDrive图标,您可以尝试: 前往C:\Users<用户名>,看看有没有不需要的文件夹 如果有关OneDrive图标依然存在,您可以登陆管理者账号,然后参考下方方法: 注册表为系统的主要档案,任何修改可能会导致系统档案损毁。 请您在修改注册表前衡量风险。 有关备份注册表的方法,请参考微软官方资讯: http://support.microsoft.com/kb/322756 同时按【win键+R】,输入regedit,打开【注册表】 前往【hkey_current_user\software\microsoft\windows\currentversion\explorer\desktop\NameSpace】 左边面板,【NameSpace】文件夹下,点击不同的文件 右边面板,留意【数据】栏部分,找到与您不需要的OneDrive账户的相关文件夹 左边面板,对有关文件夹,右键删除 重启电脑,看看效果 wsl虚拟机无法ping host 改防火墙规则 WSL2 unable to ping host machine · Issue #4171 · microsoft/WSL ssh 端口映射 ssh -L [收听接口:]收听端口:目标主机:目标端口 username@hostname # 多端口 ssh remote-host -L 8822:REMOTE_IP_1:22 -L 9922:REMOTE_IP_2:22 vscode正则表达式批量替换 查找:"static/(.*).css 替换:"static/css/$1.css # $1是group1匹配到内容之后需要保留的变量. ([A-Za-z-0-9\.' ,?\\:\/!;%$@&()—£={}<>á`ñ’´\[\]*\^]+) ([A-Za-z-0-9\.' ,?\\:\/!;%$@&()—£={}<>á`ñ’´\[\]*\^]+) windows openssh 安装 windows 会出现openssh安装失败的情况 常规安装方法 其他方法 基于PowerShell的OpenSSH下载最新软件: https://github.com/PowerShell/Win32-OpenSSH/releases 到openssh安装文件夹下, 运行命令 powershell.exe -ExecutionPolicy Bypass -File "D:\Download\OpenSSH-Win64\install-sshd.ps1" # 启动ssh net start sshd # 设定自启动, 也可以直接在服务中启用自动 sc.exe config sshd start= auto 如果自启动失败(windows10 [SC] OpenSCManager 失败 5) 此问题是因为用户没有在控制账号下登录,所以安装出问题(新装的系统,没有设置登录密码)。 运行–>输入regedit–>依次找到HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ 将EnableLUA的值改为0,最后重启电脑,再次操作,即可。 进服务, 设定两项openssh服务为自动 启动服务后可以通过 netstat 命令查看 SSH Server 服务是不是已经开始监听默认的 22 号端口了: 打开C:\ProgramData\ssh\sshd_config 修改端口 Port 65001 PubkeyAuthentication yes 客户端创建公钥 keygen -R # 服务器将公钥放入administrators_authorized_keys文件中 cd C:\ProgramData\ssh mv id_rsa.pub administrators_authorized_keys ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC01uhrVXfP83HroGkgFvJauDUa86RG9JkhDShIVFVt6wBZfy+CHmZkl2HrZL064njETE8eNwtBJwSATRuPb5TsQv7i2+7RGOusRNpx3+/hoUW4fypBUn8qyPzw+OimjAQKvNF3kp1WZ8YZ7aeogZzTOeCejAPJ4Y26Rth5r3g4e0sk5J+lI/tTyw7bpB2qkxRa2SSbfBsuVcnyejAkYK5rQzG6Du4ckVl2d5d9mdZ24lzI8KF3s2m1/EcZI1w5VVy9dwmfp3CEIZxVqNQySIbvk18ZyJhanAjnjtmmlwX4V4ULdUyQ32dGc7+HMBBY1ec4ThOjPP0m58fYvn6sBIkL45Kh2SNpF1tHrmdj3AHkJ1/oac7ZqxjJsWTObG4TQ8puoCQVPNt+SzQI2c7d0dNWxfjlYTw8QduYH5kFZSng+KqaLbnldg9vrRy3+cYXyEtt2oM2tYjxvQUmCg5QEQIoZDjFDYcGwmwx0FgBkjBmoqxywj0pYJLzeFsJGZxZ1Mk= sun@DESKTOP-L98U77R 解决VM 与 Device/Credential Guard 不兼容。在禁用 Device/Credential Guard 后,可以运行 VM 的方法 步骤一:禁用Device Guard或Credential Guard: 禁用用于启用Credential Guard的组策略设置。 在主机操作系统上,右键单击“开始” > “运行”,键入gpedit.msc,然后单击“ 确定”。本地组策略编辑器打开。 转至本地计算机策略 > 计算机配置 > 管理模板>系统 >Device Guard(或者是: 设备防护) > 启用基于虚拟化的安全性。 选择已禁用。 转到“ 控制面板” >“ 卸载程序” >“ 打开或关闭Windows功能”以关闭Hyper-V。 选择不重启。 步骤二:通过命令关闭Hyper-V(控制面板关闭Hyper-V起不到决定性作用,要彻底关闭Hyper-V) 以管理员身份运行Windows Powershell (管理员)(Windows键+X) bcdedit /set hypervisorlaunchtype off 重启. $‘\r‘: command not found的解决方法 去除Shell脚本的\r字符: sed -i 's/\r//' one-more.sh faststone 注册码 name:bluman serial/序列号/注册码:VPISCJULXUFGDDXYAUYF windows下读取ext4格式磁盘 官方下载地址: https://china.paragon-software.com/home-windows/extfs-for-windows/download.html Paragon ExtFS for Windows 4.2.651 下载安装 然后下载补丁 V1.2 by TSRh paragon.extfs.fixed.winall.read.nfo.keygen-tsrh 把keygen和另外两个文件放到ExtFS的安装目录下 我的安装目录是 “C:\Program Files (x86)\Paragon Software\ExtFS for Windows" 打开keygen,先点击Patch RSA 2048,选择安装目录下的 Paragon ExtFS for Windows.exe 再次点击 Patch RSA 2048,选择安装目录下的 extservice.exe 点击Generate让生成License,keygen会重启ExtFS的服务。 之后打开 ExtFS 就发现已经破解完成。 双系统罗技k380配对 系统及蓝牙键盘信息: Windows版本:Windows 7 Ubuntu版本:Ubuntu 12.04(64位) 蓝牙键盘:罗技K480 首先在Ubuntu下进行配对。使用ubuntu自带的蓝牙菜单进行配对,提示的配对密码是错误的。需要使用hcidump工具查找出真正的密码。详细步骤如下: 打开终端,输入如下命令安装bluez-hcidump sudo apt-get install bluez-hcidump 使用hcidump工具开始抓取蓝牙配对密码 sudo hcidump -at | grep pass 在Ubuntu蓝牙菜单中,按照提示添加设备。 Ubuntu搜索到蓝牙键盘后,点击连接。此时hcidump会抓到正确的密码,如下所示,在蓝牙键盘上输入此密码并按回车即可配对成功。(切记不要输入配对菜单提示的错误密码) bdaddr 00:1F:20:F0:EF:75 passkey 224095 (注意记录下此处蓝牙键盘的物理地址 00:1F:20:F0:EF:75) 进入windows进行重新配对,配对成功后,上述ubuntu的配对则会失效。因为配对的key信息已经修改。我们要做的是取出当前蓝牙键盘与windows配对使用的key,将其复制到Ubuntu下的linkkeys文件即可。 下载PsExec: http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx 解压后,找到PsExec.exe. 右键点击,在其属性->兼容性中勾选“以管理员身份运行此程序” 运行cmd, 进入命令行,切换到PsExec.exe所在的目录,执行如下命令打开注册表编辑器:PsExec.exe -s -i regedit.exe 找到HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\services\BTHPORT\Parameters\Keys\aa1111111111\00:1F:20:F0:EF:75中的数据项(如f33a8cadac63b019e8533590b2821357),记录下来。(自己敲键盘记住吧,无法直接复制) 计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\f8e4e3e5ae56 将windows下配对产生的key复制到Ubuntu配对文件中。 重启进入Ubuntu 将在windows中记录的key信息,找到文件/var/lib/bluetooth/AA:11:11:11:11:11/linkkeys的对应00:1F:20:F0:EF:75的配对信息,替换掉。 重启ubuntu(必须重启,否则使用的还是原来的key信息) 系统无故自动重启 【Kernel-Power】系统已在未先正常关机的情况下重新启动。如果系统停止响应、发生崩溃或意外断电,则可能会导致此错误。 ...

2021年8月1日 · 10 分钟 · sun510001

其他问题整理

Hugging face hugging face的预训练模型下载慢的问题(使用BertModel.from_pretrained()等下载慢)_#苦行僧的博客-CSDN博客 (1) ...

2021年8月1日 · 2 分钟 · sun510001