# RASA JAVA JDK action server issue

**URL:** <https://forum.rasa.com/t/rasa-java-jdk-action-server-issue/36565>\
**Category:** Rasa Open Source\
**Created:** [November 3, 2020, 12:16am UTC](https://forum.rasa.com/t/rasa-java-jdk-action-server-issue/36565 "2020-11-03T00:16:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![penusila611621](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@penusila611621](https://forum.rasa.com/u/penusila611621)\
**Post date:** [November 3, 2020, 12:16am UTC](https://forum.rasa.com/t/rasa-java-jdk-action-server-issue/36565/1 "2020-11-03T00:16:28Z")

</div>

Hi Folks,

I want to develop custom action to query back end data in JAVAbase so I downloaded the code from [GitHub - rbajek/rasa-java-sdk: Java SDK for the development of custom actions for Rasa](https://github.com/rbajek/rasa-java-sdk) and developed a simple hello world action.

Started RASA core in local on port 5005 and the action server on port 5055 in local. Updated endpoints.yml file as below.

```auto
# This file contains the different endpoints your bot can use.

# Server where the models are pulled from.
# https://rasa.com/docs/rasa/user-guide/configuring-http-api/#fetching-models-from-a-server/

#models:
# url: http://my-server.com/models/default_core@latest
# wait_time_between_pulls: 10 # [optional](default: 100)

# Server which runs your custom actions.
# https://rasa.com/docs/rasa/core/actions/#custom-actions/

action_endpoint:
  url: "http://localhost:5055/webhook"

# Tracker store which is used to store the conversations.
# By default the conversations are stored in memory.
# https://rasa.com/docs/rasa/api/tracker-stores/

#tracker_store:
# type: redis
# url: <host of the redis instance, e.g. localhost>
# port: <port of your redis instance, usually 6379>
# db: <number of your database within redis, e.g. 0>
# password: <password used for authentication>
# use_ssl: <whether or not the communication is encrypted, default false>

#tracker_store:
# type: mongod
# url: <url to your mongo instance, e.g. mongodb://localhost:27017>
# db: <name of the db within your mongo instance, e.g. rasa>
# username: <username used for authentication>
# password: <password used for authentication>

# Event broker which all conversation events should be streamed to.
# https://rasa.com/docs/rasa/api/event-brokers/

#event_broker:
# url: localhost
# username: username
# password: password
# queue: queue

```

When I am trying to [http://localhost:5005/webhooks/rest/webhook,getting](http://localhost:5005/webhooks/rest/webhook,getting) below error in logs. Seems RASA core is not able to communicate with action server.

```auto
Failed to run custom action 'custom_reason'. Couldn't connect to the server at 'http://localhost:5055/webhook'. Is the server running? Error: Cannot connect to host localhost:5055 ssl:default [Cannot assign requested address]
2020-11-03 00:09:19 ERROR rasa.core.processor - Encountered an exception while running action 'custom_reason'. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
2020-11-03 00:09:19 DEBUG rasa.core.processor - Failed to execute custom action.
Traceback (most recent call last):
  File "/opt/venv/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
  File "uvloop/loop.pyx", line 1974, in create_connection
  File "uvloop/loop.pyx", line 1950, in uvloop.loop.Loop.create_connection
  File "uvloop/handles/tcp.pyx", line 180, in uvloop.loop.TCPTransport.connect
  File "uvloop/handles/tcp.pyx", line 202, in uvloop.loop._TCPConnectRequest.connect
OSError: [Errno 99] Cannot assign requested address

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/actions/action.py", line 551, in run
    json=json_body, method="post", timeout=DEFAULT_REQUEST_TIMEOUT
  File "/opt/venv/lib/python3.7/site-packages/rasa/utils/endpoints.py", line 150, in request
    **kwargs,
  File "/opt/venv/lib/python3.7/site-packages/aiohttp/client.py", line 1012, in __aenter__
    self._resp = await self._coro
  File "/opt/venv/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
    timeout=real_timeout
  File "/opt/venv/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/opt/venv/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection
    req, traces, timeout)
  File "/opt/venv/lib/python3.7/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection
    raise last_exc
  File "/opt/venv/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
    req=req, client_error=client_error)
  File "/opt/venv/lib/python3.7/site-packages/aiohttp/connector.py", line 943, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host localhost:5055 ssl:default [Cannot assign requested address]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/processor.py", line 650, in _run_action
    events = await action.run(output_channel, nlg, tracker, self.domain)
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/actions/action.py", line 582, in run
    raise Exception("Failed to execute custom action.")
Exception: Failed to execute custom action.

```

[http://localhost:5055/health](http://localhost:5055/health) and [http://localhost:5055/](http://localhost:5055/) end points of action server are perfectly working fine.

Is there any configuration missing here ??

---

<div class="post-metadata">

**Author:** ![degiz](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/degiz/32/9936_2.png) [@degiz](https://forum.rasa.com/u/degiz)\
**Post date:** [November 3, 2020, 10:16am UTC](https://forum.rasa.com/t/rasa-java-jdk-action-server-issue/36565/2 "2020-11-03T10:16:59Z")

</div>

Hey @penusila611621

Looks like that’s a custom java-sdk, we don’t support it ourselves ☹ Have you tried contacting the author? Also, looks like the last update was done 12 months ago, and there were some changes to the sdk recently due to the `2.0` release.

---

<div class="post-metadata">

**Author:** ![penusila611621](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@penusila611621](https://forum.rasa.com/u/penusila611621)\
**Post date:** [November 3, 2020, 2:51pm UTC](https://forum.rasa.com/t/rasa-java-jdk-action-server-issue/36565/3 "2020-11-03T14:51:16Z")

</div>

Thanks @degiz for your response. Is there any user guide from RASA to develop action server using RASA provide JAVA SDK.

---

<div class="post-metadata">

**Author:** ![degiz](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/degiz/32/9936_2.png) [@degiz](https://forum.rasa.com/u/degiz)\
**Post date:** [November 9, 2020, 9:26am UTC](https://forum.rasa.com/t/rasa-java-jdk-action-server-issue/36565/4 "2020-11-09T09:26:34Z")

</div>

Hey @penusila611621

At the moment Rasa Open Source has only python action server SDK.

---

<div class="post-metadata">

**Author:** ![penusila611621](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@penusila611621](https://forum.rasa.com/u/penusila611621)\
**Post date:** [November 11, 2020, 5:26pm UTC](https://forum.rasa.com/t/rasa-java-jdk-action-server-issue/36565/5 "2020-11-11T17:26:15Z")

</div>

Thanks @degiz, any roadmap to develop JAVA action server APIS.

---

<div class="post-metadata">

**Author:** ![degiz](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/degiz/32/9936_2.png) [@degiz](https://forum.rasa.com/u/degiz)\
**Post date:** [November 12, 2020, 9:38am UTC](https://forum.rasa.com/t/rasa-java-jdk-action-server-issue/36565/6 "2020-11-12T09:38:16Z")

</div>

Hey @penusila611621

Not at the moment.

---

<div class="post-metadata">

**Author:** ![Butusov](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@Butusov](https://forum.rasa.com/u/Butusov)\
**Post date:** [January 11, 2021, 2:43am UTC](https://forum.rasa.com/t/rasa-java-jdk-action-server-issue/36565/7 "2021-01-11T02:43:51Z")

</div>

Hey @penusila611621Perhaps this one can help: [https://github.com/ArturKorb/rasa-java-action-service](https://github.com/ArturKorb/rasa-java-action-service). Look also here: [https://github.com/ArturKorb/rasa-java-client-library](https://github.com/ArturKorb/rasa-java-client-library)

---

<div class="post-metadata">

**Author:** ![shashia2005](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@shashia2005](https://forum.rasa.com/u/shashia2005)\
**Post date:** [February 23, 2022, 5:32am UTC](https://forum.rasa.com/t/rasa-java-jdk-action-server-issue/36565/8 "2022-02-23T05:32:47Z")

</div>

@degiz Hi I recently started with Rasa and wanted to have a Java action server. Is there any update for java SDK ?
