Tao

          Tao obeys its own inherent Nature

          2009年7月15日

          搬到了: http://theantway.com
          posted @ 2011-11-08 13:43 wade 閱讀(212) | 評論 (0)編輯 收藏
          Ubuntu 11.04
          libxml2-2.7.8

          網上找了一些辦法都不能用,最后直接打開configure 文件,找到$RM "$cfgfile", 替換為 $RM -f "$cfgfile", 說白了就是出錯了也不要停,繼續執行。再運行configure, 成功
          posted @ 2011-06-02 10:15 wade 閱讀(1326) | 評論 (0)編輯 收藏

          When I try to use URLConnection to check if a url is accessible using the following code:

          try {
              URL url = new URL("http://169.254.169.254/latest");
          
              URLConnection connection = url.openConnection();
              connection.setConnectTimeout(5000);
              connection.connect();
              System.out.println("Connected successfully using url");
          } catch (IOException e) {
                  e.printStackTrace();
          }
          

          I expected the behavior is: connect should be success if the host is reachable, else throw exception. It works fine without the anti-virus application, but always print “connected successfully” even the host is not reachable.

          Then I tried to use Socket to connect:

          Socket socket = new Socket();
          socket.connect(new InetSocketAddress("169.254.169.254", 80));
          if (socket.isConnected()) {
              System.out.println("Connected successfully using socket");
          } else {
              System.out.println("Connected failed using socket");
          }
          
          

          But Still got the same problem.

          The solution for it:

          Disable http check in anti-virus, for example, in ESET NOD32, the settings is Web access protection -> Http, Https -> Http scanner

          ESET_http_connection_always_success

          posted @ 2009-07-15 13:30 wade 閱讀(470) | 評論 (0)編輯 收藏

          導航

          <2009年7月>
          2829301234
          567891011
          12131415161718
          19202122232425
          2627282930311
          2345678

          統計

          常用鏈接

          留言簿(7)

          隨筆分類

          隨筆檔案

          相冊

          Photo

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 绥江县| 湖南省| 城固县| 宜兰县| 蓬溪县| 黄山市| 盖州市| 文山县| 肇东市| 庆云县| 定西市| 武邑县| 吉林市| 黄平县| 八宿县| 沙河市| 海安县| 金昌市| 河津市| 广元市| 思南县| 德江县| 永兴县| 舒兰市| 台中市| 嘉黎县| 肇州县| 苏尼特左旗| 平塘县| 庐江县| 阿瓦提县| 华阴市| 苍山县| 东港市| 鄯善县| 巫山县| 青河县| 交城县| 集贤县| 永吉县| 邢台市|