How can I kill whatever process is using port 8080 so that I can vagrant up?

后端 未结 11 1728
鱼传尺愫
鱼传尺愫 2020-12-07 07:13

On MacOSX, I\'m using Packer to build a Vagrant box so I need to continually bring it up and tear it down. I\'m attempting to \'vagrant up\', and receive the standard error

11条回答
  •  臣服心动
    2020-12-07 07:45

    I needed to run this command

    sudo lsof -i :80 # checks port 8080
    

    Then i got

    COMMAND   PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
    acwebseca 312 root   36u  IPv4 0x34ae935da20560c1      0t0  TCP 192.168.1.3:50585->104.25.53.12:http (ESTABLISHED)
    

    show which service is using the PID

    ps -ef 312
    

    Then I got this

      UID   PID  PPID   C STIME   TTY           TIME CMD
        0   312    58   0  9:32PM ??         0:02.70 /opt/cisco/anyconnect/bin/acwebsecagent -console
    

    To uninstall cisco web security agent run

    sudo /opt/cisco/anyconnect/bin/websecurity_uninstall.sh
    

    credits to: http://tobyaw.livejournal.com/315396.html

提交回复
热议问题