-
Notifications
You must be signed in to change notification settings - Fork 104
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
你好, 不支持/nacos/v1/auth/users/login这个接口吗 #83
Comments
应该是支持的,你使用的是哪个版本? 如果是使用刚发布的0.5.8版本,那么可以切换到0.5.7试试。 我晚点也自己测试看看。 |
如果方便的话可以提供一下r-nacos和客户端的版本号,还有当时服务端的日志。 |
r-nacos: |
是的,正常来说应该没有问题,至少不会是超时。 你那边可以稳定复现吗? 我回去也用对应的客户端版本验证看看。 |
百分百复现 |
表现出来的是超时, 但是可以拿到值 以 启动, 就是等得时间很长 |
java.net.SocketTimeoutException: Read timed out
at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:288)
at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:314)
at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:355)
at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:808)
at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:244)
at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:343)
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:827)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:762)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1710)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1611)
at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:529)
at com.alibaba.nacos.common.http.client.response.JdkHttpClientResponse.getStatusCode(JdkHttpClientResponse.java:79)
at com.alibaba.nacos.common.http.client.handler.AbstractResponseHandler.handle(AbstractResponseHandler.java:43)
at com.alibaba.nacos.common.http.client.NacosRestTemplate.execute(NacosRestTemplate.java:483)
at com.alibaba.nacos.common.http.client.NacosRestTemplate.postForm(NacosRestTemplate.java:364)
at com.alibaba.nacos.client.auth.impl.process.HttpLoginProcessor.getResponse(HttpLoginProcessor.java:82)
at com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl.login(NacosClientAuthServiceImpl.java:85)
at com.alibaba.nacos.client.security.SecurityProxy.login(SecurityProxy.java:64)
at com.alibaba.nacos.client.config.impl.ConfigTransportClient.start(ConfigTransportClient.java:133)
at com.alibaba.nacos.client.config.impl.ClientWorker.<init>(ClientWorker.java:467)
at com.alibaba.nacos.client.config.NacosConfigService.<init>(NacosConfigService.java:83)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at com.alibaba.nacos.api.config.ConfigFactory.createConfigService(ConfigFactory.java:43)
at com.alibaba.nacos.api.NacosFactory.createConfigService(NacosFactory.java:44)
at org.apache.dubbo.metadata.store.nacos.NacosMetadataReport.buildConfigService(NacosMetadataReport.java:108)
at org.apache.dubbo.metadata.store.nacos.NacosMetadataReport.<init>(NacosMetadataReport.java:96)
at org.apache.dubbo.metadata.store.nacos.NacosMetadataReportFactory.createMetadataReport(NacosMetadataReportFactory.java:32)
at org.apache.dubbo.metadata.report.support.AbstractMetadataReportFactory.getMetadataReport(AbstractMetadataReportFactory.java:69)
at org.apache.dubbo.metadata.report.MetadataReportFactory$Adaptive.getMetadataReport(MetadataReportFactory$Adaptive.java)
at org.apache.dubbo.metadata.report.MetadataReportInstance.init(MetadataReportInstance.java:110)
at org.apache.dubbo.metadata.report.MetadataReportInstance.init(MetadataReportInstance.java:87)
at org.apache.dubbo.config.deploy.DefaultApplicationDeployer.startMetadataCenter(DefaultApplicationDeployer.java:331)
at org.apache.dubbo.config.deploy.DefaultApplicationDeployer.initialize(DefaultApplicationDeployer.java:231)
at org.apache.dubbo.config.deploy.DefaultModuleDeployer.prepare(DefaultModuleDeployer.java:638)
at org.apache.dubbo.config.spring.context.DubboConfigApplicationListener.initDubboConfigBeans(DubboConfigApplicationListener.java:85)
at org.apache.dubbo.config.spring.context.DubboConfigApplicationListener.init(DubboConfigApplicationListener.java:68)
at org.apache.dubbo.config.spring.context.DubboConfigApplicationListener.onApplicationEvent(DubboConfigApplicationListener.java:59)
at org.apache.dubbo.config.spring.context.DubboConfigApplicationListener.onApplicationEvent(DubboConfigApplicationListener.java:38)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:922)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:621)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568) |
收到,能复现应该就好处理。 晚上回去试试能否复现。 |
似乎是 |
请问一下现在 |
在0.5.7版本之前是的,在0.5.8之后支持通过配置RNACOS_ENABLE_OPEN_API_AUTH开启接口鉴权。 |
我这没能复现,环境: r-nacos v0.5.7, nacos-client 2.2.4,jdk 1.8, MacOS。 看起来你是用r-nacos v0.5.8就没有问题。 对于r-nacos v0.5.7 和你的超时问题,你可以试试打包出jar后单独运行,不要在idea中直接运行。 如果v0.5.8之后就没有问题,那么这个问题总的来说也算在新版解决了是吗? |
我的测试环境是 Windows10 + Spring Boot3 + Dubbo3 + Nacos Client 2.2.4
|
|
我看 但是这个接口启动到超时被请求了五六次, 前面都没问题, 感觉跟这个关系不大 我也尝试了最新版本的 |
你出问题时都是通过idea运行的吗? 有试过build jar出来单独运行做对比吗? 我这边目前暂时复现不出来。 如果你build出来验证还有问题的话,把问题场景单独抽出提供一个demo工程吗?这样我就可以用demo工程尝试复现。 |
1 similar comment
你出问题时都是通过idea运行的吗? 有试过build jar出来单独运行做对比吗? 我这边目前暂时复现不出来。 如果你build出来验证还有问题的话,把问题场景单独抽出提供一个demo工程吗?这样我就可以用demo工程尝试复现。 |
在Windows和Linux 容器都是build jar出来运行的 工程我晚上搞一下 |
我在家里测试单个服务(SpringBoot3 + Dubbo3 + v0.5.7)没问题, 我明天确认一下是公司框架问题还是多服务问题 |
好的。 另外明天我们公司小组开始outing要到周日回来,这段时间应该不会投入开发。 |
|
c.a.n.c.a.i.process.HttpLoginProcessor : [NacosClientAuthServiceImpl] login http request failed url: http://127.0.0.1:8848/nacos/v1/auth/users/login, params: {username=base}, bodyMap: {password=base}, errorMsg: Read timed out
直接访问该接口
HTTP ERROR 405
请问是否目前不支持该接口?
The text was updated successfully, but these errors were encountered: