Loading
Salesforce에서 이메일을 보내기 위해서는 도메인 인증이 필요합니다.더 많이 읽기

HTTP Listener replying "Server not available to handle this request, either not initialized yet or it has been disposed" in Mule 4

게시 일자: Mar 2, 2024
솔루션

SYMPTOM

A Mule Application that has an HTTP Listener as source endpoint consistently replies 503 HTTP statuses with the message "Server not available to handle this request, either not initialized yet or it has been disposed". Additionally, this Mule Application includes MUnit test or dependencies in its structure.

If you enable HTTP Wire logging in your Mule Application refer to <How to Enable HTTP Wire Logging for the HTTP Connector> you'll see a similar trace to the one below.

DEBUG 2019-11-13 17:46:29,465 [http.listener.06 SelectorRunner] [event: ] org.mule.service.http.impl.service.HttpMessageLogger.HTTP_Listener_config: LISTENER
HTTP/1.1 503 Service Unavailable
Content-Type: text/plain; charset=UTF-8
Content-Length: 96
Date: Wed, 13 Nov 2019 20:46:29 GMT
Connection: close

Server not available to handle this request, either not initialized yet or it has been disposed.

CAUSE

The MUnit dependencies are declared without the test scope in the Mule Application's POM file.
If this occurs, MUnit is initialized while running the Mule Application, and as a consequence some alternate behaviors needed for testing get triggered such as shutting down message sources which would explain the 503 status code with the message "Server not available to handle this request, either not initialized yet or it has been disposed".

SOLUTION

Make sure that your Mule Application and referenced projects that use MUnit include tag scope with the value "test" for the following dependencies:
<dependency>
    <groupId>com.mulesoft.munit</groupId>
    <artifactId>munit-runner</artifactId>
    <version>2.x</version>
    <classifier>mule-plugin</classifier>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>com.mulesoft.munit</groupId>
    <artifactId>munit-tools</artifactId>
    <version>2.x</version>
    <classifier>mule-plugin</classifier>
    <scope>test</scope>
</dependency>
Knowledge 기사 번호

001123119

 
로드 중
Salesforce Help | Article