API 在使用 jetty 运行 mule 时返回 500

如何解决API 在使用 jetty 运行 mule 时返回 500

首先,它在内容类型标题中选择 text/plain 并将标题显示为空。

我正在调用 GET /myapp/v2/status API,应用程序部署在使用 jetty 的 mule ESB 上。我就是看不懂这些日志。

    2021-02-24;22:42:02.025 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transport.servlet.ServletResponseWriter [ensureContentTypeHeaderIsSet:190]
[:::::]-Using Content-Type from message header = text/plain
2021-02-24;22:42:02.025 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-org.eclipse.jetty.server.HttpConnection$CommitCallback@1feedc9e generate: NEED_HEADER (null,[p=0,l=0,c=0,r=0],false)@START
2021-02-24;22:42:02.025 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-org.eclipse.jetty.server.HttpConnection$CommitCallback@1feedc9e generate: FLUSH ([p=0,l=131,c=8192,r=131],false)@COMMITTED
2021-02-24;22:42:02.025 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-write: WriteFlusher@18e402ed{IDLE} [HeapByteBuffer@5534dd6[p=0,r=131]={<<<HTTP/1.1 500 Serv...t-Length: 0||||>>>|http.status: 200...}]
2021-02-24;22:42:02.026 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]

骡流:

<flow name="myAppHealthChecks" doc:name="myApp Health Check Services">
<composite-source>
    <inbound-endpoint ref="StatusSvcExternalEndpoint">
        <not-filter>
            <wildcard-filter pattern="/favicon.ico"/>
        </not-filter>
    </inbound-endpoint>
    <inbound-endpoint ref="StatusSvcInternalEndpoint">
        <not-filter>
            <wildcard-filter pattern="/favicon.ico"/>
        </not-filter>
    </inbound-endpoint>
</composite-source>
<jersey:resources doc:name="Status Service Component">
    <component>
        <spring-object bean="statusService"/>
    </component>
    <jersey:context-resolver class="com.it.is.abs.core.http.myAppJAXBContextProvider"/>
</jersey:resources>

完整日志

2021-02-24;22:42:01.994 [qtp1853662226-95] DEBUG org.eclipse.jetty [debug:80]
[:::::]-org.eclipse.jetty.server.HttpConnection$Input@47d5420f{HttpChannelOverHttp@43eace2d{r=1,a=IDLE,uri=-},HttpConnection@6a6d1194{FILLING},g=HttpGenerator{s=START},p=HttpParser{s=END,0 of 0}} shutdown
2021-02-24;22:42:01.994 [qtp1853662226-95] DEBUG org.eclipse.jetty [debug:80]
[:::::]-HttpChannelOverHttp@43eace2d{r=1,uri=-} handle enter
2021-02-24;22:42:01.994 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-REQUEST /myapp/v2/status on HttpChannelOverHttp@43eace2d{r=1,a=DISPATCHED,uri=/myapp/v2/status}
2021-02-24;22:42:01.994 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-scope null||/myapp/v2/status @ o.e.j.s.ServletContextHandler@5092d2c6{/,null,AVAILABLE,@0.0.0.0:8888}
2021-02-24;22:42:01.995 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-scope null||/myapp/v2/status @ o.e.j.s.ServletContextHandler@5092d2c6{/,@0.0.0.0:8888}
2021-02-24;22:42:01.995 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-scope null||/myapp/v2/status @ o.e.j.s.ServletContextHandler@1b0642b8{/,@0.0.0.0:8889}
2021-02-24;22:42:01.995 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-context=||/myapp/v2/status @ o.e.j.s.ServletContextHandler@1b0642b8{/,@0.0.0.0:8889}
2021-02-24;22:42:01.995 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-servlet ||/myapp/v2/status -> org.mule.transport.servlet.jetty.JettyReceiverServlet-6ac4efa8@be63ce8==org.mule.transport.servlet.jetty.JettyReceiverServlet,-1,true
2021-02-24;22:42:01.995 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-chain=null
2021-02-24;22:42:01.995 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transport.http.transformers.MuleMessageToHttpResponse [registerSourceType:175]
[:::::]-java.lang.Object has been added as source type for this transformer,there will be no source type checking performed
2021-02-24;22:42:01.995 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.DefaultMuleMessage [setPropertyInternal:514]
[:::::]-setProperty(key,value) called with null value; removing key: MULE_CHARACTER_ENCODING
2021-02-24;22:42:01.996 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.processor.chain.InterceptingChainLifecycleWrapper [process:67]
[:::::]-Invoking InterceptingChainLifecycleWrapper 'wrapper for InboundEndpoint 'http://0.0.0.0:8889/myapp/v2' composite request/response chain'
[
  InterceptingChainLifecycleWrapper 'wrapper for InboundEndpoint 'http://0.0.0.0:8889/myapp/v2' request chain'
  [
    org.mule.endpoint.inbound.InboundEndpointMimeTypeCheckingMessageProcessor,org.mule.endpoint.inbound.InboundEndpointPropertyMessageProcessor,org.mule.endpoint.inbound.InboundNotificationMessageProcessor,org.mule.endpoint.inbound.InboundLoggingMessageProcessor,org.mule.routing.filters.logic.NotFilter (wrapped by MessageFilter),org.mule.source.StartableCompositeMessageSource$InternalMessageProcessor
  ],InterceptingChainLifecycleWrapper 'wrapper for InboundEndpoint 'http://0.0.0.0:8889/myapp/v2' response chain'
  [
    org.mule.endpoint.inbound.InboundExceptionDetailsMessageProcessor,org.mule.routing.requestreply.ReplyToPropertyRequestReplyReplier
  ]
] with event MuleEvent: 0-9104fcc1-7734-11eb-a6b5-005056a03556,stop processing=false,http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:01.996 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.processor.chain.SimpleMessageProcessorChain [process:67]
[:::::]-Invoking SimpleMessageProcessorChain
[
  InterceptingChainLifecycleWrapper 'wrapper for InboundEndpoint 'http://0.0.0.0:8889/myapp/v2' request chain'
  [
    org.mule.endpoint.inbound.InboundEndpointMimeTypeCheckingMessageProcessor,http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:01.996 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.processor.chain.InterceptingChainLifecycleWrapper [process:67]
[:::::]-Invoking InterceptingChainLifecycleWrapper 'wrapper for InboundEndpoint 'http://0.0.0.0:8889/myapp/v2' request chain'
[
  org.mule.endpoint.inbound.InboundEndpointMimeTypeCheckingMessageProcessor,org.mule.source.StartableCompositeMessageSource$InternalMessageProcessor
] with event MuleEvent: 0-9104fcc1-7734-11eb-a6b5-005056a03556,http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:01.997 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.processor.chain.SimpleMessageProcessorChain [process:67]
[:::::]-Invoking SimpleMessageProcessorChain
[
  org.mule.endpoint.inbound.InboundEndpointMimeTypeCheckingMessageProcessor,org.mule.routing.filters.logic.NotFilter (wrapped by MessageFilter)
] with event MuleEvent: 0-9104fcc1-7734-11eb-a6b5-005056a03556,http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:01.997 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.endpoint.inbound.InboundLoggingMessageProcessor [process:35]
[:::::]-Message Received on: http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:01.997 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.processor.chain.InterceptingChainLifecycleWrapper [process:67]
[:::::]-Invoking InterceptingChainLifecycleWrapper 'wrapper for 'myappHealthChecks' processor chain'
[
  org.mule.construct.AbstractPipeline$1,org.mule.construct.AbstractPipeline$ProcessIfPipelineStartedMessageProcessor,org.mule.interceptor.ProcessingTimeInterceptor,org.mule.construct.processor.FlowConstructStatisticsMessageProcessor,org.mule.construct.DynamicPipelineMessageProcessor,org.mule.processor.LaxSedaStageInterceptingMessageProcessor,JerseyResourcesComponent{myappHealthChecks.component.745295748},org.mule.routing.requestreply.AsyncReplyToPropertyRequestReplyReplier,org.mule.construct.AbstractPipeline$2@7dc628cf
] with event MuleEvent: 0-9104fcc1-7734-11eb-a6b5-005056a03556,http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:01.997 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.processor.chain.DefaultMessageProcessorChain [process:67]
[:::::]-Invoking DefaultMessageProcessorChain '(inner iterating chain) of 'myappHealthChecks' processor chain'
[
  org.mule.construct.AbstractPipeline$1
] with event MuleEvent: 0-9104fcc1-7734-11eb-a6b5-005056a03556,http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:01.997 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.processor.chain.DefaultMessageProcessorChain [process:67]
[:::::]-Invoking DefaultMessageProcessorChain '(inner iterating chain) of 'myappHealthChecks' processor chain'
[
  org.mule.construct.processor.FlowConstructStatisticsMessageProcessor,org.mule.construct.DynamicPipelineMessageProcessor
] with event MuleEvent: 0-9104fcc1-7734-11eb-a6b5-005056a03556,http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:01.998 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.processor.chain.DefaultMessageProcessorChain [process:67]

[:::::]-Invoking DefaultMessageProcessorChain '(inner iterating chain) of 'myappHealthChecks' processor chain'

[
  JerseyResourcesComponent{myappHealthChecks.component.745295748},org.mule.routing.requestreply.AsyncReplyToPropertyRequestReplyReplier
] with event MuleEvent: 0-9104fcc1-7734-11eb-a6b5-005056a03556,http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:01.998 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.processor.chain.InterceptingChainLifecycleWrapper [process:67]
[:::::]-Invoking InterceptingChainLifecycleWrapper 'wrapper for Component interceptor processor chain for :myappHealthChecks.component.745295748'
[
  org.mule.component.AbstractComponent$1$1@ae65900
] with event MuleEvent: 0-9104fcc1-7734-11eb-a6b5-005056a03556,http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:01.998 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.processor.chain.DefaultMessageProcessorChain [process:67]
[:::::]-Invoking DefaultMessageProcessorChain '(inner iterating chain) of Component interceptor processor chain for :myappHealthChecks.component.745295748'
[
  org.mule.component.AbstractComponent$1$1@ae65900
] with event MuleEvent: 0-9104fcc1-7734-11eb-a6b5-005056a03556,http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:01.999 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.module.jersey.JerseyResourcesComponent [buildRequest:273]
[:::::]-Base URI: http://myapp-sl2.qal2.dca.diginsite.net:8889/myapp/v2/
2021-02-24;22:42:01.999 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.module.jersey.JerseyResourcesComponent [buildRequest:274]
[:::::]-Complete URI: http://myapp-sl2.qal2.dca.diginsite.net:8889/myapp/v2/status
2021-02-24;22:42:02.000 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transformer.simple.ObjectToInputStream [transform:411]
[:::::]-Applying transformer _ObjectToInputStream (org.mule.transformer.simple.ObjectToInputStream)
2021-02-24;22:42:02.000 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transformer.simple.ObjectToInputStream [transform:412]
[:::::]-Object before transform: /myapp/v2/status
2021-02-24;22:42:02.000 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transformer.simple.ObjectToInputStream [transform:424]
[:::::]-Object after transform: java.io.ByteArrayInputStream@5a8c3df9
2021-02-24;22:42:02.000 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transformer.AbstractTransformer [checkTransformerReturnClass:197]
[:::::]-The transformed value is of expected type. Type is: ByteArrayInputStream
2021-02-24;22:42:02.022 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.DefaultMuleMessage [applyAllTransformers:1543]
[:::::]-Using TransformerTemplate{this=879b82b,name='null',ignoreBadInput=false,returnClass=SimpleDataType{type=java.lang.Object,mimeType='*/*',encoding='null'},sourceTypes=[]} to transform payload.
2021-02-24;22:42:02.022 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transformer.TransformerTemplate [transform:112]
[:::::]-Applying transformer TransformerTemplate (org.mule.transformer.TransformerTemplate)
2021-02-24;22:42:02.023 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transformer.TransformerTemplate [transform:155]
[:::::]-Object after transform: org.mule.module.jersey.JerseyResourcesComponent$2@71782a9a
2021-02-24;22:42:02.023 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transformer.TransformerTemplate [checkReturnClass:187]
[:::::]-The transformed object is of expected type. Type is: JerseyResourcesComponent$2
2021-02-24;22:42:02.024 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.processor.chain.InterceptingChainLifecycleWrapper [process:67]
[:::::]-Invoking InterceptingChainLifecycleWrapper 'wrapper for InboundEndpoint 'http://0.0.0.0:8889/myapp/v2' response chain'
[
  org.mule.endpoint.inbound.InboundExceptionDetailsMessageProcessor,org.mule.routing.requestreply.ReplyToPropertyRequestReplyReplier
] with event MuleEvent: 0-9104fcc1-7734-11eb-a6b5-005056a03556,http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:02.024 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.processor.chain.SimpleMessageProcessorChain [process:67]
[:::::]-Invoking SimpleMessageProcessorChain
[
  org.mule.endpoint.inbound.InboundExceptionDetailsMessageProcessor,http://0.0.0.0:8889/myapp/v2
2021-02-24;22:42:02.024 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transport.http.transformers.MuleMessageToHttpResponse [transform:112]
[:::::]-Applying transformer MuleMessageToHttpResponse (org.mule.transport.http.transformers.MuleMessageToHttpResponse)
2021-02-24;22:42:02.025 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transport.http.transformers.MuleMessageToHttpResponse [transform:155]
[:::::]-Object after transform: org.mule.transport.http.HttpResponse@5a938f07
2021-02-24;22:42:02.025 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transport.http.transformers.MuleMessageToHttpResponse [checkReturnClass:187]
[:::::]-The transformed object is of expected type. Type is: HttpResponse
2021-02-24;22:42:02.025 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.mule.transport.servlet.ServletResponseWriter [ensureContentTypeHeaderIsSet:190]
[:::::]-Using Content-Type from message header = text/plain
2021-02-24;22:42:02.025 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-org.eclipse.jetty.server.HttpConnection$CommitCallback@1feedc9e generate: NEED_HEADER (null,r=131]={<<<HTTP/1.1 500 Serv...t-Length: 0||||>>>|http.status: 200...}]
2021-02-24;22:42:02.026 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-update WriteFlusher@18e402ed{WRITING}:IDLE-->WRITING
2021-02-24;22:42:02.026 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-flushed 131 SelectChannelEndPoint@62b1924c{/10.102.144.96:4680<r-l>/10.102.146.111:8889,o=true,is=false,os=false,fi=FillInterest@1dcf1e2a{false,null},wf=WriteFlusher@18e402ed{WRITING},it=30000}{HttpConnection@6a6d1194{FILLING},g=HttpGenerator{s=COMMITTED},0 of 0}}{io=0,kio=0,kro=1}
2021-02-24;22:42:02.026 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-flushed true
2021-02-24;22:42:02.026 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-update WriteFlusher@18e402ed{IDLE}:WRITING-->IDLE
2021-02-24;22:42:02.026 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-org.eclipse.jetty.server.HttpConnection$CommitCallback@1feedc9e generate: DONE ([p=131,false)@COMMITTED
2021-02-24;22:42:02.027 [qtp1853662226-95 - /myapp/v2/status] DEBUG org.eclipse.jetty [debug:80]
[:::::]-RESPONSE /myapp/v2/status  500 handled=true

相同的代码在一种环境中运行良好,但在一种环境中不起作用。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-
参考1 参考2 解决方案 # 点击安装源 协议选择 http:// 路径填写 mirrors.aliyun.com/centos/8.3.2011/BaseOS/x86_64/os URL类型 软件库URL 其他路径 # 版本 7 mirrors.aliyun.com/centos/7/os/x86
报错1 [root@slave1 data_mocker]# kafka-console-consumer.sh --bootstrap-server slave1:9092 --topic topic_db [2023-12-19 18:31:12,770] WARN [Consumer clie
错误1 # 重写数据 hive (edu)&gt; insert overwrite table dwd_trade_cart_add_inc &gt; select data.id, &gt; data.user_id, &gt; data.course_id, &gt; date_format(
错误1 hive (edu)&gt; insert into huanhuan values(1,&#39;haoge&#39;); Query ID = root_20240110071417_fe1517ad-3607-41f4-bdcf-d00b98ac443e Total jobs = 1
报错1:执行到如下就不执行了,没有显示Successfully registered new MBean. [root@slave1 bin]# /usr/local/software/flume-1.9.0/bin/flume-ng agent -n a1 -c /usr/local/softwa
虚拟及没有启动任何服务器查看jps会显示jps,如果没有显示任何东西 [root@slave2 ~]# jps 9647 Jps 解决方案 # 进入/tmp查看 [root@slave1 dfs]# cd /tmp [root@slave1 tmp]# ll 总用量 48 drwxr-xr-x. 2
报错1 hive&gt; show databases; OK Failed with exception java.io.IOException:java.lang.RuntimeException: Error in configuring object Time taken: 0.474 se
报错1 [root@localhost ~]# vim -bash: vim: 未找到命令 安装vim yum -y install vim* # 查看是否安装成功 [root@hadoop01 hadoop]# rpm -qa |grep vim vim-X11-7.4.629-8.el7_9.x
修改hadoop配置 vi /usr/local/software/hadoop-2.9.2/etc/hadoop/yarn-site.xml # 添加如下 &lt;configuration&gt; &lt;property&gt; &lt;name&gt;yarn.nodemanager.res