question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mup Setup and Deploy fail - All configured authentication methods failed

See original GitHub issue

Hey, I’ve spent hours trying to deploy my app to my DigitalOcean Droplet. I keep getting this error:

Started TaskList: Setup Docker
[138.197.207.118] - Setup Docker
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: All configured authentication methods failed
    at tryNextAuth (/usr/local/lib/node_modules/mup/node_modules/nodemiral/node_modules/ssh2/lib/client.js:290:17)
    at SSH2Stream.onUSERAUTH_FAILURE (/usr/local/lib/node_modules/mup/node_modules/nodemiral/node_modules/ssh2/lib/client.js:469:5)
    at emitTwo (events.js:126:13)
    at SSH2Stream.emit (events.js:214:7)
    at parsePacket (/usr/local/lib/node_modules/mup/node_modules/ssh2-streams/lib/ssh.js:3647:10)
    at SSH2Stream._transform (/usr/local/lib/node_modules/mup/node_modules/ssh2-streams/lib/ssh.js:551:13)
    at SSH2Stream.Transform._read (_stream_transform.js:186:10)
    at SSH2Stream._read (/usr/local/lib/node_modules/mup/node_modules/ssh2-streams/lib/ssh.js:212:15)
    at SSH2Stream.Transform._write (_stream_transform.js:174:12)
    at doWrite (_stream_writable.js:387:12)
    at writeOrBuffer (_stream_writable.js:373:5)
    at SSH2Stream.Writable.write (_stream_writable.js:290:11)
    at Socket.ondata (_stream_readable.js:639:20)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
\W$ 

I’ve tried using pem + password in my mup file, and without, same error.

My setup is Mac Sierra (latest) Latest Mup version Latest Meteor (1.7)

Here’s my mup file (edited out sensitive info):

module.exports = {
    servers: {
        one: {
            host: 'my-ip',
            username: 'david-admin',
            opts: {
                port: 2222,
            },
        },
    },

    app: {
        // TODO: change app name and path
        name: 'techstacker',
        path: '../',

        servers: {
            one: {},
        },

        buildOptions: {
            serverOnly: true,

            executable: 'meteor',
        },

        env: {
            // TODO: Change to your app's url
            // If you are using ssl, it needs to start with https://
            ROOT_URL: 'https://mywebsite.com',
            MONGO_URL: 'my-external-mongodb',
        },

        docker: {
            // change to 'abernix/meteord:base' if your app is using Meteor 1.4 - 1.5
            image: 'zodern/meteor:root',
        },

        // Show progress bar while uploading bundle to server
        // You might need to disable it on CI servers
        enableUploadProgressBar: true,
    },




    proxy: {
        // comma-separated list of domains your website
        // will be accessed at.
        // You will need to configure your DNS for each one.
        domains: 'mydomain.com',
        ssl: {
            // TODO: disable if not using SSL
            forceSSL: true,
            // Enable let's encrypt to create free certificates
            letsEncryptEmail: 'myemail@gmail.com',
        },
    },
};

I have no clue where to go from here, any suggestions? 😃

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

24reactions
productivemecommented, May 12, 2022

I struggled for many hours to resolve the mup ssh connection issues to a new AWS EC2 Ubuntu 22 server (within a new VPC). I was able to ssh from the commandline, but mup ssh kept failing with “All configured authentication methods failed”.

I found the answer here which is to allow ssh-rsa key types for openssh on the new server.

  • Open file /etc/ssh/sshd_config
  • Add the line PubkeyAcceptedKeyTypes=+ssh-rsa to the end
  • Restart the service sshd with sudo systemctl restart sshd.service

I also struggled a little with setting up the VPC for internet access, and the linked article was very helpful to troubleshoot.

Hope it helps someone.

5reactions
TechStackercommented, Jul 11, 2018

At this point I can deploy without problems if I do the following before mup setup and mup deploy:

ssh-add -K /Users/davidt/.ssh/my-app_id

If I don’t do the above, I get this on mup setup:

Started TaskList: Setup Docker
[138.197.207.118] - Setup Docker
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: All configured authentication methods failed
    at tryNextAuth (/Users/davidt/.nvm/versions/node/v8.11.3/lib/node_modules/mup/node_modules/nodemiral/node_modules/ssh2/lib/client.js:290:17)
    at SSH2Stream.onUSERAUTH_FAILURE (/Users/davidt/.nvm/versions/node/v8.11.3/lib/node_modules/mup/node_modules/nodemiral/node_modules/ssh2/lib/client.js:469:5)
    at emitTwo (events.js:126:13)
    at SSH2Stream.emit (events.js:214:7)
    at parsePacket (/Users/davidt/.nvm/versions/node/v8.11.3/lib/node_modules/mup/node_modules/ssh2-streams/lib/ssh.js:3647:10)
    at SSH2Stream._transform (/Users/davidt/.nvm/versions/node/v8.11.3/lib/node_modules/mup/node_modules/ssh2-streams/lib/ssh.js:551:13)
    at SSH2Stream.Transform._read (_stream_transform.js:186:10)
    at SSH2Stream._read (/Users/davidt/.nvm/versions/node/v8.11.3/lib/node_modules/mup/node_modules/ssh2-streams/lib/ssh.js:212:15)
    at SSH2Stream.Transform._write (_stream_transform.js:174:12)
    at doWrite (_stream_writable.js:397:12)
    at writeOrBuffer (_stream_writable.js:383:5)
    at SSH2Stream.Writable.write (_stream_writable.js:290:11)
    at Socket.ondata (_stream_readable.js:639:20)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

I have no clue why I have to do this, but if anyone has some advice, I’d appreciate it! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

All configured authentication methods failed in MUP
I have problem on new app hosting (but old hosting, it work fine). I base on. Mac M1 12.5; Mup 1.5.9; Meteor 1.4....
Read more >
Why does Meteor Up (MUP) fail on authentication?
Means that the SSH connection is failing. So the credentials you are using (pity you removed them from the config) are not working....
Read more >
All configured authentication methods failed | DigitalOcean
Hi ,i faced an issue with using putty to access my console so i have been using the console from the UI to...
Read more >
SSH Node ERROR: All configured authentication methods failed
Normally I would say the key could be wrong (maybe wrong format) or the server is not configured for key based authentication.
Read more >
Documentation - Meteor Up
mup.js - Meteor Up configuration file; settings.json - Settings for ... This is useful when the previous deploy failed from a network error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found