{"id":2500,"date":"2017-07-29T08:50:42","date_gmt":"2017-07-29T08:50:42","guid":{"rendered":"http:\/\/thichblog.net\/?p=2500"},"modified":"2017-07-29T08:50:42","modified_gmt":"2017-07-29T08:50:42","slug":"cach-tim-process-dang-chay-tren-port-trong-windows-linux-va-mac","status":"publish","type":"post","link":"https:\/\/vibeshelf.me\/?p=2500","title":{"rendered":"C\u00e1ch t\u00ecm process \u0111ang ch\u1ea1y tr\u00ean port trong Windows, Linux v\u00e0 MAC"},"content":{"rendered":"<p>Trong qu\u00e1 tr\u00ecnh l\u00e0m vi\u1ec7c s\u1ebd c\u00f3 l\u00fac m\u00ecnh g\u1eb7p l\u1ed7i v\u00ed d\u1ee5 nh\u01b0 kh\u00f4ng start \u0111\u01b0\u1ee3c server do port \u0111ang \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng b\u1edfi m\u1ed9t process n\u00e0o kh\u00e1c, nh\u01b0 v\u00ed d\u1ee5 nh\u01b0 h\u00ecnh b\u00ean d\u01b0\u1edbi khi m\u00ecnh start Tomcat trong Eclipse:<\/p>\n<p>\u0110\u1ec3 gi\u1ea3i quy\u1ebft l\u1ed7i n\u00e0y, m\u00ecnh c\u1ea7n kill process \u0111ang ch\u1ea1y tr\u00ean port \u0111\u00f3. Sau \u0111\u00e2y l\u00e0 m\u1ed9t v\u00e0i command \u0111\u1ec3 t\u00ecm ra process \u0111ang ch\u1ea1y tr\u00ean port v\u00e0 kill n\u00f3 tr\u00ean Windows, Linux, MAC.<\/p>\n<p><span style=\"color: #0000ff;\"><strong>Windows:<\/strong><\/span><\/p>\n<p>V\u00e0o command line (Windows + R -&gt; G\u00f5 cmd -&gt; Enter)<br \/>\n<strong>netstat -ano | findstr :&lt;&lt;port&gt;&gt;<\/strong><br \/>\n<strong> taskkill \/PID &lt;&lt;process_id&gt;&gt; \/F<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #0000ff;\"><strong>Linux:<\/strong><\/span><\/p>\n<p>V\u00e0o command line (Application -&gt; Terminal)<br \/>\n<strong>netstat -nlp|grep &lt;&lt;port&gt;&gt;<\/strong><br \/>\n<strong> kill -9 &lt;&lt;process_id&gt;&gt;<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #0000ff;\"><strong>MAC:<\/strong><\/span><br \/>\n<strong>lsof -n -i4TCP:8080<\/strong><\/p>\n<p><strong>kill -9 &lt;&lt;process_id&gt;&gt;<\/strong><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Trong qu\u00e1 tr\u00ecnh l\u00e0m vi\u1ec7c s\u1ebd c\u00f3 l\u00fac m\u00ecnh g\u1eb7p l\u1ed7i v\u00ed d\u1ee5 nh\u01b0 kh\u00f4ng start \u0111\u01b0\u1ee3c server do port \u0111ang \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng b\u1edfi m\u1ed9t process n\u00e0o kh\u00e1c, nh\u01b0 v\u00ed d\u1ee5 nh\u01b0 h\u00ecnh b\u00ean d\u01b0\u1edbi khi m\u00ecnh start Tomcat trong Eclipse: \u0110\u1ec3 gi\u1ea3i quy\u1ebft l\u1ed7i n\u00e0y, m\u00ecnh c\u1ea7n kill process \u0111ang ch\u1ea1y tr\u00ean port [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3482,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[331],"class_list":["post-2500","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-testing","tag-kiem-thu-phan-mem"],"_links":{"self":[{"href":"https:\/\/vibeshelf.me\/index.php?rest_route=\/wp\/v2\/posts\/2500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vibeshelf.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vibeshelf.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vibeshelf.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vibeshelf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2500"}],"version-history":[{"count":0,"href":"https:\/\/vibeshelf.me\/index.php?rest_route=\/wp\/v2\/posts\/2500\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vibeshelf.me\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"https:\/\/vibeshelf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vibeshelf.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vibeshelf.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}