Skip to content
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

[BUG] Local docker-compose up - philter unable to connect to ph-eye #16

Open
nicholasburka opened this issue Dec 14, 2024 · 4 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@nicholasburka
Copy link

nicholasburka commented Dec 14, 2024

What is the bug?

Unable to curl example request locally with docker-compose up running. Get "an unknown error" to client, with error in philter Docker container: "philter-ph-eye-1: Name or service not known."

How can one reproduce the bug?

  • Clone repo - main
  • Build with mvn clean install
  • (X Docker build build doesn't work, skipped)
  • Docker-compose up
  • Open other terminal, run
    curl -k -X POST http://localhost:8080/api/filter -d "George Washington has the flu at 12 Harvard Yard" -H "Content-Type: text/plain"

What is the expected behavior?

Should show filtered text.

What is your host/environment?

MacOS Monterey 12.7.1

Do you have any screenshots?

curl -k -X POST http://localhost:8080/api/filter -d "George Washington has the flu at 12 Harvard Yard" -H "Content-Type: text/plain"

produces:
"Unknown error" and

philter | [INFO ] 2024-12-14 22:15:32.858 [http-nio-8080-exec-1] [/] - Initializing Spring DispatcherServlet 'dispatcherServlet' philter | [INFO ] 2024-12-14 22:15:32.858 [http-nio-8080-exec-1] DispatcherServlet - Initializing Servlet 'dispatcherServlet' philter | [INFO ] 2024-12-14 22:15:32.860 [http-nio-8080-exec-1] DispatcherServlet - Completed initialization in 2 ms philter | [ERROR] 2024-12-14 22:15:33.722 [http-nio-8080-exec-1] RestApiExceptions - An unknown error has occurred. philter | java.net.UnknownHostException: philter-ph-eye-1: Name or service not known philter | at java.base/java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) ~[?:?] philter | at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:934) ~[?:?] philter | at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1543) ~[?:?] ... at ai.philterd.phileas.services.filters.ai.pheye.PhEyeFilter.filter(PhEyeFilter.java:127) ~[phileas-core-2.10.0-SNAPSHOT.jar!/:?] philter | at ai.philterd.phileas.processors.unstructured.UnstructuredDocumentProcessor.process(UnstructuredDocumentProcessor.java:65) ~[phileas-processors-unstructured-2.10.0-SNAPSHOT.jar!/:?] philter | at ai.philterd.phileas.services.PhileasFilterService.filter(PhileasFilterService.java:234) ~[phileas-core-2.10.0-SNAPSHOT.jar!/:?] philter | at ai.philterd.phileas.services.PhileasFilterService.filter(PhileasFilterService.java:255) ~[phileas-core-2.10.0-SNAPSHOT.jar!/:?] philter | at ai.philterd.philter.services.PhilterService.filter(PhilterService.java:77) ~[philter-services-3.1.0-SNAPSHOT.jar!/:?] philter | at ai.philterd.philter.api.controllers.FilterApiController.filterTextPlainAsTextPlain(FilterApiController.java:95) ~[philter-api-3.1.0-SNAPSHOT.jar!/:?]

Do you have any additional context?

Pinging localhost:18080 to talk to ph-eye directly works, so it's seemingly a Docker networking issue. I've tried a few Docker-y tricks suggested by Claude like adding container name and host name to the docker-compose.yaml. I've also run from a clean clone, cleaned out old containers, etc.

@nicholasburka nicholasburka added the bug Something isn't working label Dec 14, 2024
@jzonthemtn
Copy link
Member

@nicholasburka Thanks for reporting this! Will have a look.

@jzonthemtn jzonthemtn self-assigned this Dec 16, 2024
@jzonthemtn
Copy link
Member

@nicholasburka Sorry for the delay here. I have not been able to reproduce this. I did a new clone, docker compose up and then ran your curl and I got back a response. I tried on both Ubuntu 24 and OSX M2. I'm going to delete all containers and try again.

@nicholasburka
Copy link
Author

Thanks for looking into it. I'll give it another go from a clean start and report back.

@jzonthemtn
Copy link
Member

@nicholasburka Just wanted to ping and see if you were still running into issues or if I can close this issue. Thanks!

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