zoukankan      html  css  js  c++  java
  • (WCF) There is already a listener on IP endpoint 0.0.0.0:9999.

    有個nettcpbinding, service host總是不能起來,出現如題錯誤。

    查了下,同樣的程序并沒有在進程裏面,但是看起來好像有其他的程序在占用這個Port

    C:Program Files (x86)Microsoft Visual Studio2017Enterprise>netstat -ona| find "9999"
      TCP    0.0.0.0:9999           0.0.0.0:0              LISTENING       19780
      TCP    [::]:9999              [::]:0                 LISTENING       19780
    C:Program Files (x86)Microsoft Visual Studio2017Enterprise>
     
    所以就要找到占用這個端口的進程并且把它Kill掉。
     
    1. 首先找到PID
     
    C:Program Files (x86)Microsoft Visual Studio2017Enterprise>netstat -ona
    Active Connections
      Proto  Local Address          Foreign Address        State           PID
      TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4
      TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       388
      TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
      TCP    0.0.0.0:2343           0.0.0.0:0              LISTENING       5448
      TCP    0.0.0.0:3580           0.0.0.0:0              LISTENING       5508
      TCP    0.0.0.0:3582           0.0.0.0:0              LISTENING       8228
      TCP    0.0.0.0:5040           0.0.0.0:0              LISTENING       11372
      TCP    0.0.0.0:5052           0.0.0.0:0              LISTENING       5164
      TCP    0.0.0.0:5053           0.0.0.0:0              LISTENING       5144
      TCP    0.0.0.0:5985           0.0.0.0:0              LISTENING       4
      TCP    0.0.0.0:7680           0.0.0.0:0              LISTENING       7144
      TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       5152
      TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       7436
      TCP    0.0.0.0:9999           0.0.0.0:0              LISTENING       19780
      TCP    0.0.0.0:11200          0.0.0.0:0              LISTENING       5652
      TCP    0.0.0.0:16422          0.0.0.0:0              LISTENING       5652
      TCP    0.0.0.0:16423          0.0.0.0:0              LISTENING       12996
     
    2.  結束這個PID
    taskkill /f /im 19780
     
    問題解決!
     
     
     參考:
    https://stackoverflow.com/questions/8688949/how-to-close-tcp-and-udp-ports-via-windows-command-line
     
  • 相关阅读:
    typescript
    heightChatrs
    数组的扩展
    es6函数扩展
    es6变量解构与函数解构
    C++ 编程技巧锦集(二)
    C++ 全排列
    C++ 编程技巧锦集(一)
    [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]列名 'user1' 无效
    2016年天梯赛初赛题集
  • 原文地址:https://www.cnblogs.com/fdyang/p/11572325.html
Copyright © 2011-2022 走看看