You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/10/23 14:23:43 UTC

[GitHub] [dubbo] melin opened a new issue, #10795: spring boot dubbo 3.1.1 启动输出错误信息

melin opened a new issue, #10795:
URL: https://github.com/apache/dubbo/issues/10795

   triple 协议provider 和 consumer 启动报错,
   ```java
   @DubboService()
   public class GrpcGreeterImpl extends DubboGreeterTriple.GreeterImplBase {
   
       @Override
       public HelloReply sayHello(HelloRequest request) {
           System.out.println("Executing thread is " + Thread.currentThread().getName());
           return HelloReply.newBuilder().setMessage("Hello " + request.getName()).build();
       }
   }
   
   ```
   application.yml
   ```yaml
   dubbo:
     application:
       name: dubbo-springboot-demo-provider
     protocol:
       name: tri
     registry:
       id: zk-registry
       address: zookeeper://127.0.0.1:2181
     config-center:
       address: zookeeper://127.0.0.1:2181
     metadata-report:
       address: zookeeper://127.0.0.1:2181
   server:
     port: 8181
   
   ```
   
   
   ```
   [23/10/22 22:16:20:462 CST] main  INFO metadata.MappingCacheManager:  [DUBBO] Successfully loaded mapping cache from file .mapping.dubbo-springboot-demo-provider, entries 0, dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:469 CST] main  INFO migration.MigrationRuleListener:  [DUBBO] Listening for migration rules on dataId dubbo-springboot-demo-provider.migration, group DUBBO_SERVICEDISCOVERY_MIGRATION, dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:471 CST] main  INFO config.ServiceConfig:  [DUBBO] Register dubbo service io.grpc.examples.helloworld.Greeter url tri://192.168.3.82:50051/io.grpc.examples.helloworld.Greeter?anyhost=true&application=dubbo-springboot-demo-provider&background=false&bind.ip=192.168.3.82&bind.port=50051&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=io.grpc.examples.helloworld.Greeter&ipv6=240e:390:e7a:94e1:7459:943:8f16:2&ispuserver=true&methods=sayHello,sayHelloAsync&pid=7789&proxy=nativestub&qos.enable=false&release=3.1.1&service-name-mapping=true&side=provider&timestamp=1666534580196 to registry 127.0.0.1:2181, dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:471 CST] main  INFO protocol.QosProtocolWrapper:  [DUBBO] qos won't be started because it is disabled. Please check dubbo.application.qos.enable is configured either in system property, dubbo.properties or XML/spring-boot configuration., dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:474 CST] main  INFO zookeeper.ZookeeperRegistry:  [DUBBO] Loaded registry cache file /Users/melin/.dubbo/dubbo-registry-dubbo-springboot-demo-provider-127.0.0.1-2181.cache, dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:475 CST] main  INFO zookeeper.ZookeeperTransporter:  [DUBBO] find valid zookeeper client from the cache for address: zookeeper://127.0.0.1:2181/org.apache.dubbo.registry.RegistryService?REGISTRY_CLUSTER=zk-registry&application=dubbo-springboot-demo-provider&dubbo=2.0.2&interface=org.apache.dubbo.registry.RegistryService&pid=7789&proxy=nativestub&qos.enable=false&release=3.1.1, dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:476 CST] main  INFO zookeeper.ZookeeperRegistry:  [DUBBO] Register: tri://192.168.3.82:50051/io.grpc.examples.helloworld.Greeter?anyhost=true&application=dubbo-springboot-demo-provider&background=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=io.grpc.examples.helloworld.Greeter&ipv6=240e:390:e7a:94e1:7459:943:8f16:2&ispuserver=true&methods=sayHello,sayHelloAsync&pid=7789&proxy=nativestub&release=3.1.1&service-name-mapping=true&side=provider&timestamp=1666534580196, dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:488 CST] main  INFO zookeeper.ZookeeperRegistry:  [DUBBO] Subscribe: provider://192.168.3.82:50051/io.grpc.examples.helloworld.Greeter?anyhost=true&application=dubbo-springboot-demo-provider&background=false&bind.ip=192.168.3.82&bind.port=50051&category=configurators&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=io.grpc.examples.helloworld.Greeter&ipv6=240e:390:e7a:94e1:7459:943:8f16:2&ispuserver=true&methods=sayHello,sayHelloAsync&pid=7789&proxy=nativestub&qos.enable=false&release=3.1.1&service-name-mapping=true&side=provider&timestamp=1666534580196, dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:519 CST] main  INFO zookeeper.ZookeeperRegistry:  [DUBBO] Notify urls for subscribe url provider://192.168.3.82:50051/io.grpc.examples.helloworld.Greeter?anyhost=true&application=dubbo-springboot-demo-provider&background=false&bind.ip=192.168.3.82&bind.port=50051&category=configurators&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=io.grpc.examples.helloworld.Greeter&ipv6=240e:390:e7a:94e1:7459:943:8f16:2&ispuserver=true&methods=sayHello,sayHelloAsync&pid=7789&proxy=nativestub&qos.enable=false&release=3.1.1&service-name-mapping=true&side=provider&timestamp=1666534580196, url size: 1, dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:573 CST] DubboSaveMetadataReport-thread-1  INFO zookeeper.ZookeeperMetadataReport:  [DUBBO] store provider metadata. Identifier : org.apache.dubbo.metadata.report.identifier.MetadataIdentifier@3b021fc2; definition: FullServiceDefinition{parameters=org.apache.dubbo.common.url.component.URLParam$URLParamMap@8993b4fe} ServiceDefinition [canonicalName=io.grpc.examples.helloworld.Greeter, codeSource=file:/Users/melin/Documents/codes/examples/spring-dubbo-grpc-rest/interface/target/classes/, methods=[MethodDefinition [name=sayHelloAsync, parameterTypes=[io.grpc.examples.helloworld.HelloRequest], returnType=java.util.concurrent.CompletableFuture], MethodDefinition [name=sayHello, parameterTypes=[io.grpc.examples.helloworld.HelloRequest], returnType=io.grpc.examples.helloworld.HelloReply], MethodDefinition [name=sayHello, parameterTypes=[io.grpc.examples.helloworld.HelloRequest, org.apache.dubbo.common.stream.StreamObserver], returnType=void]]], dubbo version: 3.1.1, cu
 rrent host: 192.168.3.82
   [23/10/22 22:16:20:586 CST] main  INFO config.ServiceConfig:  [DUBBO] Successfully registered interface application mapping for service io.grpc.examples.helloworld.Greeter, dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:589 CST] main  INFO deploy.DefaultModuleDeployer:  [DUBBO] Dubbo Module[1.1.0] is starting., dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:590 CST] main  INFO deploy.DefaultModuleDeployer:  [DUBBO] Dubbo Module[1.1.0] has started., dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:590 CST] main  INFO deploy.DefaultModuleDeployer:  [DUBBO] Dubbo Module[1.1.1] has started., dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:592 CST] main  INFO metadata.ConfigurableMetadataServiceExporter:  [DUBBO] Metadata Service Port hasn't been set will use default protocol defined in protocols., dubbo version: 3.1.1, current host: 192.168.3.82
   [23/10/22 22:16:20:598 CST] main ERROR metadata.ConfigurableMetadataServiceExporter:  [DUBBO] Failed to find any valid protocol, will use random port to export metadata service., dubbo version: 3.1.1, current host: 192.168.3.82, error code: 5-16. This may be caused by invalid specified dubbo  protocol, go to https://dubbo.apache.org/faq/5/16 to find instructions. 
   java.util.NoSuchElementException: No value present
   	at java.util.Optional.get(Optional.java:135)
   	at org.apache.dubbo.config.metadata.ConfigurableMetadataServiceExporter.getProtocolConfig(ConfigurableMetadataServiceExporter.java:104)
   	at org.apache.dubbo.config.metadata.ConfigurableMetadataServiceExporter.generateMetadataProtocol(ConfigurableMetadataServiceExporter.java:136)
   	at org.apache.dubbo.config.metadata.ConfigurableMetadataServiceExporter.buildServiceConfig(ConfigurableMetadataServiceExporter.java:194)
   	at org.apache.dubbo.config.metadata.ConfigurableMetadataServiceExporter.export(ConfigurableMetadataServiceExporter.java:71)
   	at org.apache.dubbo.config.metadata.ExporterDeployListener.onModuleStarted(ExporterDeployListener.java:71)
   	at org.apache.dubbo.config.deploy.DefaultApplicationDeployer.exportMetadataService(DefaultApplicationDeployer.java:924)
   	at org.apache.dubbo.config.deploy.DefaultApplicationDeployer.prepareApplicationInstance(DefaultApplicationDeployer.java:615)
   	at org.apache.dubbo.config.deploy.DefaultApplicationDeployer.checkState(DefaultApplicationDeployer.java:825)
   	at org.apache.dubbo.config.deploy.DefaultApplicationDeployer.notifyModuleChanged(DefaultApplicationDeployer.java:813)
   	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.onModuleStarted(DefaultModuleDeployer.java:262)
   	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.startSync(DefaultModuleDeployer.java:169)
   	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.start(DefaultModuleDeployer.java:137)
   	at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onContextRefreshedEvent(DubboDeployApplicationListener.java:112)
   	at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:101)
   	at org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:46)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
   	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
   	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
   	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:938)
   	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586)
   	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
   	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
   	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
   	at com.example.ProviderApplication.main(ProviderApplication.java:14)
   [23/10/22 22:16:20:603 CST] main  INFO metadata.ConfigurableMetadataServiceExporter:  [DUBBO] Using dubbo protocol to export metadata service on port -1, dubbo version: 3.1.1, current host: 192.168.3.82
   ```


-- 
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@dubbo.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] liufeiyu1002 commented on issue #10795: spring boot dubbo 3.1.1 启动输出错误信息

Posted by GitBox <gi...@apache.org>.
liufeiyu1002 commented on issue #10795:
URL: https://github.com/apache/dubbo/issues/10795#issuecomment-1288763352

   这个问题是由 我们指定了 protocol为  非 dubbo 协议 
   ```dubbo:
     application:
       name: dubbo-springboot-demo-provider
      #metadata-service-protocol: tri 指定metadata协议
     protocol:
       name: tri
     registry:
       id: zk-registry
       address: zookeeper://127.0.0.1:2181
     config-center:
       address: zookeeper://127.0.0.1:2181
     metadata-report:
       address: zookeeper://127.0.0.1:2181
   server:
     port: 8181
   ```
   且没有全局指定 `metadata-service-protocol` 配置,
   metadata 会默认使用 dubbo协议
   ![image](https://user-images.githubusercontent.com/32605119/197498626-20db2f5f-22d2-4013-80d5-d7b84759a7a2.png)
   在后续获取 protocol 配置中 ,并没有找到dubbo类型的协议
   ![image](https://user-images.githubusercontent.com/32605119/197498802-b0d247d8-a8ae-42a1-b4fa-5c4f4d455bbd.png)
   即调用 optional.get 会抛出 
   ![image](https://user-images.githubusercontent.com/32605119/197498978-fab1b59e-afb6-4333-b964-fc3a80127ee7.png)
   


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] melin commented on issue #10795: spring boot dubbo 3.1.1 启动输出错误信息

Posted by GitBox <gi...@apache.org>.
melin commented on issue #10795:
URL: https://github.com/apache/dubbo/issues/10795#issuecomment-1289856069

   谢谢,已解决


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] liufeiyu1002 commented on issue #10795: spring boot dubbo 3.1.1 启动输出错误信息

Posted by GitBox <gi...@apache.org>.
liufeiyu1002 commented on issue #10795:
URL: https://github.com/apache/dubbo/issues/10795#issuecomment-1288766419

   这里没指定 metadata 协议 port 的时候 是使用用户指定的应用协议呢? 还是保持现在的 默认使用dubbo 但是 优化下 错误 提示


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #10795: spring boot dubbo 3.1.1 启动输出错误信息

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #10795:
URL: https://github.com/apache/dubbo/issues/10795#issuecomment-1288359526

   Maybe we should enhance this error message


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] melin commented on issue #10795: spring boot dubbo 3.1.1 启动输出错误信息

Posted by GitBox <gi...@apache.org>.
melin commented on issue #10795:
URL: https://github.com/apache/dubbo/issues/10795#issuecomment-1288408493

   [spring-dubbo-grpc-rest.zip](https://github.com/apache/dubbo/files/9848756/spring-dubbo-grpc-rest.zip)
   @AlbumenJ  完整工程代码


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] melin commented on issue #10795: spring boot dubbo 3.1.1 启动输出错误信息

Posted by GitBox <gi...@apache.org>.
melin commented on issue #10795:
URL: https://github.com/apache/dubbo/issues/10795#issuecomment-1288494460

   dubbo 依赖的spring boot 版本太低了,升级一下吧。
   [image: image.png]
   
   earthchen ***@***.***> 于2022年10月24日周一 14:37写道:
   
   > 修改 spring boot starter版本和 dubbo 版本一致试试
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/dubbo/issues/10795#issuecomment-1288490167>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AAIXXZTN4SKBJ7ZIEWMHR6LWEYVA5ANCNFSM6AAAAAARMJ7FUQ>
   > .
   > You are receiving this because you authored the thread.Message ID:
   > ***@***.***>
   >
   


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] EarthChen commented on issue #10795: spring boot dubbo 3.1.1 启动输出错误信息

Posted by GitBox <gi...@apache.org>.
EarthChen commented on issue #10795:
URL: https://github.com/apache/dubbo/issues/10795#issuecomment-1288490167

   修改 spring boot starter版本和 dubbo 版本一致试试


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] melin closed issue #10795: spring boot dubbo 3.1.1 启动输出错误信息

Posted by GitBox <gi...@apache.org>.
melin closed issue #10795: spring boot dubbo 3.1.1 启动输出错误信息
URL: https://github.com/apache/dubbo/issues/10795


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #10795: spring boot dubbo 3.1.1 启动输出错误信息

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #10795:
URL: https://github.com/apache/dubbo/issues/10795#issuecomment-1288358420

   pom 贴一下


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #10795: spring boot dubbo 3.1.1 启动输出错误信息

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #10795:
URL: https://github.com/apache/dubbo/issues/10795#issuecomment-1289913950

   > 这里没指定 metadata 协议 port 的时候 是使用用户指定的应用协议呢? 还是保持现在的 默认使用dubbo 但是 优化下 错误 提示
   
   这里最好将默认值改成从用户环境中获取已经配置的额 protocol,都没配置再使用 dubbo


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org