Giter VIP home page Giter VIP logo

sarathi's People

Contributors

nikhilw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dalet-oss

sarathi's Issues

Discovery strategy works fine when directly running the application but not working when running it as a docker container

Hi,
I am trying to use the declarative client in my nodejs application. The below configuration works fine when directly running the express application. But it throws the below connection refused error.
when i am running my nodejs application in a docker container. I have no clue regarding this. Any help will be really appreciated

const SarathiClientBuilder = require("sarathi");
const clientBuilder = new SarathiClientBuilder();
const ConsulDiscoveryStrategy = require("sarathi-consul-strategy").DiscoveryStrategy;
const consulInstance = require('my-node-consul').getConsulInstance();
const thesaurusClient = clientBuilder.setConfig({
restClient: { retry: 3 }, loadBalancer: { strategy: "round-robin" }
}).setDiscoveryStrategy(new ConsulDiscoveryStrategy({ serviceId: "user-service", client: consulInstance }))
.addMethod('getUser', '/api/getuser')
.build();
module.exports = thesaurusClient;

This is the error message:

Giving up retries, declaring a failure. connect ECONNREFUSED 127.0.0.1:18137
{ Error: connect ECONNREFUSED 127.0.0.1:18137
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 18137 }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.