- 博客(33)
- 收藏
- 关注
原创 [k8s] kubectl返回certificate has expired or is not yet valid错误
前两天在k8s master上执行kubectl get pod时,返回x509 certificate has expired or is not yet valid错误。原因使用kubeadm安装k8s时,默认生成的client certificate的有效期是1年。可以使用kubeadm certs check-expiration或kubeadm alpha certs check-expiration(较早的kubeadm版本中,该命令还是在alpha阶段)查看当前证书的信息。后续命令为了
2021-08-12 14:58:07
4687
1
原创 [containerd] 配置containerd使用proxy来pull image
最近在捣鼓k8s v1.20,使用containerd作为container runtime,但是在执行kubeadm config images pull的时候报错。因为在公司环境下,需要配置代理。mkdir /etc/systemd/system/containerd.service.dcat > /etc/systemd/system/containerd.service.d/http_proxy.conf << EOF> [Service]> Environ
2021-01-27 16:49:36
9426
1
原创 [Linux]SSH hangs at 'debug1: SSH2_MSG_KEXINIT sent'
最近我在尝试从一台linux服务器SSH登录到另一台服务器时发现链接错误。通过加入-vvv参数后,发现卡在debug1: SSH2_MSG_KEXINIT sent通过搜索,发现可能是网络接口MTU设置的问题。我尝试在/etc/sysconfig/network-scripts/ifcfg-eth0中添加MTU=1500,在重启网络服务后,发现并没有生效。由于我是通过DHCP获取IP地址的,那么...
2018-11-29 10:56:13
3306
原创 [Docker] docker run -p shows iptables fail on CentOS 7
I was playing around with Sentry, and when I tried to run it with docker run \ --detach \ --link sentry-redis:redis \ --link sentry-postgres:postgres \ --env SENTRY_SECRET_KEY=123456 \ -...
2018-06-07 12:28:59
385
原创 [Python] Paramiko 初探
Paramiko• Paramiko是对ssh2协议的实现,不仅仅提供远程shell的安全接入功能,还可以为其他远程服务建立安全的隧道(SFTP) • 自身完全由python实现,但是依赖于第三方的C wrapper提供底层的加密功能当我们使用paramiko作为client与服务器进行连接时,有以下步骤: 1. 定义Transport 连接的远端socket 2. 协商...
2018-05-17 13:47:13
1428
原创 [Python] python-ldap installation and usage notes
Installationpython-ldap installation is very simple. On CentOS 7, you just need to# install openldap-develyum install openldap-devel# then install python-ldap via pippip install python-ldapUsageTo us
2017-07-12 12:16:41
813
原创 [Python]Attempted relative import in non-package
Python relative import is a topic that bugs me for a long time. Today, I came across these two articles which helps me to understand the topic better.
2017-06-07 13:43:47
2511
原创 [PhantomJS] Https Redirect Problem with PhantomJS + Selenium
A few days ago, I was writing a python script with PhantomJS and Selenium. The problem is that the redirection doesn’t work properly.ProblemFor example,driver.get("https://redirect-to-login.example.com
2017-06-07 12:37:45
1558
原创 [RabbitMQ] beam.smp high cpu load
A customer reported a function is not working in our django app. That app runs using celery and RabbitMQ. I found out that the celery worker cannot receive tasks from RabbitMQ. Then I checked my Rabbit
2016-10-10 14:24:26
13018
1
原创 [HAPrxoy]First thing to check when using HAProxy
Recently, I’ve encountered a few connection lost/timeout issues in my project. All of them are caused by wrong timeout server and timemout client value in HAProxy. Just a reminder to myself, “Be sure t
2016-08-15 13:46:33
504
原创 [Linux]NetworkManager and the nmcli command return a 'symbol lookup error' in RHEL 7
Recently, I ran into a problem when starting NetworkManager service in CentOS 7. I checked the /var/log/message and it contains the following linessystemd: Starting Network Manager...NetworkManager:
2016-08-02 15:19:52
2191
原创 [Django] use django modules in standalone python script
This post only serves as a reminder of how to use django modules, such as django.template in a standalone python script.Here is the link from official site.
2016-07-15 16:14:14
548
原创 [Jenkins] Use python requests to programatically get and set Jenkins job configuration
Jenkins provided a very nice REST api to interact. In Python, we can use requests package. For simplicity, we are going to use password based authentication. For details on requests package, please see
2016-07-11 09:41:04
849
原创 [Jenkins] Upgrade to 2.7 causes connection refused problem
Today, I upgraded my jenkins server from 1.6 to 2.7, then I visited the http://jenkins:8080. I gave me “connection refused” error.I checked the /var/log/jenkins/jenkins.log, it has:SEVERE: Container st
2016-07-08 14:50:31
1734
原创 [Linux] NFSv4 and Autofs caveats
Recently, I was doing some server setup works which involves NFS and Autofs. Of course, I ran into several problems. So I’d like to document it just in case.Problem 1. Unable to mount exported shares v
2016-06-27 18:01:24
684
原创 [RabbitMQ] RabbitMQ Cluster ConnectionClose Error with HAProxy
I setup the rabbitmq clustering according to the official doc and queue mirroring according to this article. Then I configure a HAProxy in front of the rabbitmq cluster.ProblemMy own script using pika
2016-03-28 13:56:34
1412
原创 [Linux] Install keepalived on CentOS
InstallingAlthough installing keepalived through yum is quite convenient, the package is often out-of-date.So it is recommended to install it from source code. To do so, you can follow the instructions
2016-03-23 16:23:05
730
原创 [Linux]Run cron job under system account
When configuring cron job for system account, there are a few points to pay attention to:Since system account usually does not have home directory, and cron will attempt to chdir to the home directory
2016-02-02 12:54:28
933
原创 [Nginx, Django]Securing connections with SSL
Reference: Django by Example Chapter 13Create directory under /etc/nginx, and cd to that directorymkdir /etc/nginx/sslcd /etc/nginx/sslCreating a SSL certificateopenssl req -x509 -nodes -days 365 -ne
2016-01-25 15:58:28
634
原创 [MariaDB] Setup MariaDB Galera Cluster with HAProxy
Working in ProgressSetup MariaDB Galera ClusterThe setup for Galera Cluster is reasonably easy if you follow the instructions in this article.!!!IMPORTANT!!!Initializing cluster On setups on CentOS 7
2016-01-07 11:12:42
2444
原创 [Docker] Error when starting docker in CentOS 7
On CentOS7, I installed docker using script, and manually added docker.service and docker.socket into /etc/systemd/system, I get the error when using systemctl start docker/usr/bin/docker: relocation e
2016-01-06 15:02:58
3103
原创 [djangocms] Integrate djangocms with existing projects
This instruction assumes you are using CentOS 7 and MariaDB. The Official instruction is good and clear, but I prefer to do it in a different order and point out something you should pay attention to.
2015-12-30 13:54:19
1169
原创 [Piwik] Installing piwik for website analysis
The official installation guide provides very clear instructions, the following points do require your attention though.Make sure your system setup meets the minimum requirements.Change the ownership
2015-12-30 13:00:37
757
原创 [Linux] Enable ssh key authentication from one user on client to multiple users on server
Linux ssh config
2015-11-24 22:22:45
660
原创 [Atom] Cannot install package behind a proxy on Win7
I’m using Atom behind a proxy on Win7. Every time I try to install new packages, it fails. So I googled around and found these two articles. 1. Setup Atom behind proxy 2. Unable to install packages b
2015-11-11 09:59:16
1256
原创 [Celery]Run celery as daemon
This HOWTO is based on instructions provided at celeryd systemd configure and celery in daemonIn my previous HOWTO, we’ve configured celery and are able to run it using celery -A proj worker -l info ma
2015-09-11 16:47:13
1306
原创 HOWTO django + celery + rabbitmq simple setup for testing purpose
This setup is simply used for testing purpose and using the official First Steps with Celery and First Steps with Django as reference.InstallationStep1. Install EPEL repositoryUsing yum search epel to
2015-08-14 22:32:08
1152
原创 [Wireshark]Sniffing with Wireshark(or tshark) as a Non-Root User on CentOS
This HOWTO is referencing the article written by StretchFilesystem Capabilities What are filesystem capabilities? From the man page: The manual goes on to list over two dozen distinct POSIX capabi
2015-07-24 10:40:44
989
原创 HOWTO - Install Nginx + uWSGI + Django
The basics are almost identical with the uWSGI official document. Here I would like to note a few important points when setting up Nginx + uWSGI + Django on CentOS 7.ConceptA web server faces the outsi
2015-07-21 12:23:32
1603
原创 [Linux]TigerVNC failed on start
Symptom: After a power outage, my CentOS 7 server restarts. When using systemctl start vncserver@.service, error occursHOWTO fix it: - issue journctl -xn, and look for some clue. In my case, there is
2015-07-20 21:36:06
755
原创 [Python]Decorators
Decorators are very hard to understand at the beginning. There is an article about decorators, which helps me establishing a basic understanding about how decorators work in Python. http://simeonfrank
2015-07-18 17:14:31
584
原创 [Django]Solve "No module named _sqlite3" when deploying django in CentOS
Problem occurs under the following setup: - CentOS 7 - Python 2.7.10 - Django 1.8.2When using python manage.py runserver in terminal or entering import sqlite3 in the interpreter shell, the followin
2015-07-17 22:06:16
1197
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人