我将解释我的问题,我试图在EC2 AWS上部署Meteor应用程序(Ubuntu 16),代码是从bitbucket下载的,而我尝试使用Mup进行部署。 Mup安装程序没有问题,但是当使用Mup deploy命令时,它会前进到“最小化应用程序代码”,并且永远不会前进。
流星1.7.0.4 节点v 10.9.0 mup-版本 1.4.5
附加Mup.js文件和腻子会话
module.exports = {
servers: {
one: {
// TODO: set host address, username, and authentication method
host: 'xxxx',
username: 'ubuntu',
pem: '../xxxx.pem'
// password: 'server-password'
// or neither for authenticate from ssh-agent
}
},
app: {
// TODO: change app name and path
name: 'xxxx',
path: '../',
servers: {
one: {},
},
buildOptions: {
serverOnly: true,
executable: 'meteor'
},
env: {
ROOT_URL: 'http://xxxx',
MONGO_URL: 'mongodb://mongodb/meteor',
MONGO_OPLOG_URL: 'mongodb://mongodb/local',
},
docker: {
// change to 'abernix/meteord:base' if your app is using Meteor 1.4 - 1.5
image: 'abernix/meteord:node-8.4.0-base',
},
enableUploadProgressBar: true,
deployCheckWaitTime: 120,
},
mongo: {
version: '3.4.1',
servers: {
one: {}
}
},
};
油灰会议
Using username "ubuntu".
Authenticating with public key "imported-openssh-key"
Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-1065-aws x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
28 packages can be updated.
0 updates are security updates.
New release '18.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Last login: Fri Aug 17 22:06:59 2018 from xxxx
ubuntu@xxxx:~$ meteor --version
Meteor 1.7.0.4
ubuntu@xxxx:~$ node -v
v10.9.0
ubuntu@xxxx:~$ mup --version
1.4.5
ubuntu@xxxx:~$ cd xxxx
ubuntu@xxxx:~/xxxx$ cd .deploy
ubuntu@xxxx:~/xxxx/.deploy$ mup status
=> Servers
- xxxx: Ubuntu 16.04
=> Docker Status
- xxxx: 18.06.0-ce Running
=> Meteor Status
- xxxx: created
Created at 2018-08-17T16:17:42.747786756Z
Restarted 0 times
ENV:
- ROOT_URL=http://xxxx
- MONGO_URL=mongodb://mongodb:27017/xxxx
- MONGO_OPLOG_URL=mongodb://mongodb/local
- METEOR_SETTINGS={"public":{}}
- PORT=80
- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- METEORD_DIR=/opt/meteord
- NODE_VERSION=8.4.0
Published Ports:
- 80/tcp => 80
App running at http://xxxx:80
- Available in app's docker container: false
- Available on server: false
- Available on local computer: false
=> Mongo Status
running on server xxxx
Restarted 0 times
Running since 2018-08-17T21:41:02.553644287Z
Version: 3.4.1
Connections: 1
Storage Engine: wiredTiger
ubuntu@xxxx:~/xxxx/.deploy$ mup setup
Started TaskList: Setup Docker
[xxxx] - Setup Docker
[xxxx] - Setup Docker: SUCCESS
Started TaskList: Setup Meteor
[xxxx] - Setup Environment
[xxxx] - Setup Environment: SUCCESS
Started TaskList: Setup Mongo
[xxxx] - Setup Environment
[xxxx] - Setup Environment: SUCCESS
[xxxx] - Copying mongodb.conf
[xxxx] - Copying mongodb.conf: SUCCESS
Started TaskList: Start Mongo
[xxxx] - Start Mongo
[xxxx] - Start Mongo: SUCCESS
Next, you should run:
mup deploy
ubuntu@xxxx:~/xxxx/.deploy$ mup deploy --verbose settings settings.json
Building App Bundle Locally
Minifying app code
几分钟后,与实例的连接丢失,我必须重新启动它,请帮助我解决这个以前从未遇到过的问题,我需要尽快修复。谢谢!
我在同一AWS实例中使用一个非常基本的应用程序尝试了“ mup deploy --verbose --settings settings.json”命令,并通过了“最小化”问题,但引发了下一个错误:
Next, you should run:
mup deploy
ubuntu@xxxx/.deploy$ mup deploy --verbose --settings settings.json
Building App Bundle Locally
Started TaskList: Pushing Meteor App
[xxxx] - Pushing Meteor App Bundle to the Server
[xxxx] - Pushing Meteor App Bundle to the Server: SUCCESS
[xxxx] - Prepare Bundle
base: Pulling from abernix/meteord
...
Digest: sha256:5138e4ba3c55cc6fabe0ba859f984e9725599a9f53ed5d759dd4f350770a62b2
Status: Downloaded newer image for abernix/meteord:base
Finished Extracting
Creating Dockerfile
Finished creating Dockerfile
Building image
Sending build context to Docker daemon 67.59MB
Step 1/7 : FROM abernix/meteord:base
# Executing 1 build trigger
---> Running in cf74d5b4fa68
Removing intermediate container cf74d5b4fa68
---> 1f37c25d0989
Step 2/7 : RUN mkdir /built_app || true
---> Running in 1aee7bfde84f
Removing intermediate container 1aee7bfde84f
---> f82f6ad23a8a
Step 3/7 : ENV ROOT_URL=xxxx
---> Running in f26ac397298a
Removing intermediate container f26ac397298a
---> c2eb2e8861f7
Step 4/7 : ENV MONGO_URL=mongodb://mongodb:27017/xxxx
---> Running in be1f89f57b08
Removing intermediate container be1f89f57b08
---> 877e22ea42db
Step 5/7 : ENV MONGO_OPLOG_URL=mongodb://mongodb/local
---> Running in 7801b4f3be1e
Removing intermediate container 7801b4f3be1e
---> 657785f145b4
Step 6/7 : COPY ./ /built_app
---> 3043416670e1
Step 7/7 : RUN cd /built_app/programs/server && npm install --unsafe-perm
---> Running in d2ae3b014734
...
Removing intermediate container d2ae3b014734
---> df4a55163cc2
Successfully built df4a55163cc2
Successfully tagged mup-xxxx:build
Error response from daemon: No such image: mup-xxxx:latest
Total reclaimed space: 0B
[xxxx] - Prepare Bundle: SUCCESS
Started TaskList: Configuring App
[xxxx] - Pushing the Startup Script
[xxxx] - Pushing the Startup Script : SUCCESS
[xxxx] - Sending Environment Variab les
[xxxx] - Sending Environment Variab les: SUCCESS
Started TaskList: Start Meteor
[xxxx] - Start Meteor
using image
Error: No such image: mup-xxxx:previous
Image mup-xxxx:latest
Volume
Removing docker containers. Errors about nonexistent endpoints and containers ar e normal.
Error: No such container: xxxx
Error response from daemon: endpoint xxxx not found
Error: No such container: xxxx-frontend
Error response from daemon: endpoint xxxx-frontend not found
Error: No such container: xxxx-nginx-letsencrypt
Error response from daemon: endpoint xxxx-nginx-letsencrypt not found
Error: No such container: xxxx-nginx-proxy
Error response from daemon: endpoint xxxx-nginx-proxy not found
Finished removing docker containers
0e23b10725796947401ab151a78b2349f32a3779249f3847d20f1b82d2c251a4
Ran abernix/meteord:base
[xxxx] - Start Meteor: SUCCESS
[xxxx] - Verifying Deployment
Container has no IP Address, likely from the app crashing.
Container has no IP Address, likely from the app crashing.
=> Container status:
Container spent too much time restarting.
restarted: 8 times {"Bridge":"","SandboxID":"d97cbb37a87106a3bdeaa51022acabd5e13 66a52317d11fcd75a3593730349bd","HairpinMode":false,"LinkLocalIPv6Address":"","Li nkLocalIPv6PrefixLen":0,"Ports":{},"SandboxKey":"/var/run/docker/netns/d97cbb37a 871","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":""," Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"","IPPre fixLen":0,"IPv6Gateway":"","MacAddress":"","Networks":{"bridge":{"IPAMConfig":nu ll,"Links":null,"Aliases":null,"NetworkID":"081a5c91dc08e96e9a6efc23130e8e602951 1153751498da778dac3c9a8beb9d","EndpointID":"","Gateway":"","IPAddress":"","IPPre fixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAd dress":"","DriverOpts":null}}} {"Status":"restarting","Running":true,"Paused":fa lse,"Restarting":true,"OOMKilled":false,"Dead":false,"Pid":0,"ExitCode":1,"Error ":"","StartedAt":"2018-08-20T20:08:58.615954182Z","FinishedAt":"2018-08-20T20:08 :58.900441472Z"}
=> Logs:
at require (internal/module.js:12:17)
at Object.<anonymous> (/built_app/main.js:4:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
=> Starting meteor app on port:80
/built_app/programs/server/boot.js:49
const { pause } = require("./debug.js");
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/built_app/main.js:4:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
=> Starting meteor app on port:80
/built_app/programs/server/boot.js:49
const { pause } = require("./debug.js");
^
Module._extensions..js (module.js:416:10)
To see more logs type 'mup logs --tail=200'
[xxxx] x Verifying Deployment: FAIL ED
------------------------------------STDERR------------------------ ------------
Container spent too much time restarting.
at require (internal/module.js:12:17)
at Object.<anonymous> (/built_app/main.js:4:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
=> Starting meteor app on port:80
/built_app/programs/server/boot.js:49
const { pause } = require("./debug.js");
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/built_app/main.js:4:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
=> Starting meteor app on port:80
/built_app/programs/server/boot.js:49
const { pause } = require("./debug.js");
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/built_app/main.js:4:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
=> Starting meteor app on port:80
/built_app/programs/server/boot.js:49
const { pause } = require("./debug.js");
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/built_app/main.js:4:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
=> Starting meteor app on port:80
/built_app/programs/server/boot.js:49
const { pause } = require("./debug.js");
^
------------------------------------STDOUT------------------------ ------------
Container has no IP Address, likely from the app crashing.
Container has no IP Address, likely from the app crashing.
Container has no IP Address, likely from the app crashing.
Container has no IP Address, likely from the app crashing.
=> Container status:
restarted: 8 times {"Bridge":"","SandboxID":"d97cbb37a87106a3bdeaa51022a cabd5e1366a52317d11fcd75a3593730349bd","HairpinMode":false,"LinkLocalIPv6Address ":"","LinkLocalIPv6PrefixLen":0,"Ports":{},"SandboxKey":"/var/run/docker/netns/d 97cbb37a871","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"Endpoint ID":"","Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":" ","IPPrefixLen":0,"IPv6Gateway":"","MacAddress":"","Networks":{"bridge":{"IPAMCo nfig":null,"Links":null,"Aliases":null,"NetworkID":"081a5c91dc08e96e9a6efc23130e 8e6029511153751498da778dac3c9a8beb9d","EndpointID":"","Gateway":"","IPAddress":" ","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen": 0,"MacAddress":"","DriverOpts":null}}} {"Status":"restarting","Running":true,"Pa used":false,"Restarting":true,"OOMKilled":false,"Dead":false,"Pid":0,"ExitCode": 1,"Error":"","StartedAt":"2018-08-20T20:08:58.615954182Z","FinishedAt":"2018-08- 20T20:08:58.900441472Z"}
=> Logs:
To see more logs type 'mup logs --tail=200'
------------------------------------------------------------------ ------------