dashersw/cote

firewall blocking cote request

mushfau opened this issue · 1 comments

I have two services, API service and CDN service, both running in same AWS EC2,

Environment

Cote Version: 0.20.1
Node Version: v8.10.0

API service

const apiService = new cote.Responder({ name: 'API Service'});
apiService.on('CDN_TEST', (req, cb) => {
    console.log("CDN_TEST", req)
    cb({ success: true, result: "world" })
});

CDN service

const requester = new cote.Requester({ name: 'CDN Service' });
app.get("/cdn/test", (req, res) => {
    const resposeJSON = { success: false, result: [], errors: [] }
    requester.send({ type: 'CDN_TEST', data: "helo" }, (response) => {
        res.json({ ...resposeJSON, success: true, result: response })
    });
})

This works fine, as long as the EC2 firewall is off. However, when it's on, cote request fails.

do i need to open a specific port ? or is that even required, if both services are in the same EC2?

Thanks

cote starts listening from port 8000, so you might want to open a certain range of ports above 8000.