感谢支持
我们一直在努力

Ubuntu 13.10 安装 Wireshark

今天在使用Java jsoup操作remote server的是否,在本地执行可以成功返回内容,然后打成jar包,使用shell在 server上执行就反问错误。

java.net.SocketException: Unexpected end of file from server
sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:772)
sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:516)
org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:493)
org.jsoup.helper.HttpConnection.execute(HttpConnection.java:205)
org.jsoup.helper.HttpConnection.get(HttpConnection.java:194)

在stackoverflow 上面找到同样的问题,原因是remote server 接收request,并立马关闭了request,而没有返回response;具体原因得看 trace packets,so,得安装wireshark
sudo apt-get install wireshark

但是没有那么顺利,不然就不会有这边文章了。

因为执行上面的命令之后,发现如下错误:
404  Not Found [IP: 137.189.4.14 80]

sudo apt-get update 也没有办法解决,

然后baidu了一下,发现了这边blog有办法。发现是因为Ubuntu13.10 这个版本的源有变化导致的。
更新为14.04可以解决,但是这可是正在运行的服务器,不敢冒着险。不过也可以更新源。
mv /etc/apt/sources.list /etc/apt/sources.list_20150807
touch /etc/apt/sources.list
vi /etc/apt/sources.list

然后copy一下内容

deb http://old-releases.ubuntu.com/ubuntu/ raring main universe restricted multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring main universe restricted multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-security main universe restricted multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-security main universe restricted multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-updates main universe restricted multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-updates main universe restricted multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse

然后保存退出。
 sudo apt-get update
 sudo apt-get install wireshark
 done.

网络抓包工具Wireshark的简单使用 http://www.linuxidc.com/Linux/2013-05/84174.htm

Ubuntu 12.04 下安装Wireshark http://www.linuxidc.com/Linux/2012-06/63582.htm

Linux中从普通用户启动Wireshark抓包 http://www.linuxidc.com/Linux/2012-06/63580.htm

Linux下安装和运行Wireshark http://www.linuxidc.com/Linux/2014-09/106522.htm

Wireshark 的详细介绍:请点这里
Wireshark 的下载地址:请点这里

更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2 

本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-08/121326.htm

赞(0) 打赏
转载请注明出处:服务器评测 » Ubuntu 13.10 安装 Wireshark
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏