1. 问题
查看打印的日志发现,第一行出现一个warn警告:
inetaddress.getlocalhost().gethostname() took 5005 milliseconds to respond. please verify your network configuration (macos machines may need to add entries to /etc/hosts).
意思是主机名地址解析花了5秒多,请检查你的网络配置(macos的机器名可能需要加入/etc/hosts中)。
2. 解决
sakura@Sakura ~ hostname
Sakura.local # 得到你的主机名
sakura@Sakura ~ sudo vim /private/etc/hosts # 修改/etc/hosts文件
原内容:
##
# Host Database
#
# localhost is used to configure the loopback inte