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

Any request fails with WebSocket error when running in EC2 environment #5408

Closed
2 of 4 tasks
derylseale opened this issue May 10, 2021 · 1 comment · Fixed by #5439
Closed
2 of 4 tasks

Any request fails with WebSocket error when running in EC2 environment #5408

derylseale opened this issue May 10, 2021 · 1 comment · Fixed by #5439
Assignees

Comments

@derylseale
Copy link

derylseale commented May 10, 2021

I have a simple containerized microservice that runs fine locally, but fails when deployed to an EC2 environment. This only started happening with v2.5.0, and I've confirmed that there is no problem using up to v2.4.4. Every HTTP request to the service, including to the health endpoint, fails with the following message:

{
   "message":"WebSocket Not Found",
   "_links":{
      "self":{
         "href":"/health",
         "templated":false
      }
   }
}

I am not using web sockets (so far as I know), so this message is especially confusing. I can't see anything related that changed between 2.4 and 2.5, so I've been unable to deduce any settings I might try to remedy the issue. All requests are over HTTP (not HTTPS).

Task List

  • Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem uploaded to Github
  • Full description of the issue provided (see below)

Steps to Reproduce

  1. Create a simple service. Even just one that only supports the /health endpoint should work.
  2. Create a docker container for the packaged application.
  3. Deploy the container to an EC2 instance.

Expected Behaviour

Any request should succeed, even just a GET to /health.

Actual Behaviour

Receive a 404 error with the following message:

{
   "message":"WebSocket Not Found",
   "_links":{
      "self":{
         "href":"/health",
         "templated":false
      }
   }
}

Environment Information

  • Operating System: Linux ed999e65f16f 4.14.218-aptible.0 Publish Snapshots To Artifactory #10 SMP Tue Feb 2 16:44:40 UTC 2021 x86_64 Linux (ami-05da701d18f64756f)
  • Micronaut Version: v.2.5.0 and higher
  • JDK Version: openjdk version "13.0.2" 2020-01-14
@Holophrasis-uk
Copy link

I'm seeing this as well. Even just following the guide: https://guides.micronaut.io/latest/micronaut-elasticbeanstalk-gradle-java.html ends up with the health endpoint giving {"message":"WebSocket Not Found","_links":{"self":{"href":"/health","templated":false}}}

Built in Intellij using AWS "Corretto 11 running on 64bit Amazon Linux 2/3.1.8" platform.

Perhaps something to do with the nginx proxying the request? Hitting the server via http://localhost:5000/health works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants