我按照管理指南安装 onos,并发出以下命令:
sudo systemctl status onos.service
它输出一条错误消息,显示无法启动开放网络操作系统。但是,它似乎由于缺少 karaf(来自命令tail /var/log/syslog
行 2 和 3)而无法启动?
因此我尝试创建一个名为 karaf 的符号链接,指向apache-karaf-3.0.8 directory
/opt/onos 下的现有文件,但仍然存在完全相同的错误消息
我正在使用 ubuntu 18 LTE 桌面版,如果有帮助的话
有谁能帮我解决这个
以下是我的opt/onos
目录下的内容:
maxyou@maxyou-virtual-machine:~/opt/onos$ ls -l
total 28
drwxrwxrwx 9 sdn root 4096 Dec 19 17:04 apache-karaf-3.0.8
drwxr-xr-x 174 sdn root 12288 Dec 19 16:59 apps
drwxrwxrwx 2 sdn root 4096 Nov 29 15:40 bin
drwxrwxrwx 2 sdn root 4096 Nov 29 15:40 init
lrwxrwxrwx 1 sdn root 21 Dec 23 20:19 karaf -> ./apache-karaf-3.0.8/
-rwxrwxrwx 1 sdn root 6 Nov 29 15:40 VERSION
我附加了来自不同命令的一系列失败消息
当使用该命令时sudo systemctl status onos.service
,它会给出以下内容
maxyou@maxyou-virtual-machine:~$ sudo systemctl status onos.service
● onos.service - Open Network Operating System
Loaded: loaded (/etc/systemd/system/onos.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Sun 2018-12-23 17:37:43 EST; 4s ago
Process: 3586 ExecStop=/etc/init.d/onos stop (code=exited, status=0/SUCCESS)
Process: 3569 ExecStart=/etc/init.d/onos start (code=exited, status=0/SUCCESS)
Dec 23 17:37:43 maxyou-virtual-machine systemd[1]: onos.service: Service hold-off time over, scheduling restart.
Dec 23 17:37:43 maxyou-virtual-machine systemd[1]: onos.service: Scheduled restart job, restart counter is at 5.
Dec 23 17:37:43 maxyou-virtual-machine systemd[1]: Stopped Open Network Operating System.
Dec 23 17:37:43 maxyou-virtual-machine systemd[1]: onos.service: Start request repeated too quickly.
Dec 23 17:37:43 maxyou-virtual-machine systemd[1]: onos.service: Failed with result 'start-limit-hit'.
Dec 23 17:37:43 maxyou-virtual-machine systemd[1]: Failed to start Open Network Operating System.
当使用该命令tail /var/log/syslog
获取更多详细信息时,我得到以下内容
maxyou@maxyou-virtual-machine:~$ tail /var/log/syslog
Dec 23 17:37:42 maxyou-virtual-machine onos[3586]: sudo: /opt/onos/karaf/bin/status: command not found
Dec 23 17:37:42 maxyou-virtual-machine onos[3586]: ONOS/karaf is not running
Dec 23 17:37:42 maxyou-virtual-machine systemd[1]: Started Open Network Operating System.
Dec 23 17:37:43 maxyou-virtual-machine systemd[1]: onos.service: Service hold-off time over, scheduling restart.
Dec 23 17:37:43 maxyou-virtual-machine systemd[1]: onos.service: Scheduled restart job, restart counter is at 5.
Dec 23 17:37:43 maxyou-virtual-machine systemd[1]: Stopped Open Network Operating System.
Dec 23 17:37:43 maxyou-virtual-machine systemd[1]: onos.service: Start request repeated too quickly.
Dec 23 17:37:43 maxyou-virtual-machine systemd[1]: onos.service: Failed with result 'start-limit-hit'.
Dec 23 17:37:43 maxyou-virtual-machine systemd[1]: Failed to start Open Network Operating System.
Dec 23 17:37:54 maxyou-virtual-machine gnome-shell[2120]: pushModal: invocation of begin_modal failed
从上面输出的第 2 行和第 3 行,我检查地位存在
maxyou@maxyou-virtual-machine:~$ ls
bin Desktop Documents Downloads examples.desktop Music opt Pictures Public Templates Videos
maxyou@maxyou-virtual-machine:~$ cd opt
maxyou@maxyou-virtual-machine:~/opt$ ls
onos onos-1.15.0.tar.gz
maxyou@maxyou-virtual-machine:~/opt$ cd onos
maxyou@maxyou-virtual-machine:~/opt/onos$ ls
apache-karaf-3.0.8 apps bin init karaf options VERSION
maxyou@maxyou-virtual-machine:~/opt/onos$ cd karaf/bin
maxyou@maxyou-virtual-machine:~/opt/onos/karaf/bin$ ls
client client.bat instance instance.bat karaf karaf.bat setenv setenv.bat shell shell.bat start start.bat status status.bat stop stop.bat
但是当我尝试sudo: /opt/onos/karaf/bin/status
手动运行该命令时,它给出以下信息:
maxyou@maxyou-virtual-machine:~$ sudo ./opt/onos/karaf/bin/status
karaf: JAVA_HOME not set; results may vary
Not Running ...
我已尽力从不同的角度展示错误信息
有人能告诉我为什么sudo systemctl status onos.service
会出现错误消息以及如何修复它吗?
谢谢