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

3.3 branch, got exception when run 'triple+rest' with port unification feature. #12518

Open
chickenlj opened this issue Jun 13, 2023 · 1 comment
Labels
component/sdk Related with apache/dubbo help wanted Everything needs help from contributors type/bug Bugs to being fixed

Comments

@chickenlj
Copy link
Contributor

[13/06/23 04:32:22:022 CST] main ERROR deploy.DefaultApplicationDeployer:  [DUBBO] Dubbo Application[1.1](dubbo-demo-triple-api-provider) start failure, dubbo version: 3.3.0-beta.1-SNAPSHOT, current host: 30.221.147.191, error code: 5-14. This may be caused by , go to https://dubbo.apache.org/faq/5/14 to find instructions. 
org.apache.dubbo.rpc.protocol.rest.exception.CodeStyleNotSupportException: service is:class org.apache.dubbo.demo.GreeterServiceImpl,just support rest or spring-web annotation
	at org.apache.dubbo.rpc.protocol.rest.annotation.metadata.MetadataResolver.resolveProviderServiceMetadata(MetadataResolver.java:67)
	at org.apache.dubbo.rpc.protocol.rest.RestProtocol.export(RestProtocol.java:88)
	at org.apache.dubbo.rpc.protocol.ProtocolSecurityWrapper.export(ProtocolSecurityWrapper.java:83)
	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:73)
	at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:61)
	at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.export(ProtocolSerializationWrapper.java:47)
	at org.apache.dubbo.rpc.protocol.InvokerCountWrapper.export(InvokerCountWrapper.java:42)
	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
	at org.apache.dubbo.registry.integration.RegistryProtocol.lambda$doLocalExport$4(RegistryProtocol.java:319)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
	at org.apache.dubbo.registry.integration.RegistryProtocol.doLocalExport(RegistryProtocol.java:317)
	at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:257)
	at org.apache.dubbo.rpc.protocol.ProtocolSecurityWrapper.export(ProtocolSecurityWrapper.java:83)
	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:66)
	at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:58)
	at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.export(ProtocolSerializationWrapper.java:47)
	at org.apache.dubbo.rpc.protocol.InvokerCountWrapper.export(InvokerCountWrapper.java:42)
	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
	at org.apache.dubbo.config.ServiceConfig.doExportUrl(ServiceConfig.java:838)
	at org.apache.dubbo.config.ServiceConfig.exportRemote(ServiceConfig.java:813)
	at org.apache.dubbo.config.ServiceConfig.exportUrl(ServiceConfig.java:758)
	at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:533)
	at org.apache.dubbo.config.ServiceConfig.lambda$doExportUrls$5(ServiceConfig.java:512)
	at org.apache.dubbo.metrics.event.MetricsEventBus.post(MetricsEventBus.java:80)
	at org.apache.dubbo.metrics.event.MetricsEventBus.post(MetricsEventBus.java:62)
	at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:501)
	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:472)
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:307)
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.exportServiceInternal(DefaultModuleDeployer.java:430)
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.exportServices(DefaultModuleDeployer.java:385)
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.startSync(DefaultModuleDeployer.java:166)
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.start(DefaultModuleDeployer.java:147)
	at org.apache.dubbo.config.deploy.DefaultApplicationDeployer.startModules(DefaultApplicationDeployer.java:729)
	at org.apache.dubbo.config.deploy.DefaultApplicationDeployer.doStart(DefaultApplicationDeployer.java:693)
	at org.apache.dubbo.config.deploy.DefaultApplicationDeployer.start(DefaultApplicationDeployer.java:666)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:227)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:216)
	at org.apache.dubbo.demo.provider.ApiProvider.main(ApiProvider.java:42)
@chickenlj chickenlj added type/bug Bugs to being fixed type/question and removed type/bug Bugs to being fixed labels Jun 13, 2023
@chickenlj
Copy link
Contributor Author

Here is the dubbo service implementation, a standard impl without any annotations.

public class GreeterServiceImpl implements GreeterService {

    @Override
    public HelloReply sayHello(HelloRequest request) {
        return HelloReply.newBuilder()
                .setMessage("Hello " + request.getName())
                .build();
    }

    @Override
    public CompletableFuture<String> sayHelloAsync(String name) {
        return CompletableFuture.supplyAsync(() -> name);
    }
}

@AlbumenJ AlbumenJ added type/bug Bugs to being fixed help wanted Everything needs help from contributors component/sdk Related with apache/dubbo and removed question labels Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/sdk Related with apache/dubbo help wanted Everything needs help from contributors type/bug Bugs to being fixed
Projects
Status: No status
Development

No branches or pull requests

2 participants