0

在 Windows 10 PowerShell 上以管理员身份尝试使用mup将 Meteor 应用程序部署到 VPS Ubuntu 20.04.2 LTS 上,一切顺利,但未能启动流星,如打印输出底部所示。我“认为”是因为这句话结尾;

启动用户态代理时出错:监听 tcp4 0.0.0.0:80:绑定:地址已在使用中。

服务器报告:

root@server:~# netstat -tulpn | grep --color :80
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      231/apache2

知道如何解决我需要运行 Apache 和 nodeJs 的问题吗?谢谢

更新: 以下是 的输出mup deploy --verbose,后跟文件mup.js

C:\my-app-dir\.deploy>mup deploy --verbose

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    127.0.0.1:49675        LAPTOP-OLT811G5:49676  ESTABLISHED
  TCP    127.0.0.1:49676        LAPTOP-OLT811G5:49675  ESTABLISHED
  TCP    127.0.0.1:50151        LAPTOP-OLT811G5:50152  ESTABLISHED
  TCP    127.0.0.1:50152        LAPTOP-OLT811G5:50151  ESTABLISHED
  TCP    127.0.0.1:50154        LAPTOP-OLT811G5:50155  ESTABLISHED
  TCP    127.0.0.1:50155        LAPTOP-OLT811G5:50154  ESTABLISHED
  TCP    127.0.0.1:50160        LAPTOP-OLT811G5:50161  ESTABLISHED
  TCP    127.0.0.1:50161        LAPTOP-OLT811G5:50160  ESTABLISHED
  TCP    127.0.0.1:52367        LAPTOP-OLT811G5:52368  ESTABLISHED
[185.148.129.235] - Pushing Meteor App Bundle to the Server: SUCCESS
[185.148.129.235] - Prepare BundlePTOP-OLT811G5:52800  ESTABLISHED
Updating base image52800        LAPTOP-OLT811G5:52799  ESTABLISHED
node-12-base: Pulling from abernix/meteord811G5:55366  ESTABLISHED
Digest: sha256:79c9c29c028fd72320fa1af5e2bab1147db3c206a9d807e9bdb3fb2110660c1a
Status: Image is up to date for abernix/meteord:node-12-baseLISHED
docker.io/abernix/meteord:node-12-base-OLT811G5:60241  ESTABLISHED
Preparing for docker build      LAPTOP-OLT811G5:64587  ESTABLISHED
Creating Dockerfile64587        LAPTOP-OLT811G5:64586  ESTABLISHED
Finished creating Dockerfile    LAPTOP-OLT811G5:65122  ESTABLISHED
Building image.0.1:65122        LAPTOP-OLT811G5:65121  ESTABLISHED
Sending build context to Docker daemon  128.6MB:65151  ESTABLISHED
Step 1/7 : FROM abernix/meteord:node-12-base1G5:65150  ESTABLISHED
# Executing 1 build trigger     40.119.211.203:https   ESTABLISHED
 ---> Using cache0.67:52400     142.250.4.188:5228     ESTABLISHED
 ---> 65200bf0c802.67:52422     40.119.211.203:https   ESTABLISHED
Step 2/7 : RUN mkdir /built_app || true216-3-76:https  ESTABLISHED
 ---> Using cache0.67:52447     syd15s17-in-f3:https   ESTABLISHED
 ---> 641135f006a7.67:52449     syd09s14-in-f14:https  ESTABLISHED
Step 3/7 : ARG ROOT_URL="http://185.148.129.235.static.a2webhosting.com"
 ---> Using cache0.67:52625     151.101.193.69:https   ESTABLISHED
 ---> 51449bdf1771Documents\meteor\apps\audio\.deploy> mup deploy --verbose
Step 4/7 : ARG MONGO_URL="mongodb://mongodb:27017/audio"
 ---> Using cache
 ---> 9e90ec530e62Pushing Meteor App
Step 5/7 : ARG MONGO_OPLOG_URL="mongodb://mongodb/local"ver
 ---> Using cache
 ---> be34137de50b
Step 6/7 : COPY ./ /built_app
 ---> Using cache
 ---> c23d46e03e72
Step 7/7 : RUN cd /built_app/programs/server &&     npm install --unsafe-perm
 ---> Using cache
 ---> fccd4584401f
[Warning] One or more build-args [NODE_VERSION] were not consumed
Successfully built fccd4584401f
Successfully tagged mup-audio:build

real    0m9.804s
user    0m0.769s
sys     0m1.010s
Tagged latest
Deleted Images:
deleted: sha256:e869f38ad6f15504fdacb6c286dd7904521f4bf2eb00f699fdefb4fa4d4857e1
deleted: sha256:538b72c0548dcc8e1def78d335a34e448d611ed55105cfcd132f1dc7bfe12ac7
deleted: sha256:16b87889c911fdaeb4225509b676468f9c7df9208fd3e17c075c08646b840c51
deleted: sha256:f2b507302cb528f88d72a8837d74b1d523f60426b0dda43fcb0369f9bf1eef27

Total reclaimed space: 139.4MB
[185.148.129.235] - Prepare Bundle: SUCCESS

Started TaskList: Configuring App
[185.148.129.235] - Pushing the Startup Script
[185.148.129.235] - Pushing the Startup Script: SUCCESS
[185.148.129.235] - Sending Environment Variables
[185.148.129.235] - Sending Environment Variables: SUCCESS

Started TaskList: Start Meteor
[185.148.129.235] - Start Meteor
using image
removing last
Image mup-audio:latest
Volume
Removing docker containers. Errors about nonexistent endpoints and containers are normal.
audio
Error response from daemon: endpoint audio not found
Error: No such container: audio-frontend
Error response from daemon: endpoint audio-frontend not found
Error: No such container: audio-nginx-letsencrypt
Error response from daemon: endpoint audio-nginx-letsencrypt not found
Error: No such container: audio-nginx-proxy
Error response from daemon: endpoint audio-nginx-proxy not found
Finished removing docker containers
e63e684acf2ba89117a8ee7c4a53c28ca08cd5fdeacc8c7b368689fcd36172b1
docker: Error response from daemon: driver failed programming external connectivity on endpoint audio (6dcafd574d2116c25d289cc71e15c41112b53a049a52c6481ecd20e51ec8414c): Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use.
[185.148.129.235] x Start Meteor: FAILED

              ------------------------------------STDERR------------------------------------
              Removing docker containers. Errors about nonexistent endpoints and containers are normal.
        Error response from daemon: endpoint audio not found
        Error: No such container: audio-frontend
        Error response from daemon: endpoint audio-frontend not found
        Error: No such container: audio-nginx-letsencrypt
        Error response from daemon: endpoint audio-nginx-letsencrypt not found
        Error: No such container: audio-nginx-proxy
        Error response from daemon: endpoint audio-nginx-proxy not found
        Finished removing docker containers
        docker: Error response from daemon: driver failed programming external connectivity on endpoint audio (6dcafd574d2116c25d289cc71e15c41112b53a049a52c6481ecd20e51ec8414c): Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use.

              ------------------------------------STDOUT------------------------------------
              using image
        removing last
        Image mup-audio:latest
        Volume
        audio
        e63e684acf2ba89117a8ee7c4a53c28ca08cd5fdeacc8c7b368689fcd36172b1

              ------------------------------------------------------------------------------

******************************************************************************

//mup.js
module.exports = {
  servers: {
    one: {
      host: '185.148.129.235',
      username: 'root',
      password: 'abcdefghij',
      opts: {
        port: 7822
      }      
    }
  },

  app: {
    name: 'audio',
    path: '../',

    servers: {
      one: {},
    },

    buildOptions: {
      serverOnly: true,
    },

    env: {
      ROOT_URL: 'http://185.148.129.235.static.a2webhosting.com',
      MONGO_URL: 'mongodb://mongodb/meteor',
      MONGO_OPLOG_URL: 'mongodb://mongodb/local',
    },

    docker: {
      image: 'abernix/meteord:node-12-base',
    },

    enableUploadProgressBar: true
  },

  mongo: {
    version: '3.4.1',
    servers: {
      one: {}
    }
  },
};

4

1 回答 1

0

由于 Ubuntu VPS 有 Apache2 服务器在端口 80 上侦听,并且 mup 为 docker- contains-meteor-app 提供相同的端口号来侦听。我需要停止 Apache2 systemctl stop apache2,然后mup deploy工作,现在可以在浏览器上访问流星应用程序。

现在我需要了解如何使用 nginx 作为流星应用程序的代理。

于 2021-02-19T16:24:08.403 回答