How to use AMQP python client for ActiveMQHow to merge two dictionaries in a single expression?How do I check whether a file exists without exceptions?Calling an external command in PythonWhat are metaclasses in Python?Finding the index of an item given a list containing it in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?How to get the current time in PythonHow can I make a time delay in Python?Does Python have a string 'contains' substring method?

The IT department bottlenecks progress. How should I handle this?

How can I write humor as character trait?

How to fade a semiplane defined by line?

Why does a simple loop result in ASYNC_NETWORK_IO waits?

Limits and Infinite Integration by Parts

Biological Blimps: Propulsion

15% tax on $7.5k earnings. Is that right?

Do the primes contain an infinite almost arithmetic progression?

Yosemite Fire Rings - What to Expect?

Store Credit Card Information in Password Manager?

Pre-mixing cryogenic fuels and using only one fuel tank

How to hide some fields of struct in C?

Does malloc reserve more space while allocating memory?

Why is this estimator biased?

Why is so much work done on numerical verification of the Riemann Hypothesis?

Creepy dinosaur pc game identification

How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?

Why did the EU agree to delay the Brexit deadline?

Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?

Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?

What is Cash Advance APR?

Moving brute-force search to FPGA

Can I still be respawned if I die by falling off the map?

Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?



How to use AMQP python client for ActiveMQ


How to merge two dictionaries in a single expression?How do I check whether a file exists without exceptions?Calling an external command in PythonWhat are metaclasses in Python?Finding the index of an item given a list containing it in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?How to get the current time in PythonHow can I make a time delay in Python?Does Python have a string 'contains' substring method?













1















I used amqp client to connect ActiveMQ broker.



import amqp

USER = "guest"
PASSWORD = "guest"
HOST = 'localhost'
PORT = '5672'

host = HOST + ":" + PORT

conn = amqp.connection.Connection(host=host,userid=USER,password=PASSWORD,login_method='AMQPLAIN',ssl=True)
conn.connect()


Getting error : OSError: Server unexpectedly closed connection










share|improve this question






















  • I am a big fan of pika.readthedocs.io/en/stable the pika library for amqp messaging. But I am assuming your local amqp is not up or might not be running properly or on wrong port.

    – mtngt
    Mar 7 at 6:29















1















I used amqp client to connect ActiveMQ broker.



import amqp

USER = "guest"
PASSWORD = "guest"
HOST = 'localhost'
PORT = '5672'

host = HOST + ":" + PORT

conn = amqp.connection.Connection(host=host,userid=USER,password=PASSWORD,login_method='AMQPLAIN',ssl=True)
conn.connect()


Getting error : OSError: Server unexpectedly closed connection










share|improve this question






















  • I am a big fan of pika.readthedocs.io/en/stable the pika library for amqp messaging. But I am assuming your local amqp is not up or might not be running properly or on wrong port.

    – mtngt
    Mar 7 at 6:29













1












1








1








I used amqp client to connect ActiveMQ broker.



import amqp

USER = "guest"
PASSWORD = "guest"
HOST = 'localhost'
PORT = '5672'

host = HOST + ":" + PORT

conn = amqp.connection.Connection(host=host,userid=USER,password=PASSWORD,login_method='AMQPLAIN',ssl=True)
conn.connect()


Getting error : OSError: Server unexpectedly closed connection










share|improve this question














I used amqp client to connect ActiveMQ broker.



import amqp

USER = "guest"
PASSWORD = "guest"
HOST = 'localhost'
PORT = '5672'

host = HOST + ":" + PORT

conn = amqp.connection.Connection(host=host,userid=USER,password=PASSWORD,login_method='AMQPLAIN',ssl=True)
conn.connect()


Getting error : OSError: Server unexpectedly closed connection







python activemq amqp






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 7 at 6:22









abhimanyuabhimanyu

337




337












  • I am a big fan of pika.readthedocs.io/en/stable the pika library for amqp messaging. But I am assuming your local amqp is not up or might not be running properly or on wrong port.

    – mtngt
    Mar 7 at 6:29

















  • I am a big fan of pika.readthedocs.io/en/stable the pika library for amqp messaging. But I am assuming your local amqp is not up or might not be running properly or on wrong port.

    – mtngt
    Mar 7 at 6:29
















I am a big fan of pika.readthedocs.io/en/stable the pika library for amqp messaging. But I am assuming your local amqp is not up or might not be running properly or on wrong port.

– mtngt
Mar 7 at 6:29





I am a big fan of pika.readthedocs.io/en/stable the pika library for amqp messaging. But I am assuming your local amqp is not up or might not be running properly or on wrong port.

– mtngt
Mar 7 at 6:29












1 Answer
1






active

oldest

votes


















0














Looks like the connection params default to the proper settings.



Try just



import amqp

USER = "guest"
PASSWORD = "guest"
HOST = '/'
PORT = '5672'

host = HOST + ":" + PORT

conn = amqp.connection.Connection()
conn.connect()
print(conn.is_closing)


If you look at the implementation of Connection() it is



def __init__(self, host='localhost:5672', userid='guest', password='guest',
login_method=None, login_response=None,


...



So it defaults to the correct stuff and runs for me locally using rabbit mq.



Hope this helps!






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55037272%2fhow-to-use-amqp-python-client-for-activemq%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Looks like the connection params default to the proper settings.



    Try just



    import amqp

    USER = "guest"
    PASSWORD = "guest"
    HOST = '/'
    PORT = '5672'

    host = HOST + ":" + PORT

    conn = amqp.connection.Connection()
    conn.connect()
    print(conn.is_closing)


    If you look at the implementation of Connection() it is



    def __init__(self, host='localhost:5672', userid='guest', password='guest',
    login_method=None, login_response=None,


    ...



    So it defaults to the correct stuff and runs for me locally using rabbit mq.



    Hope this helps!






    share|improve this answer



























      0














      Looks like the connection params default to the proper settings.



      Try just



      import amqp

      USER = "guest"
      PASSWORD = "guest"
      HOST = '/'
      PORT = '5672'

      host = HOST + ":" + PORT

      conn = amqp.connection.Connection()
      conn.connect()
      print(conn.is_closing)


      If you look at the implementation of Connection() it is



      def __init__(self, host='localhost:5672', userid='guest', password='guest',
      login_method=None, login_response=None,


      ...



      So it defaults to the correct stuff and runs for me locally using rabbit mq.



      Hope this helps!






      share|improve this answer

























        0












        0








        0







        Looks like the connection params default to the proper settings.



        Try just



        import amqp

        USER = "guest"
        PASSWORD = "guest"
        HOST = '/'
        PORT = '5672'

        host = HOST + ":" + PORT

        conn = amqp.connection.Connection()
        conn.connect()
        print(conn.is_closing)


        If you look at the implementation of Connection() it is



        def __init__(self, host='localhost:5672', userid='guest', password='guest',
        login_method=None, login_response=None,


        ...



        So it defaults to the correct stuff and runs for me locally using rabbit mq.



        Hope this helps!






        share|improve this answer













        Looks like the connection params default to the proper settings.



        Try just



        import amqp

        USER = "guest"
        PASSWORD = "guest"
        HOST = '/'
        PORT = '5672'

        host = HOST + ":" + PORT

        conn = amqp.connection.Connection()
        conn.connect()
        print(conn.is_closing)


        If you look at the implementation of Connection() it is



        def __init__(self, host='localhost:5672', userid='guest', password='guest',
        login_method=None, login_response=None,


        ...



        So it defaults to the correct stuff and runs for me locally using rabbit mq.



        Hope this helps!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 7 at 6:35









        mtngtmtngt

        334211




        334211





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55037272%2fhow-to-use-amqp-python-client-for-activemq%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            1928 у кіно

            Захаров Федір Захарович

            Ель Греко