FreeSWITCH没有监听8021端口问题记录

FreeSwitch启动之后,查看端口,发现没有监听8021端口,也就是没有监听EventSocket端口。

之前解决过这个问题,苦于没有做记录;今天又发生了这个问题,顿时手忙脚乱,现在把这个问题解决方法做个记录。

问题描述

FreeSwitch正常启动,没有报错,查看端口,发现8021没有被监听。如下图。

NeoVim的Python开发环境配置

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
:set encoding=utf-8
:scriptencoding 'utf-8'

" filename: ~/.config/nvim/init.vim
" pip3 install pynvim jedi yapf pylint
" from https://jdhao.github.io/2018/09/05/centos_nvim_install_use_guide/
call plug#begin('~/.local/share/nvim/plugged')

" 代码转跳插件(go-to)
Plug 'davidhalter/jedi-vim'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'zchee/deoplete-jedi'

" 目录树
Plug 'preservim/nerdtree'

" 状态栏插件
Plug 'vim-airline/vim-airline'

" 自动引号&括号补全
Plug 'jiangmiao/auto-pairs'

" 自动format 命令:Neoformat
Plug 'sbdchd/neoformat'

" 注释插件 <leader>cc,<leader>cu
" neovim 默认leader是反斜杠 \
Plug 'scrooloose/nerdcommenter'

" 代码检查工具
Plug 'neomake/neomake'

" 多点编辑 Ctrl+n选择, Ctrl+x取消, c修改
Plug 'terryma/vim-multiple-cursors'

" 复制内容高亮
Plug 'machakann/vim-highlightedyank'

" 代码折叠 zo,zO, zc, zC
Plug 'tmhedberg/SimpylFold'

call plug#end()


let g:deoplete#enable_at_stratup = 1

augroup noname
        autocmd!

        " Deoplete 自动补全,nvim上半部分出现很小的窗口,切不会自动消失
        autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose |endif

augroup END

" 设置neoformet只做简单的format
" enbale alignment
let g:neoformat_basic_format_align=1

" enbale tab to spaces conversion
let g:neoformat_basic_format_retab = 1

" enable trimming of trailing whitespace
let g:neoformat_basic_format_trim = 1

" jedi-vim配置 关闭自动补全
" disable autocompletion, cause we use deoplete for comletion
let g:jedi#completions_enabled = 0

" open the go-to function in split, no another buffer
let g:jedi#use_splits_not_buffers = 'right'

" 使用pylint作为Python代码检查器
let g:neomake_python_enabled_markers = ['pylint']

call neomake#configure#automake('nrwi', 500)

set number

linux网速监控脚本

保存到net.sh文件,添加可执行权限,使用方法net.sh 网卡名称

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash

ethn=$1

if [ $# != 1 ];then
        echo "USEAGE: $0 enthn"
        echo "e.g.: $0 ens33"
        exit 1;
fi

while true
do
    RX_pre=$(cat /proc/net/dev | grep $ethn | sed 's/:/ /g' | awk '{print $2}')
    TX_pre=$(cat /proc/net/dev | grep $ethn | sed 's/:/ /g' | awk '{print $10}')
    sleep 1
    RX_next=$(cat /proc/net/dev | grep $ethn | sed 's/:/ /g' | awk '{print $2}')
    TX_next=$(cat /proc/net/dev | grep $ethn | sed 's/:/ /g' | awk '{print $10}')

    clear
    echo -e "\t RX `date +%k:%M:%S` TX"

    RX=$((${RX_next}-${RX_pre}))
    TX=$((${TX_next}-${TX_pre}))

    if [[ $RX -lt 1024 ]];then
        RX="${RX}B/s"
    elif [[ $RX -gt 1048576 ]];then
        RX=$(echo $RX | awk '{print $1/1048576 "MB/s"}')
    else
        RX=$(echo $RX | awk '{print $1/1024 "KB/s"}')
    fi

    if [[ $TX -lt 1024 ]];then
        TX="${TX}B/s"
    elif [[ $TX -gt 1048576 ]];then
        TX=$(echo $TX | awk '{print $1/1048576 "MB/s"}')
    else
        TX=$(echo $TX | awk '{print $1/1024 "KB/s"}')
    fi

    echo -e "$ethn \t $RX $TX "
done

Centos7 出现 curl: (60) Peer's Certificate has expired. 问题

使用Centos7出现证书错误

使用curl下载文件时出现curl: (60) Peer's Certificate has expired.错误

由系统时间偏差造成的。

解决方法:同步系统时间

1
2
3
4
5
6
7
8
[root@localhost ~]# yum install ntp -y

[root@localhost ~]# date -R
Tue, 14 Apr 2020 04:59:22 +0800
[root@localhost ~]# ntpdate -u 0.centos.pool.ntp.org
21 May 16:38:14 ntpdate[26149]: step time server 185.255.55.20 offset 3238716.334095 sec
[root@localhost ~]# date -R
Thu, 21 May 2020 16:38:17 +0800