使用axios 去取数据的时候出现下面这种错误是啥原因
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用axios 去取数据的时候出现下面这种错误是啥原因相关的知识,希望对你有一定的参考价值。
参考技术A axios.interceptors.request.use(config =>// 每次取最新access_token
config.headers.common['Authorization'] = 'Bearer ' + getCookie('access_token')
if (config.method === 'post')
config.data = qs.stringify(config.data)
return config
, error =>
return Promise.reject(error)
)
传递的参数对象 config.data 中有一个属性special_rebates_from,它的值是Invalid Date,所以导致了这个错误
在使用clickhouse-jdbc的时候,查询数据的时候偶尔会遇到这个错误,不知道是啥原因?
【中文标题】在使用clickhouse-jdbc的时候,查询数据的时候偶尔会遇到这个错误,不知道是啥原因?【英文标题】:When using clickhouse-jdbc, I occasionally encounter this error when querying data, and I wonder what the reason is?在使用clickhouse-jdbc的时候,查询数据的时候偶尔会遇到这个错误,不知道是什么原因? 【发布时间】:2020-12-27 12:42:48 【问题描述】:ru.yandex.clickhouse.except.ClickHouseUnknownException: ClickHouse exception, code: 1002, host: xxx.xxx.xxx.xxx, port: 8123; xxx.xxx.xxx.xxx:8123 failed to respond
at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.getException(ClickHouseExceptionSpecifier.java:91)
at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:55)
at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:24)
at ru.yandex.clickhouse.ClickHouseStatementImpl.getInputStream(ClickHouseStatementImpl.java:633)
at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:117)
at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:100)
at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:95)
at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:90)
Caused by: org.apache.http.NoHttpResponseException: xxx.xxx.xxx.xxx:8123 failed to respond
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
at ru.yandex.clickhouse.ClickHouseStatementImpl.getInputStream(ClickHouseStatementImpl.java:614)
... 6 more
【问题讨论】:
【参考方案1】:这是 JDBC-driver https://github.com/ClickHouse/clickhouse-jdbc/issues/290 中的一个著名错误
【讨论】:
以上是关于使用axios 去取数据的时候出现下面这种错误是啥原因的主要内容,如果未能解决你的问题,请参考以下文章