error: <class 'xml.parsers.expat.ExpatError'>, syntax error: line 1, column 0: file: /usr/local/lib/python2.7/xmlrpclib.py line: 557
当linux设备上开启sonar6.2时,
supervisorctl status报如下错误:
error: <class 'xml.parsers.expat.ExpatError'>, syntax error: line 1, column 0: file: /usr/local/lib/python2.7/xmlrpclib.py line: 557
关闭sonar6.2时,报如下错误:
error: <class 'socket.error'>, [Errno 113] No route to host: file: /usr/local/lib/python2.7/socket.py line: 571
据说要关闭防火墙
/usr/sbin/sestatus查看防护墙状态
cat /etc/selinux/config查看防火墙配置
SELINUX=disabled关闭
原来是这两行注释掉了
[inet_http_server] ; inet (TCP) server disabled by default
port=*:9002
tmd,supervisor.conf的配置太坑了,不小心就会出错
另外附一个坑点:supervisord.conf的配置里的注释符,注意分号前后的空格,注释符和配置之间要至少有一个空格
上面的方法,指标不治本,通过下面的命令,我们知道supervisord会在如下路径,寻找名字为supervisord.conf的配置文件
[etc]$ supervisord
Error: No config file found at default paths (/usr/local/etc/supervisord.conf, /usr/local/supervisord.conf, supervisord.conf, etc/supervisord.conf, /etc/supervisord.conf, /etc/supervisor/supervisord.conf); use the -c option to specify a config file at a different path
For help, use /usr/local/bin/supervisord -h
注意上面有绝对路径和相对路径
这里注意两点,一个是配置文件的名字,不能是其他名字,如果是其他名字,就需要启动时指定配置文件的路径和名字;二是路径包含在搜索路径内
1、supervisord -c /a/b/x/s/super.conf。这样启动的supervisor可以任意路径和任意的配置文件名字;
但是,执行supervisorctl的时候,也要指定配置文件的名字和路径,像:supervisor -c /a/b/x/s/super.conf status这样
如果你直接执行supervisorctl status,就会报下面的错误
error: <class 'socket.error'>, [Errno 113] No route to host: file: /usr/local/lib/python2.7/socket.py line: 571
2、另外sonar6.2会默认使用9001端口,keepalived也默认会使用9001端口,所以应该注意端口冲突问题
3、执行命令supervisord 和 supervisorctl 的时候,都会在默认路径下搜索配置文件;

error: <class 'socket.error'>, [Errno 113] No route to host: file: /usr/local/lib/python2.7/socket.py line: 571
4、再说一下上面治标的原因:启动supervisor有连个方法,一个是sock,另一个是下面的方法

supervisor.sock是以.sock 为后缀的文件而已,UNIX 系统不以后缀区分文件类型,但为了识别,通常使用后缀来标识一下。.sock文件通常是UNIX 域套接字(UNIX domain socket),即通过文件系统(而非网络地址)进行寻址和访问的套接字
上面的是Unix domain socket,是操作系统内部通信,所以只可以本地访问
下面的tcp通讯,可以远程访问和本地访问
详细区别参考:
https://en.wikipedia.org/wiki/Unix_domain_socket
https://lists.freebsd.org/pipermail/freebsd-performance/2005-February/001143.html
Unix domain socket
A Unix domain socket or IPC socket (inter-process communication socket) is a data communications endpoint for exchanging data between processes executing on the same host operating system. Like named pipes, Unix domain sockets support transmission of a reliable stream of bytes (SOCK_STREAM, compare to TCP). In addition, they support ordered and reliable transmission of datagrams (SOCK_SEQPACKET), or unordered and unreliable transmission of datagrams (SOCK_DGRAM, compare to UDP). The Unix domain socket facility is a standard component of POSIX operating systems.
The API for Unix domain sockets is similar to that of an Internet socket, but rather than using an underlying network protocol, all communication occurs entirely within the operating system kernel. Unix domain sockets use the file system as their address name space. Processes reference Unix domain sockets as file system inodes, so two processes can communicate by opening the same socket.
In addition to sending data, processes may send file descriptors across a Unix domain socket connection using the sendmsg() and recvmsg() system calls. This allows the sending processes to grant the receiving process access to a file descriptor for which the receiving process otherwise does not have access.[1] This can be used to implement a rudimentary form of capability-based security.[2] For example, this allows the Clam AntiVirus scanner to run as an unprivileged daemon on Linux and BSD, yet still read any file sent to the daemon's Unix domain socket.
https://en.wikipedia.org/wiki/Unix_domain_socket
error: <class 'xml.parsers.expat.ExpatError'>, syntax error: line 1, column 0: file: /usr/local/lib/python2.7/xmlrpclib.py line: 557的更多相关文章
- error: [Errno 13] Permission denied: '/usr/local/lib/处理方法
在ubuntu系统下使用pip 命令安装包时,出现以下类似错误提示: error: [Errno 13] Permission denied: '/usr/local/lib/python2.7/di ...
- mysql: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP
Error Symptom: when you run $mysql -u root -p command in the linux you get an error message ” mysql: ...
- Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/var/AYXXXXXXXXXXX.pid). 错误解决方法
/etc/init.d/mysql start无法启动MySQL错误信息如下: ERROR! MySQL server PID file could not be found! Starting My ...
- mac上安装webpack报错解决方法Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/webpack
node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Pre-built binaries ...
- linux mysql -- ERROR! The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid)
转载 http://blog.csdn.net/caiyaodeng/article/details/45937183 linux 链接mysql 报错 ERROR! The server quit ...
- qt opencv编译错误 /usr/local/lib/libopencv_imgcodecs.so.3.1:-1: error: error adding symbols: DSO missing from command line
转载自:http://tbfungeek.github.io/2016/03/05/Opencv-%E5%AE%89%E8%A3%85%E8%BF%87%E7%A8%8B%E4%B8%AD%E5%87 ...
- 报错:ERROR! The server quit without updating PID file (/usr/local/var/mysql/chenyuntekiMacBook-Air.local.pid).
在Mac上通过brew install mysql 安装了完mysql 执行mysql.server start 报错:ERROR! The server quit without updating ...
- Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/vm10-0-0-19
输入:service mysqld start 报错: Starting MySQL.. ERROR! The server quit without updating PID file (/usr/ ...
- pytesseract.pytesseract.TesseractError: (1, 'Error opening data file /usr/local/share/tessdata/chi_sim.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata"
pytesseract.pytesseract.TesseractError: (1, 'Error opening data file /usr/local/share/tessdata/chi_s ...
随机推荐
- PHP 分割字串 Function 的速度比較(substr/sscanf/preg_match)---substr最快!
固定長度的字串(假設是 06481a63041b578d702f159f520847f8), 要照固定格式做切割, 使用 PHP 要怎麼切會比較快? 註: 要將此字串切成 => 06 / 48 ...
- Windows实现内网IPMI端口转发
https://www.cnblogs.com/yunweis/p/8024346.html
- 使用亚马逊云服务器EC2做深度学习(一)申请竞价实例
这是<使用亚马逊云服务器EC2做深度学习>系列的第一篇文章. (一)申请竞价实例 (二)配置Jupyter Notebook服务器 (三)配置TensorFlow (四)配置好的系统 ...
- HTML5 Video/Audio播放本地文件
这段时间经常看到开发者在反复询问同一个问题,为什么通过设置src属性,不能播放本地的媒体文件?例如video.src=”D:\test.mp4”. 这是因为浏览器中的JavaScript不能直接直接访 ...
- Android中由Handler和内部类引起的内存泄漏
原文地址:http://johnnyshieh.github.io/android/2015/09/03/android-handler-memory-leak/ 在Android中我们经常用Hand ...
- Android 之JSON数据解析
(以下基本都是郭霖大神<第一行代码>中的知识) JSON数据与xml相比,优势在于体积更小,传输所需的流量少.但是缺点也很明显,就是语义性较差. 下面是一组JSON格式的数据. [{&qu ...
- [C#] 实现可设置超时的 Task
前言 如何实现支持超时的 Task ? 关键点: Task.WhenAny 实现 一个扩展方法就可以搞定. // 有返回值 public static async Task<TResult> ...
- java _循环练习和数组练习
练习 1.输出所有的水仙花数,所谓水仙花数是指一个数3位数,其每位数字立方和等于其本身,如153 = 1*1*1 + 3*3*3 + 5*5*5(很经典的题目) 分析: 通过观察发现,本题目要实现打印 ...
- cinder 挂载卷和 iSCSI原理
LVM名称介绍 PV:物理磁盘 VG:卷组,多个PV可以组成一个VG,一个VG可以划分成多个LV(逻辑卷). PP:物理区块,将一个VG逻辑的划分成连续的小块. LP:逻辑区块,若干个PP组成一个LP ...
- hdu 1596 find the safest road (dijkstra)
Problem Description XX星球有很多城市,每个城市之间有一条或多条飞行通道,但是并不是所有的路都是很安全的,每一条路有一个安全系数s,s是在 0 和 1 间的实数(包括0,1),一条 ...