Suvendu Mandal
Suvendu Mandal

Reputation: 109

Zuul Forwarding error - Internal Server error 500

This is what I am trying to achieve but getting Zuul forwarding error.

Zuul GitHub

UserRegistration Microservice - which will call another Microservice. Also, it has some other APIs'. GitHub Link

UserSearchDelete: above UserRegistration microservice will call this service. GitHub Link

Eureka Server: GitHub Link

If I run the services in Springboot STS at localhost then eveything is working fine. But if I dockarise all the services and run different containers then I am getting Zuul forrwarding error.

Refer the application.yml files in the Github repos. All the services are getting registered with Eureka.

Could please help? Is it a bug or I am doing something wrong?

GitHub issue reference: https://github.com/spring-cloud/spring-cloud-netflix/issues/3408

Getting the below errors:

    "cause": {
        "cause": null,
        "stackTrace": [
            {....

    "nStatusCode": 500,
    "errorCause": "GENERAL",
    "message": "Forwarding error",
    "localizedMessage": "Forwarding error",
    "suppressed": []
}```

Upvotes: 1

Views: 3245

Answers (1)

Hendrik van Niekerk
Hendrik van Niekerk

Reputation: 28

Verify that your Zuul paths are setup properly.

If running on a Docker network, each docker deployment must be connected to the same docker network using the --net myCommonNet tag in the run command. Note that you will have to create this network first. Then you can reference the container hosts on their names. If you are using kubernetes as your deployment environment, you can access the different microservices using the service name. Then you configure your Zuul's properties.yml as:

zuul:
  routes:
    myService:
      path: /myService/**
      url: http://myService.default.svc.cluster.local:8086

Upvotes: 0

Related Questions