Python 系列:
- 使用execjs 解析抓取的网页数据时错误:Could not find an available JavaScript runtime
- 解决方法:
pip3 install PyExecJS
yum install -y nodejs
Linux 系列:
docker 系列:
docker: Error response from daemon: symlink ../d3cbf5b23573a3c149f9e0e902bb8e095652952eb76c8146813fec9cd4d192d8-init/diff /var/lib/docker/overlay2/l/RNPSJA33YQ7UXWTKV2WVCQCJIO: no such file or directory.
问题原因
由于/var/lib/docker/overlay2中的文件误删除解决方法
将/var/lib/docker删除,重新安装docker
yum remove docker-ce -y
yum install -y yum-utils && yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo && yum install -y docker-ce && systemctl restart docker && systemctl enable docker
nginx 系列:
nginx会去掉带有下划线的Header键值
在本地可以获取前端header传的参数,但是部署到服务器获取的就是null(服务器地址用nginx做了代理)
原因:
nginx对header name的字符做了限制,默认 underscores_in_headers 为off,表示如果header name中包含下划线,则忽略掉,部署后就获取不到。解决:
在header里不要用 “_” 下划线,可以用驼峰命名或者其他的符号(如减号-)代替。nginx默认忽略掉下划线可能有些原因。
在nginx里的 nginx.conf文件中配置http的部分添加 : underscores_in_headers on;(默认值是off)
mysql 系列:
mysql远程连接报错 ERROR 1129 (HY000): Host ‘192.168.7.210’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’
问题原因
一般max_connect_errors = 10,要调高错误连接的数量解决方法
登录到要连接的数据中,进行如下配置
mysql> show variables like 'max_connect_errors';
mysql> set global max_connect_errors = 1000;# 如果想长期生效,并修改my.cnf配置文件
mysql> flush hosts;
关于MySQL: errorCode 1045, state 28000 Access denied for user ‘xxx’@’localhost’ (using password YES)
- 解决方法
执行以下SQL Script:
grant all privileges on *.* to 'xxx'@'%'identified by 'db password' with grant option;