Skip to content

Cannot connect to Java Engine when changing WREN_ENGINE_PORT to 8082 in .env file #1076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ruschestor opened this issue Mar 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@ruschestor
Copy link

Describe the bug
I am deploying WrenAI using Docker Compose with the latest versions of the components.
When I change the WREN_ENGINE_PORT in the .env file to 8082 (because port 8080 is occupied by another container), the wren-engine-ibis container fails to connect to the Java Engine. The error message is:

Can not connect to Java Engine: All connection attempts failed

This occurs for any request, such as clicking the "What could I ask?" button. No threads are created, and suggestions are not loaded.

To Reproduce

  1. Set WREN_ENGINE_PORT=8082 in the .env file.
  2. Run docker-compose command (docker-compose --env-file .env up -d) to start the containers.
  3. Attempt to interact with the UI e.g., click "What could I ask?").
  4. Observe the error in the wren-engine-ibis logs.

Expected behavior
The wren-engine-ibis container should connect to the Java Engine on the specified port (8082 in this case).

Possible Cause
It seems that the wren-engine-ibis container has the port 8080 hardcoded somewhere in the code or configuration, without referencing the WREN_ENGINE_PORT variable from the .env file.
Everything works fine if you leave the default configuration "WREN_ENGINE_PORT=8080".

Wren AI Information

  • WREN_PRODUCT_VERSION=0.15.3
  • WREN_ENGINE_VERSION=0.14.3
  • WREN_AI_SERVICE_VERSION=0.15.17
  • IBIS_SERVER_VERSION=0.14.3
  • WREN_UI_VERSION=0.20.1

Additional context
Unfortunately, I cannot provide logs or screenshots, but the problem is straightforward to replicate.
If the ability to customize container ports is desired, I suggest addressing this issue to improve flexibility in deployment scenarios.

@ruschestor ruschestor added the bug Something isn't working label Mar 3, 2025
@goldmedal
Copy link
Contributor

HI @ruschestor, we don't provide WREN_ENGINE_PORT env now. Instead, you can add a property in etc/config.properties to change the port of the wren engine server.

http-server.http.port=8082

Wren engine is powered by airlift. You can find some HTTP server configurations here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants