Skip to content

Not able to open test application when running app-localtest with podman #84

@sbang

Description

@sbang

Description of the bug

I did the following:

  1. Created a test application as outlined in https://docs.altinn.studio/nb/app/app-dev-course/
  2. Cloned app-localtest and followed the podman instructions in README.md
  3. I tried opening http://local.altinn.cloud:8000/ but got an error message
    An exception occured while fetching applicationData
    No application running on http://host.docker.internal:5005
    Please start your an app on this adress. Typically run the following command in an app directory.
    
    dotnet run
    
    
  4. However the application has been started with "dotnet run" as outlined in README.md and is running, listening to port 5005
image
  1. Tried opening http://host.docker.internal:5005 with curl but got "could not resolve host host.docker.internal":
    EMEAAD+sbang@AAP-5CG32757DH:~$ curl --verbose http://host.docker.internal:5005
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Could not resolve host: host.docker.internal
    * Closing connection
    curl: (6) Could not resolve host: host.docker.internal
    EMEAAD+sbang@AAP-5CG32757DH:~$
    
  2. I tried adding host.docker.internal as an alias for localhost in c:\Windows\System32\Drivers\etc\hosts
    # localhost name resolution is handled within DNS itself.
            127.0.0.1       localhost, host.docker.internal
            ::1             localhost, host.docker.internal
    
  3. This made http://host.docker.internal:5005 work with curl (but got 404 on the root)
  4. But http://local.altinn.cloud:8000/ still got the same error message
  5. Deleted the containers in podman and ran "podman compose --file podman-compose.yml up -d --build" again
  6. After the containers were up, tried http://local.altinn.cloud:8000/ but still got the same error message

Steps To Reproduce

  1. Create an Altinn test application
  2. Clone test application to a windows 11 machine
  3. Install podman desktop as outlined in the app-localtest README
  4. Run app-localtest with podman as outlined in the app-localtest README
  5. Try opening http://local.altinn.cloud:8000/ in a web browser and get the error message

Additional Information

Windows 11 Enterprise, Microsoft .Net SDK 6.0.418, podman desktop 1.7.1, podman 4.9.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions