You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行mup setup命令遇握手超时及未处理错误,求排查方案

Troubleshooting "Timed out while waiting for handshake" & events.js:183 Error in mup setup

Let's walk through the most likely causes and fixes for the errors you're hitting during the Docker setup phase of mup setup with Meteor 1.6.

1. SSH Connectivity Issues (Primary Culprit)

The "Timed out while waiting for handshake" error points directly to problems establishing an SSH connection to your EC2 instance. Here's how to fix this:

  • Verify EC2 Security Group Settings: Ensure your instance's security group allows inbound SSH traffic (port 22) from your local IP address. If you're using a dynamic IP, temporarily allow all IPs (0.0.0.0/0) for testing (remember to lock this down later).
  • Fix PEM File Permissions: SSH rejects overly permissive key files. Run this on your local machine:
    chmod 600 ~/.ssh/mypem.pem
    
  • Test Manual SSH Connection: Try logging into the server directly to confirm connectivity:
    ssh -i ~/.ssh/mypem.pem ubuntu@54.186.xx.xxx
    
    If this fails, resolve the SSH issue first before re-running mup setup.

2. Docker Image Pull Timeout or Network Issues

Your configured Docker image (abernix/meteord:node-8.4.0-base) is quite old, and pulling it might be slow or failing due to network restrictions:

  • Manually Pull the Image on the Server: After SSHing into the EC2 instance, run:
    sudo docker pull abernix/meteord:node-8.4.0-base
    
    If this takes too long or fails, consider:
    • Adding a Docker Hub mirror (for faster pulls in regions with limited access)
    • Switching to a more recent, maintained Meteor Docker image (e.g., meteor/meteor:1.6 if compatible)
  • Increase SSH Timeout in Mup Config: Add an sshOptions block to your servers config to give the connection more time:
    servers: {
      one: {
        host: '54.186.xx.xxx',
        username: 'ubuntu',
        pem: '~/.ssh/mypem.pem',
        sshOptions: {
          connectTimeout: 120000 // 2 minutes in milliseconds
        }
      }
    }
    

3. Mup and Meteor Version Compatibility

Meteor 1.6 requires a compatible version of Mup. Outdated Mup versions can cause unexpected errors:

  • Check Your Mup Version: Run mup --version in your local terminal.
  • Upgrade Mup: If you're on a version older than 1.5, upgrade to the latest stable release:
    npm install -g mup
    

4. Insufficient Server Resources

Small EC2 instances (like t2.micro) often lack enough memory or CPU to handle Docker setup quickly, leading to timeouts:

  • Check Server Resources: SSH into your instance and run top to monitor CPU and memory usage. If resources are maxed out:
    • Stop any unnecessary processes
    • Upgrade your EC2 instance type to something with more resources (e.g., t2.small)

5. Minor Config File Tweaks

Double-check these small details in your mup.js:

  • Ensure the pem path is correct (use an absolute path instead of ~ if you're unsure, e.g., /home/your-local-user/.ssh/mypem.pem)
  • Confirm the app.path (/var/www/meteor/myapp) is either already created on the server or that Mup has permission to create it (it should handle this automatically, but it's worth verifying)

Once you've addressed these points, run mup setup again. The events.js:183 error is a secondary issue caused by the unhandled SSH timeout, so fixing the handshake problem should resolve that too.

内容的提问来源于stack exchange,提问作者Rashmi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:46:16