Ubuntu 12.10 中没有“localhost”或“127.0.0.1”

Ubuntu 12.10 中没有“localhost”或“127.0.0.1”

安装 Ubuntu 12.10 后,我尝试安装 Metasploit(已安装 ruby​​)。

首先,我得到:

[-] Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 7337?

然后大约 30 秒后,它会加载 metasploit 控制台,但是在尝试之后:

msfupdate

我明白了:

msf > sudo msfupdate
[*] exec: sudo msfupdate

[*]
[*] Attempting to update the Metasploit Framework...
[*]

[-] https://localhost:3790 (note, Metasploit Community
[-] Edition is totally free and takes just a few seconds
[-] to register!)
[-] ERROR: Failed to update Metasploit installation

[-] In order to update your Metasploit installation,
[-] you must first register it through the UI, here:

这样就好了,但是我无法在任何端口上访问 localhost?!之前当我尝试安装 Utorrent 时,我无法访问 localhost:8080,所以我不得不卸载它。

我尝试访问的每个 local.host 都会返回

Firefox can't establish a connection to the server at https://localhost:XXXX.

为何我無法做任何事?!

答案1

错误信息解释了原因:

[-] 无法连接到数据库:无法连接到服务器:连接被拒绝服务器是否在主机“localhost”(127.0.0.1)上运行并在端口 7337 上接受 TCP/IP 连接?

您没有在端口 7337 上运行并接受连接的数据库。

除非你确认有服务器正在运行并监听特定端口,否则尝试连接该端口毫无意义。当然会失败。

相关内容