我们的情况如下:我们通过自动化提供新的k8s集群,并通过自动化构建/部署我们的微服务。到目前为止,我已经部署了几个pre-prod集群,没有任何问题,但是现在我们进入了集成测试环境,现在有一个服务容器正在做一些事情
非常
在Host1上运行的容器会像往常一样启动:
2020-12-10 00:46:39,717 INFO [main] company.Api (Api.java:20) - Running against https://sandboxapi2.example.com/3.0/exampleApi.asmx with user company_example_api_user1
2020-12-10 00:46:39,864 DEBUG [main] resource.DefaultResourceManager (DefaultResourceManager.java:110) - resolving resource <org.apache.cxf.wsdl11.WSDLManagerImpl/bus> type <interface org.apache.cxf.Bus>
2020-12-10 00:46:39,865 DEBUG [main] resource.DefaultResourceManager (DefaultResourceManager.java:110) - resolving resource <null> type <interface org.apache.cxf.Bus>
2020-12-10 00:46:40,066 TRACE [main] helpers.DOMUtils (DOMUtils.java:83) - can't load class com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl
2020-12-10 00:46:40,457 DEBUG [main] jaxws.ServiceImpl (ServiceImpl.java:430) - creating port for portName
2020-12-10 00:46:40,458 DEBUG [main] jaxws.ServiceImpl (ServiceImpl.java:431) - endpoint reference:
2020-12-10 00:46:40,458 DEBUG [main] jaxws.ServiceImpl (ServiceImpl.java:432) - endpoint interface:
2020-12-10 00:46:40,513 INFO [main] factory.ReflectionServiceFactoryBean (ReflectionServiceFactoryBean.java:391) - Creating Service {http://api.example.com/}exampleApi from WSDL: jar:file:/lib/exampleclient-1.0-SNAPSHOT.jar!/example.wsdl
...
但是,在Host2上运行的容器在解析绑定到容器映像中的WSDL时遇到致命错误:
2020-12-10 00:48:06,865 INFO [main] company.Api (Api.java:20) - Running against https://sandboxapi2.example.com/3.0/exampleApi.asmx with user company_example_api_user1
2020-12-10 00:48:07,036 DEBUG [main] resource.DefaultResourceManager (DefaultResourceManager.java:110) - resolving resource <org.apache.cxf.wsdl11.WSDLManagerImpl/bus> type <interface org.apache.cxf.Bus>
2020-12-10 00:48:07,037 DEBUG [main] resource.DefaultResourceManager (DefaultResourceManager.java:110) - resolving resource <null> type <interface org.apache.cxf.Bus>
2020-12-10 00:48:07,231 TRACE [main] helpers.DOMUtils (DOMUtils.java:83) - can't load class com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl
[Fatal Error] :1:1: Content is not allowed in prolog.
这两个容器作为POD部署在同一个k8s部署中,只是部署到集群中的不同主机。
我尝试/验证过的事情:
我们都在绞尽脑汁想弄清楚这里发生了什么。有人知道这可能是什么原因吗,或者我们可以进一步调查什么?
完整堆栈跟踪:
Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
at org.apache.cxf.jaxws.ServiceImpl.initialize(ServiceImpl.java:163)
at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:129)
at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:82)
at javax.xml.ws.Service.<init>(Service.java:77)
at com.example.api.exampleApi.<init>(exampleApi.java:49)
at com.company.Api.<init>(Api.java:27)
at com.company.payout.Main.main(Main.java:43)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:87)
at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:218)
at org.apache.cxf.jaxws.ServiceImpl.initialize(ServiceImpl.java:161)
... 6 more
Caused by: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/s:schema[1]): faultCode=PARSER_ERROR: Problem parsing 'file:/'.: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2198)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:830)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:654)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(WSDLReaderImpl.java:610)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(WSDLReaderImpl.java:320)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2352)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2338)
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:255)
at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:165)
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:85)
... 8 more
Caused by: org.xml.sax.SAXParseExceptionpublicId: file:/; systemId: file:/; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2188)
... 17 more
编辑:额外的东西尝试
-
-
删去
同样,这是第三个集群。所有这些都在运行约30个其他微服务,没有问题。所有集群通过Ansible和RKE提供,所有服务通过Jenkins和Helm部署。