不使用telnet进行端口测试的方法
不使用telnet进行端口测试的方法
- 测试通过样例
-
[root@ip203 ~]# curl -v 10.0.0.210:8082 * About to connect() to 10.0.0.210 port 8082 (#0) * Trying 10.0.0.210... * Connected to 10.0.0.210 (10.0.0.210) port 8082 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.29.0 > Host: 10.0.0.210:8082 > Accept: */* > < HTTP/1.1 200 OK < Content-Type: text/html < Cache-Control: no-cache < Content-Length: 938 < <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0, and the EPL 1.0 (https://h2database.com/html/license.html). Initial Developer: H2 Group --> <html><head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>H2 Console</title> <link rel="stylesheet" type="text/css" href="stylesheet.css" /> <script type="text/javascript"> location.href = 'login.jsp?jsessionid=08bd1aad6963961c7539fc4478a282a9'; </script> </head> <body style="margin: 20px;"> <h1>Welcome to H2</h1> <h2>No Javascript</h2> If you are not automatically redirected to the login page, then Javascript is currently disabled or your browser does not support Javascript. For this application to work, Javascript is essential. Please enable Javascript now, or use another web browser that supports it. </body></html> * Connection #0 to host 10.0.0.210 left intact [root@ip203 ~]#
-
- 测试不通过样例
-
[root@ip203 ~]# curl -v 10.0.0.210:8888 * About to connect() to 10.0.0.210 port 8888 (#0) * Trying 10.0.0.210... * 拒绝连接 * Failed connect to 10.0.0.210:8888; 拒绝连接 * Closing connection 0 curl: (7) Failed connect to 10.0.0.210:8888; 拒绝连接 [root@ip203 ~]#
原创文章,转载请说明出处,谢谢合作
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2022-03-13 请求服务器报 504 Geteway Time-out