Skip to content

Not able to connect load balancer docker app #27

@umesh9794

Description

@umesh9794

I have pulled and run the public docker image of the app and its running fine now :

21ce5a75f0dd andredewes/aoai-smart-loadbalancing:v1 "dotnet openai-loadb…" 2 days ago Up 2 days 8080-8081/tcp interesting_matsumoto

In the container logs also I can see this has started listening on 8080:

$ docker logs -f 21ce5a75f0dd
warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
      Storing keys in a directory '/home/app/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
      No XML encryptor configured. Key {983733f9-e824-4422-9da6-585701e16af0} may be persisted to storage in unencrypted form.
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://[::]:8080
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /app

However I am not able to connect to this LB container from my app and getting :

httpx.ConnectError: [Errno 61] Connection refused

My code looks like this :

    client = AzureOpenAI(
        # https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#rest-api-versioning
        api_version="2023-12-01-preview",
        # https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#create-a-resource
        azure_endpoint="https://myhostname.XYZ.com:8080",
    )

I can't connect to the app's server using curl also :

curl https://myhostname.XYZ.cloudera.com:8080                                                              
curl: (7) Failed to connect to myhostname.XYZ.com port 8080 after 360 ms: Couldn't connect to server

Any suggestions what might I be missing here?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions