启动“asterisk.service”需要身份验证

启动“asterisk.service”需要身份验证

aws似乎无法启动asterisk

ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ systemctl status asterisk.service
● asterisk.service - Asterisk PBX
   Loaded: loaded (/lib/systemd/system/asterisk.service; enabled; vendor preset: enab
   Active: activating (auto-restart) (Result: exit-code) since Tue 2017-11-14 08:45:1
     Docs: man:asterisk(8)
  Process: 24907 ExecStart=/usr/sbin/asterisk -g -f -U asterisk (code=exited, status=
 Main PID: 24907 (code=exited, status=1/FAILURE)

Nov 14 08:45:14 ip-172-31-14-19 systemd[1]: asterisk.service: Main process exited, co
Nov 14 08:45:14 ip-172-31-14-19 systemd[1]: asterisk.service: Unit entered failed sta
Nov 14 08:45:14 ip-172-31-14-19 systemd[1]: asterisk.service: Failed with result 'exi
lines 1-10/10 (END)
ubuntu@ip-172-31-14-19:~$ 

要启动服务,先创建一个 sudo 用户?

ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ uptime
 22:05:27 up 0 min,  1 user,  load average: 2.44, 0.65, 0.22
ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ asterisk -rvvvv
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ sudo asterisk -rvvvv
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ sudo asterisk -cvvvvvvvvvv
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use 'asterisk -r' to connect.
ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ asterisk -r
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ asterisk -rvv
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ /etc/init.d/asterisk start
[....] Starting asterisk (via systemctl): asterisk.service==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'asterisk.service'.
Authenticating as: Ubuntu (ubuntu)
Password: 
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to start asterisk.service: Access denied
See system logs and 'systemctl status asterisk.service' for details.
 failed!
ubuntu@ip-172-31-14-19:~$ 

具体方向:

步骤 10. 启动 Asterisk

现在我们可以启动Asterisk了,在命令行上运行以下命令来启动Asterisk:

星号-cvvvvvvvvvv

如果 Asterisk 启动正常,请输入:

核心立即停止

关闭 Asterisk 并退出 Asterisk 控制台。

然后启动 asterisk 作为守护进程:

/etc/init.d/asterisk 启动

然后您可以使用以下命令连接到 Asterisk 控制台:

星号 -rvvvvvvvvvv

不像当地的系统,上的默认用户没有已知密码aws

相关内容