Please answer some questions before submitting your issue. Thanks!
应该不是代码的问题,我在本地是可以支持启动
Which version of XXL-JOB do you using?
最新的master 分支
Expected behavior
可以正常启动
Actual behavior
15:46:17.765 logback [main] ERROR o.s.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxlJobConfig': Unsatisfied dependency expressed through field 'port'; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'int'; nested exception is java.lang.NumberFormatException: For input string: "tcp://172.16.255.72:8081"
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPos
Steps to reproduce the behavior
apiVersion: v1
kind: Service
metadata:
name: xxl-job-executor
namespace: xxl-job
spec:
externalTrafficPolicy: Cluster
ports:
- name: 8080-8081-tcp
port: 8081
protocol: TCP
targetPort: 8081
- name: 9999-9999-tcp
port: 9999
protocol: TCP
targetPort: 9999
selector:
k8s-app: xxl-job-executor
type: NodePort
status:
loadBalancer: {}
2条答案
按热度按时间k4emjkb11#
与是否有service 没有关系,去除service,系统依旧报错。
hlswsv352#
Failed to convert value of type 'java.lang.String' to required type 'int'; nested exception is java.lang.NumberFormatException: For input string: "tcp://172.16.255.72:8081"