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/07/05 08:50:04 UTC
[GitHub] [dubbo] 13567436138 opened a new issue, #10272: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'dubbo.provider.port' to java.lang.Integer
13567436138 opened a new issue, #10272:
URL: https://github.com/apache/dubbo/issues/10272
<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
### Environment
in my local development it is ok,with ide.but in the k8s it got error?
```
[DEBUG] 2022-07-05 08:29:02,163 method:org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter.report(LoggingFailureAnalysisReporter.java:37)
Application failed to start due to an exception
org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'dubbo.provider.port' to java.lang.Integer
at org.springframework.boot.context.properties.bind.Binder.handleBindError(Binder.java:384)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:344)
at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:469)
at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:95)
at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:83)
at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:59)
at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:473)
at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587)
at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:573)
at org.springframework.boot.context.properties.bind.Binder$Context.access$300(Binder.java:534)
at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:471)
at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:411)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340)
at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$4(Binder.java:469)
at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:95)
at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:83)
at org.springframework.boot.context.properties.bind.JavaBeanBinder.bind(JavaBeanBinder.java:59)
at org.springframework.boot.context.properties.bind.Binder.lambda$bindDataObject$5(Binder.java:473)
at org.springframework.boot.context.properties.bind.Binder$Context.withIncreasedDepth(Binder.java:587)
at org.springframework.boot.context.properties.bind.Binder$Context.withDataObject(Binder.java:573)
at org.springframework.boot.context.properties.bind.Binder$Context.access$300(Binder.java:534)
at org.springframework.boot.context.properties.bind.Binder.bindDataObject(Binder.java:471)
at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:411)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:329)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:259)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:246)
at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.bind(ConfigurationPropertiesBinder.java:96)
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:89)
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:78)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:422)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:338)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1332)
at org.example.DubboprivderApplication.main(DubboprivderApplication.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [java.lang.Integer] for value 'tcp://10.68.136.151:20880'; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "tcp://10.68.136.151:20880"
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:47)
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192)
at org.springframework.boot.context.properties.bind.BindConverter.convert(BindConverter.java:107)
at org.springframework.boot.context.properties.bind.BindConverter.convert(BindConverter.java:98)
at org.springframework.boot.context.properties.bind.BindConverter.convert(BindConverter.java:90)
at org.springframework.boot.context.properties.bind.Binder.bindProperty(Binder.java:456)
at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:400)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:340)
... 53 more
Caused by: org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "tcp://10.68.136.151:20880"
at org.springframework.beans.TypeConverterSupport.convertIfNecessary(TypeConverterSupport.java:79)
at org.springframework.beans.TypeConverterSupport.convertIfNecessary(TypeConverterSupport.java:45)
at org.springframework.boot.context.properties.bind.BindConverter$TypeConverterConverter.convert(BindConverter.java:209)
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41)
... 60 more
Caused by: java.lang.NumberFormatException: For input string: "tcp://10.68.136.151:20880"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:766)
at org.springframework.util.NumberUtils.parseNumber(NumberUtils.java:211)
at org.springframework.beans.propertyeditors.CustomNumberEditor.setAsText(CustomNumberEditor.java:115)
at org.springframework.beans.TypeConverterDelegate.doConvertTextValue(TypeConverterDelegate.java:429)
at org.springframework.beans.TypeConverterDelegate.doConvertValue(TypeConverterDelegate.java:402)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:155)
at org.springframework.beans.TypeConverterSupport.convertIfNecessary(TypeConverterSupport.java:73)
... 63 more
```
```
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modules>
<module>provider</module>
<module>comsumer</module>
<module>api</module>
</modules>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.3</version>
</parent>
<groupId>org.example</groupId>
<artifactId>dubbo-demo</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>dubbo-demo</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<curator-framework.version>5.2.0</curator-framework.version>
<zookeeper.version>3.7.0</zookeeper.version>
<dubbo.starter.version>3.0.3</dubbo.starter.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>${dubbo.starter.version}</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>${curator-framework.version}</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>${curator-framework.version}</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-x-discovery</artifactId>
<version>${curator-framework.version}</version>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>${zookeeper.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
```
```
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dubbo-hello-provider-v1
labels:
app: dubbo-hello-provider
spec:
selector:
matchLabels:
app: dubbo-hello-provider
version: v1
replicas: 1
template:
metadata:
labels:
app: dubbo-hello-provider
version: v1
spec:
containers:
- name: dubbo-hello-provider
image: registry.cn-beijing.aliyuncs.com/hxpdocker/dubbo-hello-provider:1.0
imagePullPolicy: Always
resources:
requests:
cpu: 0.05
memory: 500Mi
limits:
cpu: 1
memory: 4Gi
env:
- name: version
value: v1
ports:
- containerPort: 20880
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dubbo-hello-provider-v2
labels:
app: dubbo-hello-provider
spec:
selector:
matchLabels:
app: dubbo-hello-provider
version: v2
replicas: 1
template:
metadata:
labels:
app: dubbo-hello-provider
version: v2
spec:
containers:
- name: dubbo-hello-provider
image: registry.cn-beijing.aliyuncs.com/hxpdocker/dubbo-hello-provider:1.0
imagePullPolicy: Always
resources:
requests:
cpu: 0.05
memory: 500Mi
limits:
cpu: 1
memory: 4Gi
env:
- name: version
value: v2
ports:
- containerPort: 20880
---
apiVersion: v1
kind: Service
metadata:
name: dubbo-hello-provider
spec:
selector:
app: dubbo-hello-provider
type: ClusterIP
ports:
- name: tcp-dubbo
port: 20880
targetPort: 20880
```
* Dubbo version: 3.0.3
* Operating System version: xxx
* Java version: 1.8
### Steps to reproduce this issue
1. xxx
2. xxx
3. xxx
Pls. provide [GitHub address] to reproduce this issue.
### Expected Behavior
<!-- What do you expect from the above steps?-->
### Actual Behavior
<!-- What actually happens? -->
If there is an exception, please attach the exception trace:
```
Just put your stack trace here!
```
--
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] 13567436138 commented on issue #10272: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'dubbo.provider.port' to java.lang.Integer
Posted by GitBox <gi...@apache.org>.
13567436138 commented on issue #10272:
URL: https://github.com/apache/dubbo/issues/10272#issuecomment-1174857827
居然是一个不相关的service导致的,把那个service删掉就好了
--
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 #10272: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'dubbo.provider.port' to java.lang.Integer
Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #10272:
URL: https://github.com/apache/dubbo/issues/10272#issuecomment-1174856658
进pod看一下DUBBO_PROVIDER_PORT这个属性有没有,-D参数和环境变量
--
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] 13567436138 closed issue #10272: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'dubbo.provider.port' to java.lang.Integer
Posted by GitBox <gi...@apache.org>.
13567436138 closed issue #10272: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'dubbo.provider.port' to java.lang.Integer
URL: https://github.com/apache/dubbo/issues/10272
--
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