
笔记
charnet1019
这个作者很懒,什么都没留下…
展开
-
容器以host模式运行时通过进程ID查找对应的容器名称
场景:应用服务通过docker-compose部署的,部分服务的以host网络模式运行,通过从top命令中获取的PID无法直接获取到对应的容器名称,经分析测试后可通过父进程查找非host网络模式可直接通过以下命令查找容器名称docker inspect -f "{{.Id}} {{.State.Pid}} {{.Name}} " $(docker ps -q) | grep <PID>host网络模式可直接通过以下命令查找容器名称通过top命令获取进程PID获取对应进程PID原创 2021-09-03 14:32:31 · 682 阅读 · 0 评论 -
pip安装GeoIP时报fatal error: GeoIP.h: No such file or directory
CentOS 7下使用pip安装GeoIP包时报如下错误,提示缺少GeoIP.h头文件[root@master-60-5 python]# pip3 install geoipLooking in indexes: https://pypi.doubanio.com/simple/Collecting geoip Downloading https://pypi.doubanio.com/packages/f2/7b/a463b7c3df8ef4b9c92906da29ddc9e464d4045f原创 2021-09-01 17:49:17 · 885 阅读 · 0 评论 -
使用PowerDNS实现内网DNS解析
部署环境公司内部安装powerdns实现局域网服务dns解析,避免通过ip访问。系统: CentOS 7.9mysql版本: 5.7.33pdns版本: 4.4.1pdns-recursor版本: 4.4.2PowerDNS-admin版本: 0.2.3DNS服务器主机: 10.x.x.109测试服务器ip: 10.y.y.195使用docker方式安装mysql,docker-compose.yml如下所示:---version: '3.7'services: mys原创 2021-08-11 10:11:06 · 6043 阅读 · 4 评论 -
Error dropping database (can‘t rmdir “test“ errno: 39)解决办法
Error dropping database (can't rmdir "test" errno: 39)解决办法http://www.blogdaren.com/post-2308.html转载 2021-02-05 15:24:42 · 1710 阅读 · 0 评论 -
一次nginx代理前端报rewrite or internal redirection cycle while internally redirecting to “/index.html“ 记录
将nginx从一个服务器迁移到另一个服务器后执行nginx -t检查配置没有问题,重启服务后访问报500内部错误,查看日志报rewrite or internal redirection cycle while internally redirecting to "/index.html"经多次排查确认是静态页面的路径不对,但nginx -t也没有报错,比较坑,修改后解决问题。...原创 2021-02-02 20:06:17 · 24633 阅读 · 6 评论 -
nginx代理服务报Mixed Content: The page at ‘https://mydomain.com‘ was loaded over HTTPS
使用nginx代理后端服务时出现如下错误:Mixed Content: The page at 'https://mydomain.com' was loaded over HTTPS, but requested an insecure stylesheet 'http://mydomain.com'. This request has been blocked. the content must be served over HTTPS.错误原因:nginx代理的https页面中加.原创 2021-01-28 22:27:07 · 4041 阅读 · 0 评论 -
记一次gitlab从http升级到https后访问域名出现连续302重定向
出现问题过程描述:原有gitlab使用的http协议,因XXX原因要升级到https协议,升级完成后访问域名出现连续的302重定向从而引起民愤,排查过程不表。解决方法:将图中的url从http修改为https完善解决。...原创 2020-07-23 17:14:59 · 3651 阅读 · 2 评论 -
执行kubeadm init 安装kubernetes时报错: [ERROR FileExisting-conntrack]: conntrack not found in system path
使用kubeadin init安装kubernetes时报如下错误:解决方法:yum -y install socat conntrack-tools原创 2020-07-17 22:11:35 · 6679 阅读 · 2 评论 -
PowerMTA 4.5邮件群发服务器安装配置
说明:已基本实现邮件的发送功能,spf和dkim验证通过,用户名密码认证失败待后续排查验证。环境:OS: CentOS 7.6PowerMTA: 4.5r11域名: mydomain.com服务器公网IP : X.X.X.X客户端IP: Y.Y.Y.Y1. 安装PowerMTA4.5#wget https://s3-us-west-1.amazonaws.com/origin-static/pmta/PowerMTA-4.5r11.zip#unzip ...原创 2020-05-21 19:29:14 · 8744 阅读 · 0 评论 -
elasticdump报SyntaxError: Unexpected identifier
安装elasticdump执行命令报如下错误:原因:nodejs版本比较旧方法: 升级nodejs版本[root@localhost home]#npm install -g n[root@localhost home]#n lastest[root@localhost home]# elasticdump --version6.28.3原创 2020-05-18 20:34:02 · 851 阅读 · 0 评论 -
jenkins从gitlab拉取go项目且项目中引入私有仓库,go get报错connect: connection refused
问题:使用jenkins从gitlab拉取go项目在编译时还需要下载import的私有库,报connect: connection refused原因:因gitlab没有开启https导致连接443端口失败解决方法:1. 在gitlab添加jenkins服务器的ssh公钥.2.将http请求转换为ssh请求git config --global url."git@gitlab.mycompany.com".insteadOf "https://gitlab.my..原创 2020-05-18 19:51:35 · 1989 阅读 · 0 评论 -
graylog通过rsyslog收集日志
环境:系统: CentOS 7.6graylog版本:3.2.4mongodb版本:4.2.6elasticsearch版本: 6.8.8graylog安装过程请参考https://docs.graylog.org/en/3.2/pages/installation/os/centos.html1. graylog安装完成后登录并创建input。system菜单下选择Syslog TCP后点击"Launch new input",选择graylog服务器节点,名称...原创 2020-05-12 13:40:50 · 3027 阅读 · 0 评论 -
记一次使用logstash将mysql数据迁移到elasticsearch的基本过程
环境:OS: centos 7.6Logstash Version: 7.6.1Elasticsearch Version: 7.6.1MySQL Version: 8.0.18需求: 将mysql数据导入elasticsearch实现全文检索功能Elasticsearch安装过程略……1. 下载logstash-7.6.1.tar.gz并解压到/op...原创 2020-05-12 11:59:13 · 563 阅读 · 0 评论 -
nginx在宿主机可以访问但在外网无法访问日志报Permission denied while connecting to upstream
问题现象:nginx部署成功后在宿主机通过curl可以正常访问,但在其他主机上无法访问日志报错如下:解决方法:简单粗爆直接把selinux设置为disabled.setenforce 0sed -i 's/^SELINUX=.*$/SELINUX=disabled/' /etc/selinux/config...原创 2020-04-11 10:51:24 · 326 阅读 · 0 评论 -
gitlab报 ERROR: missing chunk number 3 for toast value 108064 in pg_toast_2619
问题:服务器掉电重启后gitlab报gitlab报 ERROR: missing chunk number 3 for toast value 108064 in pg_toast_2619报错原因:某张表关联的toast表的data发生损坏解决方法:1. 连接pgsql数据库 $psql -h /var/opt/gitlab/postgresql -d gitlab...原创 2020-02-09 17:01:02 · 2266 阅读 · 0 评论 -
编译curl后yum提示pycurl.so: undefined symbol: CRYPTO_set_locking_callback错误
出现以下错误是因为重新编译curl后出现的,可能是编译后pycurl.so库出现错误,因此尝试编译pycurl修复There was a problem importing one of the Python modulesrequired to run yum. The error leading to this problem was: /usr/lib64/pytho原创 2017-04-02 19:25:31 · 1336 阅读 · 0 评论 -
编译PHP5.6 提示configure: error: GD build test failed. Please check the config.log for details.
搭建LAMP过程中在编译PHP5.6的过程中总是出现如下错误,经过百度、google查了大半天大家的答案无一不是去掉部分参数或者卸载相关的库后再重新安装,但不幸的是都没有解决我的问题,在这个问题上卡的时间太久了崩溃中。。。。configure: error: GD build test failed. Please check the config.log for details.原创 2017-04-08 20:00:19 · 7532 阅读 · 0 评论