首页 > 其他分享 > Find (and kill) process locking port 9000 on Mac

Find (and kill) process locking port 9000 on Mac

时间:2023-04-02 15:12:43浏览次数:26  
标签:process locking netstat itself kill 9000 lsof port

  1. You can try netstat

    netstat -vanp tcp | grep 9000
    
  2. For macOS El Capitan and newer (or if your netstat doesn't support -p), use lsof

    lsof -i tcp:9000
    sudo lsof -i :9000
    
  3. Kill:

    kill -9 <PID>
    

PLEASE NOTE: -9 kills the process immediately, and gives it no chance of cleaning up after itself. This may cause problems. Consider using -15 (TERM) or -3 (QUIT) for a softer termination which allows the process to clean up after itself.

标签:process,locking,netstat,itself,kill,9000,lsof,port
From: https://www.cnblogs.com/RioTian/p/17280506.html

相关文章

  • NonBlocking 非阻塞IO 状态下的实现单线程协程socket通信
    #服务器端#-*-coding:utf-8-*-importtimefromsocketimport*server=socket(AF_INET,SOCK_STREAM)server.bind(('127.0.0.1',8081))server.listen(5)server.setblocking(False)#至关重要的一步!!!conn_l=[]print('waiting...')whileTrue:......
  • import this Python之禅 20条准则
    运行importthis这句代码后返回的内容importthisTheZenofPython,byTimPetersBeautifulisbetterthanugly.Explicitisbetterthanimplicit.Simpleisbetterthancomplex.Complexisbetterthancomplicated.Flatisbetterthannested.Sparseisbette......
  • Perceptron, Support Vector Machine and Dual Optimization Problem (3)
    SupportVectorMachinesPerceptronandLinearSeparability假设存在一个lineardecisionboundary,它可以完美地对trainingdataset进行分割。那么,经由上述PerceptronAlgorithm计算,它将返回哪一条linearseparator?当linearseparator(即一个给定的超平面)的margi......
  • The remote name could not be resolved: 'report.dalabs.cn'
    1.在做程序的时候出现System.Net.WebException:Theremotenamecouldnotberesolved:'report.dalabs.cn'百度后得到以下方法:在webconfig文件里面添加代理配置:<system.net><defaultProxy><proxyusesystemdefault="True"proxyaddress="http://......
  • Microsoft Child Process Debugging Power Tool 插件
    使用VisualStudio2022调试Dapr应用程序 使用Dapr编写的是一个多进程的程序,两个进程之间依赖于启动顺序来组成父子进程,使用VisualStudio调试起来可能会比较困难,因为VisualStudio默认只会把你当前设置的启动项目的启动调试。好在有VisualStudio扩展(MicrosoftC......
  • git 报Failed to connect to 127.0.0.1 port 1081: Connection refused
    我遇到这个问题是我用了全局代理。导致了端口被占用了。提示的错误是 Failedtoconnectto127.0.0.1port1081:Connectionrefused解决办法:windows和mac都适用第一步查询是否使用了代理: 输入:gitconfig--globalhttp.proxy  你就会看到被占用的端口和报错的一......
  • 第二十六篇 vue - 深入组件 - 内置组件 - Teleport
    Teleport<Teleport>是一个内置组件,它可以将一个组件内部的一部分模板“传送”到该组件的DOM结构外层的位置去基本用法有时我们可能会遇到这样的场景:一个组件模板的一部分在逻辑上从属于该组件,但从整个应用视图的角度来看,它在DOM中应该被渲染在整个Vue应用外部的其他地方......
  • process.env.NODE_ENV 开发环境配置详解(Vue项目)
    开发环境与生产环境下切换baseURL增加.env.development文件NODE_ENV='development'VUE_APP_BASE_URL='/api'增加.env.development文件NODE_ENV='production'VUE_APP_BASE_URL=''使用constaxiosRequest=axios.create({base......
  • portainer-ce
    1》搜索镜像:dockersearchsummary/portainer-ce  2》拉取镜像:dockerpullsummary/portainer-ce3》启动镜像:dockerrun-d--name=portainer-ce-p9000:9000--restart=always-v/var/run/docker.sock:/var/run/docker.sock-v/data/portainer:/datasummary/po......
  • FIT5222 executing and pipelining processes
     FIT5222Assignment2:executingandpipeliningprocesses 1/4Assignment2:executingandpipeliningprocessesDue30Aprby23:59Points10Availableuntil4Mayat23:59OverviewAssignment2isnowavailable.It'sworth10%ofyouroverallmarkf......