Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: IP地址查询接口503问题 #200

Merged
merged 2 commits into from
Jan 17, 2024
Merged

fix: IP地址查询接口503问题 #200

merged 2 commits into from
Jan 17, 2024

Conversation

Garnerye
Copy link
Contributor

@Garnerye Garnerye commented Jan 12, 2024

修复【IP地址查询接口】不支持低版本User-Agent请求头标识

错误日志

15:23:44.888 [schedule-pool-2] ERROR c.o.c.c.u.h.HttpUtils - [sendGet,89] - 调用HttpUtils.sendGet IOException, url=http://whois.pconline.com.cn/ipJson.jsp,param=ip=***&json=true
java.io.IOException: Server returned HTTP response code: 503 for URL: http://whois.pconline.com.cn/ipJson.jsp?ip=****&json=true
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
	at com.oddfar.campus.common.utils.http.HttpUtils.sendGet(HttpUtils.java:71)
	at com.oddfar.campus.common.utils.ip.AddressUtils.getRealAddressByIP(AddressUtils.java:33)
	at com.oddfar.campus.framework.manager.AsyncFactory$1.run(AsyncFactory.java:45)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

503异常响应

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>

<head>
    <title>503 Service Temporarily Unavailable</title>
</head>

<body>
    <center>
        <h1>503 Service Temporarily Unavailable</h1>
    </center>
    <hr />Powered by Tengine
    <hr>
    <center>tengine</center>
</body>
</html>

@oddfar oddfar linked an issue Jan 12, 2024 that may be closed by this pull request
@oddfar oddfar merged commit 74d2e9f into oddfar:master Jan 17, 2024
webees added a commit to webees/moutai that referenced this pull request Jan 17, 2024
fix: IP地址查询接口503问题 (oddfar#200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

调用HttpUtils.sendGet IOException
2 participants