Socket error

54 views
Skip to first unread message

David Denham

unread,
Apr 27, 2015, 11:03:31 AM4/27/15
to nod...@googlegroups.com
Hi,

I'm trying to connect to JIRA in node using JIRA API.

var jira = require('jira-api');

var options = {
    config: {
        "username": "my_username",
        "passowrd": "my_password",
        "host": "jira.myhost.com"
    },
    issueIdOrKey: "TIC-43329"
};

jira.issue.get(options, function(response) {
    console.log(JSON.stringify(response, null, 4));
});


However, I get this socket error:


    throw er; // Unhandled 'error' event

              ^

Error: socket hang up

    at SecurePair.error (tls.js:1011:23)

    at EncryptedStream.CryptoStream._done (tls.js:703:22)

    at CleartextStream.read [as _read] (tls.js:499:24)

    at CleartextStream.Readable.read (_stream_readable.js:341:10)

    at EncryptedStream.onCryptoStreamFinish (tls.js:304:47)

    at EncryptedStream.g (events.js:180:16)

    at EncryptedStream.emit (events.js:117:20)

    at finishMaybe (_stream_writable.js:360:12)

    at endWritable (_stream_writable.js:367:3)

    at EncryptedStream.Writable.end (_stream_writable.js:345:5)



Any ideas what this error could mean please?

Thomas Murphy

unread,
Apr 27, 2015, 1:08:11 PM4/27/15
to nod...@googlegroups.com
My guess (and you should consult their documentation to confirm this), is that the namespace jira.issue.get is an instance of the Node's 'http' constructor, and you're not providing an event handle for '.on('error').

Practically speaking, it means there's a connectivity error between your app and Jira's RESTful endpoint.

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/7c26a8a1-9c4d-4438-b36e-ce08da694607%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages