","opts":{"alwaysThrow":false,"compatibilityMode":false,"copyButtons":true,"correctnewlines":false,"markdownOptions":{"fences":true,"commonmark":true,"gfm":true,"ruleSpaces":false,"listItemIndent":"1","spacedTable":true,"paddedTable":true},"normalize":true,"lazyImages":true,"reusableContent":{"tags":{}},"safeMode":false,"settings":{"position":false},"theme":"light"},"terms":[{"_id":"636d314a7b2cc300312af862","term":"parliament","definition":"Owls are generally solitary, but when seen together the group is called a 'parliament'!"}],"variables":{"user":{},"defaults":[{"source":"security","_id":"641e10ffd239e90035bb5928","name":"api_key","type":"apiKey","apiSetting":"641e10fed239e90035bb5923"},{"source":"security","_id":"641e10ffd239e90035bb5927","name":"petstore_auth","type":"oauth2","apiSetting":"641e10fed239e90035bb5923"},null,{"source":"security","_id":"645a798c3273ad32563c4726","name":"noauthAuth","type":"http","scheme":"noauth","apiSetting":"645a798b3273ad32563c4724"}]},"dehydrated":{"toc":"
body:
\n"}},"doc":{"metadata":{"image":[],"title":"","description":"","keywords":"","robots":"index"},"api":{"method":"get","url":"","auth":"required","params":[]},"next":{"description":"","pages":[]},"algolia":{"recordCount":4,"publishPending":false,"updatedAt":"2023-09-07T08:02:07.620Z"},"title":"Check listening ports with netstat","icon":"","updates":[],"type":"basic","slug":"checking-listening-ports-with-netstat","excerpt":"","body":"If you're troubleshooting a service that you know [is running normally](/support/how-to/checking-system-load-on-linux),\r\nthe next step is to ensure it's listening on the correct network port.\r\n\r\nThe `netstat` command shows the services listening to ports on a Linux\r\nserver and the details of any connections currently made to them.\r\nThe connection details to consider during basic network daemon\r\ntroubleshooting are the addresses that the daemon is listening on (including\r\nthe port number), the daemon's process identifier (PID), and the program\r\nname.\r\n\r\nYou need to run `netstat` on the server that is running the service.\r\n`Netstat` is not affected by your firewall configuration.\r\n\r\n**Note:** You can also use the `lsof` and `ss` commands to check ports.文章中包含的许多命令标志与运行sof命令和ss命令时相同输出使用时返回这些命令可能与 Netstat工具输出不相似For more information about both commands, see the [`lsof`](https://linux.die.net/man/8/lsof) and [`ss`](https://linux.die.net/man/8/ss) command manuals.\r\n\r\n### Check ports\r\n\r\nTo list the TCP ports that are being listened on, and the name of\r\neach listener's daemon and its PID, run the following command:\r\n\r\n sudo netstat -plnt\r\n\r\nThe following example shows the output for three common programs\r\nthat are listening on three different sockets.\r\n\r\n $ sudo netstat -plnt\r\n Active Internet connections (only servers)\r\n Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name\r\n tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 3686/mysqld\r\n tcp 0 0 :::443 :::* LISTEN 2218/httpd\r\n tcp 0 0 :::80 :::* LISTEN 2218/httpd\r\n tcp 0 0 :::22 :::* LISTEN 1051/sshd\r\n\r\n### Filter the list\r\n\r\nIf the list of listening daemons is long, you can use `grep` to filter it.\r\nFor example, to filter out everything except the default web server port `80`, run the following command:\r\n\r\n $ sudo netstat -plnt | grep ':80'\r\n tcp 0 0 :::80 :::* LISTEN 8448/httpd\r\n\r\n### Analyze the results\r\n\r\nCommon outcomes include the following results:\r\n\r\n- Nothing is listening on the port.检查服务配置rn文件并重开服务.\r\n-正确服务正监听正确端口在此例中,您需要更彻底测试服务 。support/how-to/servation-web-service-wittcat.\r\n-serviceservice objectivesNetstat显示端口免费后,启动正确服务(例如sudervicevsftpd start.)\r\r\nNetstat不显示正确端口程序时, 需要先处理程序配置问题, 然后再继续.\r\nr\n
华体会联盟hth","order":59,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"reusableContent":[],"previousSlug":"","slugUpdatedAt":"2023-05-05T07:31:11.389Z","revision":41,"_id":"6454d290f4b1d40b5c95ce36","lastUpdatedHash":"76896fffb82f1c328f42262eb96895d21d150d48","project":"636d314a7b2cc300312af861","user":"5af39863989da435b05d284e","category":{"title":"Public Cloud","slug":"public-cloud","order":9999,"reference":false,"_id":"64107a7fee1584001f61f947","project":"636d314a7b2cc300312af861","version":"636d314a7b2cc300312af866","createdAt":"2023-03-14T13:45:35.452Z","__v":0,"type":"guide","id":"64107a7fee1584001f61f947"},"createdAt":"2023-05-05T09:55:28.925Z","updatedAt":"2023-12-11T16:13:00.538Z","version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["636d314a7b2cc300312af868","636d314a7b2cc300312af868","6372011ade7b7600a2343971","63726bb1975454004c244cf0","6376be12127d9900031599e1","63774b1d9eef4a00e5b62f18","63ff1e02b3738700445b26b4","63ff83dd43c817007346d470","64107a6ff9a9400061fb465a","64107a750b81930011506490","64107a79fc13c0005ed4836d","64107a7c9cf8520011a62bd9","64107a7fee1584001f61f947","641082b90f3ef4000b43ef26","641e010c3515610d761cf71d","641e0fe685ebf8003c2ac2e9","641e1030fe15970059b83d7a","641e10fed239e90035bb5924","643976eb94d370000deca9c5","643eb4d1f195600074707bde","643edb1078e8af00581d6025","6446e6cd4c6c320012421eba","64471a0483c65f003cc90679","6447fa1204508d167ad74187","644acc292835070056a1ffc2","64512c3398180c0032bcebc2","64516fe83f49d100296cd1bd","645171e4f1fb03006c7ee494","6451751e0ac9da001158d36a","64518259f068f50477d88696","64528ac2439fe20018a1136d","64529bbd1df7160064bb4130","6452a2c25889bb0c1e2603c2","6452a5b8154b870116b0541c","6452a5d3173e670068a40e04","6452a5f3254968001a6a8591","6452a6785abf210bdfe90146","6452b20b90709a0e007dcd10","6452b55b5a587200583ffd21","6452d52eeccf7c03cc275a95","645374b2c2a2640527e72fa2","6453b5166cb45618d546ca72","645477a8f90ece004ad0f609","6454aee1a6984a002f419059","6454af754df037000a477f38","64550c22aed895000b35e4e5","64551057a6984a002f47639f","645531b975d48b11b616e04c","645539b8f98098150309e05b","645544ce03e4210923c460e0","645546ff818fde20d9540305","645547eb6c0fef1e25749bfd","645549398c26ca0825a54daa","6455499c590d5d004bed6ea4","64554a2643d50200424c949f","64554a49f549ec00603ffca9","64554a62e79d4d158bb7c7e6","6455542d375c23005fe8b0e6","64555468d1f36d1496d6cdc8","64555815aa3ef3004371a359","6455593a98a9f21f277c445e","645560f1397690015ef4605f","6455702c1fbcf7000aa29af8","6458746a53771c01d5540ea1","64587a7f5cc705003d964d2c","645882b110a29802bb76f633","6458a6b24e80bc00745061e5","6458c4a6b80425005fe1eab2","6458c7173e18d001d7e62202","6458d57d5aa615002563ce8b","6458d6aae642620012783f2b","64598b4afed949000a631205","6459f83ed3e7e41076e6f7ac","645a3186b28e5e1e83d7eb1a","645a69297458df011aa5e228","645a6e07e142ac003c199287","645a6ea1872f3e322bf9a1d3","645a798b3273ad32563c4725","645af6e9f35aa90ad1fd945f","645b585b6e8a3009c63793dd","645b9f6da30de608fe6a9a18","645ba1b6d34aea1c2d16b0e9","645cf4ad9fa1110a67ad1e44","6466c9be6219af0a2dce7bf6","6466df1311b66b09ca7824eb","646b7817157f4b0074ef0969","6476362675a20e0044c3806f","64763e486eb59e0074e36589","6476402c373b6d00239d7529","647641c860cf5f004b98257b","647670afde4a1500494a9afa","6476d61c7fb8dd000a4ba53e","6476df870c36a3004e86c355","64810347dea925001e9966a5","648173085c2c33002f3852ba","648174fe92e2fc0baa3e8257","648b1684be1002180b500145","6491634b44859c00253786f9","649d7050b8a47e003cc16e70","64e3258b6436f0002c5898d5","64e71501135f560041d1fe15","651592d5e816a81977972e97","6554f620ea420b004e5e098b","657b1ac6ee3b67003015b961","658a89e0d696ad001c089aa2"],"_id":"636d314a7b2cc300312af866","project":"636d314a7b2cc300312af861","releaseDate":"2022-11-10T17:13:46.826Z","createdAt":"2022-11-10T17:13:46.826Z","__v":1,"updatedAt":"2023-12-26T08:08:00.624Z"},"__v":1,"parentDoc":"646721ee069cce07a369a274","isApi":false,"tutorials":[],"id":"6454d290f4b1d40b5c95ce36"},"hideTOC":false,"meta":{"slug":"checking-listening-ports-with-netstat","type":"docs","parent":"646721ee069cce07a369a274","image":[],"title":"Check listening ports with netstat","title_seo":"Check listening ports with netstat","description":"If you're troubleshooting a service that you know is running normally,the next step is to ensure it's listening on the correct network port.The netstat command shows the services listening to ports on a Linuxserver and the details of any connections currently made to them.The connection details to c...","keywords":"","robots":"index","_id":"6454d290f4b1d40b5c95ce36","hidden":false},"slugUrl":"/docs/checking-listening-ports-with-netstat","config":{"algoliaIndex":"readme_search_v2","amplitude":"dc8065a65ef83d6ad23e37aaf014fc84","asset_url":"https://cdn.readme.io","domain":"readme.io","domainFull":"https://dash.readme.com","encryptedLocalStorageKey":"ekfls","fullstory":{"enabled":true},"metrics":{"dashUrl":"https://m.readme.io","defaultUrl":"https://metrics.readme.io","exportMaxRetries":12,"wsUrl":"wss://m.readme.io"},"readmeRecaptchaSiteKey":"6LesVBYpAAAAAESOCHOyo2kF9SZXPVb54Nwf3i2x","releaseVersion":"4.565.0","sentry":{"dsn":"https://3bbe57a973254129bcb93e47dc0cc46f@o343074.ingest.sentry.io/2052166","enabled":true,"tracesSampleRate":0},"sslGenerationService":"ssl.readmessl.com"},"context":{"labs":{},"user":{},"terms":[{"_id":"636d314a7b2cc300312af862","term":"parliament","definition":"Owls are generally solitary, but when seen together the group is called a 'parliament'!"}],"variables":{"user":{},"defaults":[{"source":"security","_id":"641e10ffd239e90035bb5928","name":"api_key","type":"apiKey","apiSetting":"641e10fed239e90035bb5923"},{"source":"security","_id":"641e10ffd239e90035bb5927","name":"petstore_auth","type":"oauth2","apiSetting":"641e10fed239e90035bb5923"},null,{"source":"security","_id":"645a798c3273ad32563c4726","name":"noauthAuth","type":"http","scheme":"noauth","apiSetting":"645a798b3273ad32563c4724"}]},"project":{"_id":"636d314a7b2cc300312af861","appearance":{"rdmd":{"callouts":{"useIconFont":false},"theme":{"background":"","border":"","markdownEdge":"","markdownFont":"","markdownFontSize":"","markdownLineHeight":"","markdownRadius":"","markdownText":"","markdownTitle":"","markdownTitleFont":"","mdCodeBackground":"","mdCodeFont":"","mdCodeRadius":"","mdCodeTabs":"","mdCodeText":"","tableEdges":"","tableHead":"","tableHeadText":"","tableRow":"","tableStripe":"","tableText":"","text":"","title":""}},"main_body":{"type":"links"},"colors":{"highlight":"","main":"#000000","main_alt":"","header_text":"","body_highlight":"#367ED4","custom_login_link_color":""},"typography":{"headline":"Open+Sans:400:sans-serif","body":"Open+Sans:400:sans-serif","typekit":false,"tk_key":"","tk_headline":"","tk_body":""},"header":{"style":"custom","img":["https://files.readme.io/931b99b-banner.png","931b99b-banner.png",1253,218,"#000000",null,"647fedd793c708000af4eb4f"],"img_size":"cover","img_pos":"tl"},"body":{"style":"none"},"global_landing_page":{"html":"","redirect":""},"referenceSimpleMode":true,"referenceLayout":"row","link_logo_to_url":true,"theme":"solid","colorScheme":"light","overlay":"triangles","landing":true,"sticky":false,"hide_logo":true,"childrenAsPills":false,"subheaderStyle":"links","splitReferenceDocs":false,"showMetricsInReference":true,"logo":["https://files.readme.io/45785f4-brandmark-blue.svg","readme.svg",60,60,"#048ef5"],"loginLogo":[],"logo_white":["https://files.readme.io/b36afb9-small-Rackspace_Technology_Logo_RGB_WHT.png","Rackspace_Technology_Logo_RGB_WHT.png",259,80,"#ffffff","https://files.readme.io/c51eb39-Rackspace_Technology_Logo_RGB_WHT.png"],"logo_white_use":true,"logo_large":true,"favicon":["https://files.readme.io/03d0889-favicon.ico","favicon.ico",32,32,"#000000"],"stylesheet":"","stylesheet_hub2":"@media (max-width: 390px) {\n .Header-left-nav2xWPWMNHOGf_ {\n\t\tdisplay: none !important;\n }\n}\n\n@media (max-width: 768px) {\n .rm-SearchToggle {\n \twidth: unset !important;\n }\n}\n\nh2,\nh3,\nh4,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4 {\n\tcolor: #64005A !important;\n}\n\n/*----------------------------\nGlobal Header Changes\n-----------------------------*/\n.App header .rm-Container {\n max-width: inherit;\n}\n\n/*----------------------------\nCustom 404 Error Page Styles\n----------------------------*/\n\n.rm-LandingPageHeader h1 {\n color: white;\n}\n\nheader .rm-Container.rm-Container_flex {\n\tbackground-color: black;\n}\n\n.custom-page-not-found-message {\n\ttext-align: center;\n}\n\n.custom-page-not-found-message ul,\n.custom-page-not-found-message ul li {\n\ttext-align: initial;\n}\n\n.centered-list {\n\tpadding: 0 30%;\n}\n\n.rm-CustomPage h1 {\n\twidth: 100%;\n position: relative;\n text-align: center;\n}\n.rm-CustomPage h1::before {\n content: \"\";\n display: block;\n\tbackground-image: url(\"https://files.readme.io/6228383-No-Result-Found.png\");\n height: 100px;\n margin-bottom: 2rem;\n text-align: center;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n\nfooter {\n background-color: #3B3F45;\n color: $color-white;\n font-size: 0.8rem;\n letter-spacing: 0.025em;\n position: relative;\n z-index: 1;\n text-align: left;\n}\n\nfooter .container {\n\tdisplay: flex;\n flex-wrap: wrap;\n}\n\nfooter .basement-container {\n\tflex: 0 100%;\n background-color: black;\n}\n\nfooter .markdown-body {\n\tmargin: 40px;\n}\n\nfooter .markdown-body h5 {\n color: white;\n font-size: 10px;\n}\nfooter ul {\n float: left;\n}\nfooter li {\n\tlist-style: none;\n}\nfooter li a {\n\ttext-decoration: none;\n}\n\n/* #hub-sidebar {display: none;} */","stylesheet_hub3":"","javascript":"","javascript_hub2":"","html_promo":"","html_body":"","html_footer":"