Skip to content

Instantly share code, notes, and snippets.

@paalss
Last active May 13, 2023 19:58
Show Gist options
  • Save paalss/90f44ca63142f6765904c5cec235e860 to your computer and use it in GitHub Desktop.
Save paalss/90f44ca63142f6765904c5cec235e860 to your computer and use it in GitHub Desktop.
finne ut hvilket program som bruker port

Finne prog med port

Eksempel

Scenario

Port er opptatt:

Pål Stakvik@Asus-VivoBook MINGW64 /c/xampp/htdocs/sider/annet/Ranking-app (master)
$ docker-compose up -d
Creating network "lamp_default" with the default driver
Creating lamp_adminer_1 ...
Creating lamp-redis     ...
Creating lamp-database  ... error
Creating lamp_adminer_1 ... done
Creating lamp-redis     ... done
ccess a socket in a way forbidden by its access permissions.

ERROR: for database  Cannot start service database: Ports are not available: listen tcp 127.0.0.1:3306: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
ERROR: Encountered errors while bringing up the project.

Finne hvillket program som bruker det

Pål Stakvik@Asus-VivoBook MINGW64 /c/xampp/htdocs/sider/annet/Ranking-app (master)
$ netstat -ano | findstr '3306'
  TCP    0.0.0.0:3306           0.0.0.0:0              LISTENING       5028
  TCP    [::]:3306              [::]:0                 LISTENING       5028

Pål Stakvik@Asus-VivoBook MINGW64 /c/xampp/htdocs/sider/annet/Ranking-app (master)
$ tasklist | findstr '5028'
mysqld.exe                    5028 Services                   0      4,144 K

Resultat

mysqld.exe

https://veerasundar.com/blog/2009/10/how-to-check-which-application-is-using-which-port/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment