Git Product home page Git Product logo

Comments (10)

cbaron avatar cbaron commented on July 30, 2024

Hi @mattgibson -- this is a known issue.

I think somewhere near here we need to tell mosca to choose an unused port.

We will investigate and get back to you. Let us know if you come up with anything.

from aws-utils.

lightsofapollo avatar lightsofapollo commented on July 30, 2024

Hrm I re-read that code and looked up the port 1883 and now know it has something to do with the mqtt setup.

from aws-utils.

lightsofapollo avatar lightsofapollo commented on July 30, 2024

Previous attempt at fixing this issue was : 99bb347

from aws-utils.

mattgibson avatar mattgibson commented on July 30, 2024

Looking at where mosca is started here https://github.com/ConduitVC/aws-utils/blob/master/packages/appsync-emulator-serverless/serverCore.js#L323

I found I could fix the error in one line if I did this:

  const mqttServer = new mosca.Server({
    port: pareseInt(port, 10) + 1,
    backend: { type: 'memory' },
  });

But i'm not sure if that actually broke the subscriptions or not. it just fixed the error and let me start both instances.

from aws-utils.

lightsofapollo avatar lightsofapollo commented on July 30, 2024

My hypothesis is there is an additional port bound by mosca that we are in fact not using. There should be some mechanism to turn that off (I am investigating now)

from aws-utils.

lightsofapollo avatar lightsofapollo commented on July 30, 2024

I can reproduce this issue on ^0.7.1 (in our test repo) but cannot reproduce on master...

from aws-utils.

lightsofapollo avatar lightsofapollo commented on July 30, 2024

I found another issue on master and will publish a version shortly which will include this fix ! I also updated our test repo to run tests in parallel to verify we don't break this in future.

from aws-utils.

lightsofapollo avatar lightsofapollo commented on July 30, 2024

Please try 0.12 and see if that works better! I published a few fixes.

from aws-utils.

lightsofapollo avatar lightsofapollo commented on July 30, 2024

Marking this as closed . please reopen if issue persists.

from aws-utils.

mattgibson avatar mattgibson commented on July 30, 2024

@lightsofapollo Thanks for the quick fix! Version 0.12 does fix the issue of not being able to run two instances, but I was unable to verify that the subscriptions function correctly. I'll open another issue if that turns out to be the case in future.

from aws-utils.

Related Issues (20)

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.