You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "ShawnJim (via GitHub)" <gi...@apache.org> on 2023/11/02 09:22:30 UTC

[I] [BUG] [shenyu]

ShawnJim opened a new issue, #5268:
URL: https://github.com/apache/shenyu/issues/5268

   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Current Behavior
   
   throw error when registering with Eureka. 
   error log:
   ```
   Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java class com.netflix.appinfo.InstanceInfo, and Java type class com.netflix.appinfo.InstanceInfo, and MIME media type application/json was not found
   	at com.sun.jersey.api.client.RequestWriter$RequestEntityWriterImpl.<init>(RequestWriter.java:199)
   	at com.sun.jersey.api.client.RequestWriter.getRequestEntityWriter(RequestWriter.java:248)
   	at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.getHttpEntity(ApacheHttpClient4Handler.java:262)
   	at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.getUriHttpRequest(ApacheHttpClient4Handler.java:206)
   	at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:157)
   	at com.sun.jersey.api.client.Client.handle(Client.java:652)
   	at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
   	at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
   	at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:570)
   	at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.register(AbstractJerseyEurekaHttpClient.java:57)
   	at org.apache.shenyu.registry.eureka.EurekaInstanceRegisterRepository.persistInstance(EurekaInstanceRegisterRepository.java:71)
   	at org.apache.shenyu.registry.eureka.MainTest.main(MainTest.java:36)
   ```
   
   ### Expected Behavior
   
   Register normally.
   ![image](https://github.com/apache/shenyu/assets/32192263/9417fe09-d9d9-44e3-b069-aaa44f02549c)
   
   
   ### Steps To Reproduce
   
   On the master branch, run the test case code.
   
   ``` java
   public static void main(final String[] args) {
           EurekaInstanceRegisterRepository eurekaInstanceRegisterRepository = new EurekaInstanceRegisterRepository();
           RegisterConfig config = new RegisterConfig();
           config.setServerLists("http://localhost:8761/eureka/");
           eurekaInstanceRegisterRepository.init(config);
           InstanceEntity instanceEntity = new InstanceEntity("shenyu", "127.0.0.1", 12345);
           eurekaInstanceRegisterRepository.persistInstance(instanceEntity);
           while (true) {
               try {
                   Thread.sleep(1000);
               } catch (InterruptedException e) {
                   e.printStackTrace();
               }
           }
       }
   ```
   
   ### Environment
   
   ```markdown
   ShenYu version(s): 2.6.0
   ```
   
   
   ### Debug logs
   
   _No response_
   
   ### Anything else?
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] [shenyu]

Posted by "ShawnJim (via GitHub)" <gi...@apache.org>.
ShawnJim closed issue #5268: [BUG] <Fix the abnormal status when registering with Eureka through EurekaInstanceRegisterRepository#persistInstance.>
URL: https://github.com/apache/shenyu/issues/5268


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org