我从Rancher开始,实际上,我想将其安装在Amazon VPS上,我按照Rancher文档中的说明进行操作,但是当我运行此命令时:
docker run --restart = unless-stopped -p 8080:8080 rancher / server --db-host 172.26.3.141 --db-port 3306 --db-user rancher --db-pass xxxx --db-牧场主姓名
要启动Rancher容器,它将在以下级别挂起:
time =“ 2019-06-09T10:14:17Z” level = info msg =“完成下载所有驱动程序” service = gms
它不显示错误消息,但也不前进。有人请出一个主意吗?谢谢!
我将Amazon EC2与Debian 9和docker-ce结合使用:18.6
这是日志:
CATTLE_AGENT_PACKAGE_HOST_API_URL=/usr/share/cattle/artifacts/host-api.tar.gz
CATTLE_AGENT_PACKAGE_PER_HOST_SUBNET_URL=/usr/share/cattle/artifacts/rancher-per-host-subnet.
CATTLE_AGENT_PACKAGE_PYTHON_AGENT_URL=/usr/share/cattle/artifacts/go-agent.tar.gz
CATTLE_AGENT_PACKAGE_WINDOWS_AGENT_URL=/usr/share/cattle/artifacts/go-agent.zip
CATTLE_API_UI_URL=//releases.rancher.com/api-ui/1.0.8
CATTLE_CATTLE_VERSION=v0.183.79
CATTLE_DB_CATTLE_DATABASE=mysql
CATTLE_DB_CATTLE_MYSQL_HOST=172.31.5.211
CATTLE_DB_CATTLE_MYSQL_NAME=rancher
CATTLE_DB_CATTLE_MYSQL_PORT=3306
CATTLE_DB_CATTLE_USERNAME=rancher
CATTLE_GRAPHITE_HOST=
CATTLE_GRAPHITE_PORT=
CATTLE_HOME=/var/lib/cattle
CATTLE_HOST_API_PROXY_MODE=embedded
CATTLE_LOGBACK_OUTPUT_GELF_HOST=
CATTLE_LOGBACK_OUTPUT_GELF_PORT=
CATTLE_RANCHER_CLI_VERSION=v0.6.13
CATTLE_RANCHER_COMPOSE_VERSION=v0.12.5
CATTLE_RANCHER_SERVER_IMAGE=rancher/server
CATTLE_RANCHER_SERVER_VERSION=v1.6.28
CATTLE_USE_LOCAL_ARTIFACTS=true
DEFAULT_CATTLE_API_UI_CSS_URL=/api-ui/ui.min.css
DEFAULT_CATTLE_API_UI_INDEX=//releases.rancher.com/ui/1.6.50
DEFAULT_CATTLE_API_UI_JS_URL=/api-ui/ui.min.js
DEFAULT_CATTLE_AUTH_SERVICE_EXECUTE=true
DEFAULT_CATTLE_CATALOG_EXECUTE=true
DEFAULT_CATTLE_CATALOG_URL={"catalogs":{"community":{"url":"https://git.rancher.io/community-er"},"library":{"url":"https://git.rancher.io/rancher-catalog.git","branch":"${RELEASE}"}}}
DEFAULT_CATTLE_COMPOSE_EXECUTOR_EXECUTE=true
DEFAULT_CATTLE_MACHINE_EXECUTE=true
DEFAULT_CATTLE_RANCHER_CLI_DARWIN_URL=https://releases.rancher.com/cli/v0.6.13/rancher-darwin
DEFAULT_CATTLE_RANCHER_CLI_LINUX_URL=https://releases.rancher.com/cli/v0.6.13/rancher-linux-a
DEFAULT_CATTLE_RANCHER_CLI_WINDOWS_URL=https://releases.rancher.com/cli/v0.6.13/rancher-windo
DEFAULT_CATTLE_RANCHER_COMPOSE_DARWIN_URL=https://releases.rancher.com/compose/v0.12.5/ranche2.5.tar.gz
DEFAULT_CATTLE_RANCHER_COMPOSE_LINUX_URL=https://releases.rancher.com/compose/v0.12.5/rancher5.tar.gz
DEFAULT_CATTLE_RANCHER_COMPOSE_WINDOWS_URL=https://releases.rancher.com/compose/v0.12.5/ranch2.5.zip
DEFAULT_CATTLE_SECRETS_API_EXECUTE=true
DEFAULT_CATTLE_WEBHOOK_SERVICE_EXECUTE=true
10:13:23.794 [main] INFO ConsoleStatus - Loading configuration
2019-06-09 10:13:29,181 INFO [main] [ConsoleStatus] Starting DB migration
2019-06-09 10:13:31,523 INFO [main] [ConsoleStatus] DB migration done
2019-06-09 10:13:32,021 INFO [main] [ConsoleStatus] Cluster membership changed [127.0.0.1:
2019-06-09 10:13:32,022 INFO [main] [ConsoleStatus] Checking cluster state on start-up
2019-06-09 10:13:32,023 INFO [main] [ConsoleStatus] Waiting to become master
2019-06-09 10:13:53,813 INFO [main] [ConsoleStatus] Loading processes
2019-06-09 10:13:54,294 INFO [main] [ConsoleStatus] Starting [1/94]: LockDelegatorImpl
2019-06-09 10:13:54,295 INFO [main] [ConsoleStatus] Starting [2/94]: AnnotatedListenerRegi
2019-06-09 10:13:54,302 INFO [main] [ConsoleStatus] Starting [3/94]: EventService
2019-06-09 10:13:54,302 INFO [main] [ConsoleStatus] Starting [4/94]: DefaultObjectMetaData
2019-06-09 10:13:55,281 INFO [main] [ConsoleStatus] Starting [5/94]: JsonDefaultsProvider
2019-06-09 10:13:55,327 INFO [main] [ConsoleStatus] Starting [6/94]: ObjectDefaultsPostIns
2019-06-09 10:13:55,327 INFO [main] [ConsoleStatus] Starting [7/94]: DefaultProcessManager
2019-06-09 10:13:55,328 INFO [main] [ConsoleStatus] Starting [8/94]: SampleDataStartupV3
2019-06-09 10:13:55,334 INFO [main] [ConsoleStatus] Starting [9/94]: TaskManagerImpl
2019-06-09 10:13:55,358 INFO [main] [ConsoleStatus] Starting [10/94]: ServiceAccountCreate
2019-06-09 10:13:55,373 INFO [main] [ConsoleStatus] Starting [11/94]: WebsocketProxyLaunch
2019-06-09 10:13:55,373 INFO [main] [ConsoleStatus] Starting [12/94]: SampleDataStartupV15
2019-06-09 10:13:55,374 INFO [main] [ConsoleStatus] Starting [13/94]: SchemaFactory:v1-adm
2019-06-09 10:13:55,750 INFO [main] [ConsoleStatus] Starting [14/94]: SchemaFactory:v1-age
2019-06-09 10:13:55,769 INFO [main] [ConsoleStatus] Starting [15/94]: SchemaFactory:v1-age
2019-06-09 10:13:55,777 INFO [main] [ConsoleStatus] Starting [16/94]: SchemaFactory:v1-bas
2019-06-09 10:13:56,237 INFO [main] [ConsoleStatus] Starting [17/94]: SchemaFactory:v1-mem
2019-06-09 10:13:56,469 INFO [main] [ConsoleStatus] Starting [18/94]: SchemaFactory:v1-own
2019-06-09 10:13:56,695 INFO [main] [ConsoleStatus] Starting [19/94]: SchemaFactory:v1-pro
2019-06-09 10:13:56,943 INFO [main] [ConsoleStatus] Starting [20/94]: SchemaFactory:v1-pro
2019-06-09 10:13:57,169 INFO [main] [ConsoleStatus] Starting [21/94]: SchemaFactory:v1-rea
time="2019-06-09T10:13:57Z" level=info msg="Downloading key from http://localhost:8081/v1/scr
time="2019-06-09T10:13:57Z" level=fatal msg="Error getting config." error="Invalid key conten
2019-06-09 10:13:57,474 INFO [main] [ConsoleStatus] Starting [22/94]: SchemaFactory:v1-rea
2019-06-09 10:13:57,685 INFO [main] [ConsoleStatus] Starting [23/94]: SchemaFactory:v1-reg
2019-06-09 10:13:57,689 INFO [main] [ConsoleStatus] Starting [24/94]: SchemaFactory:v1-res
2019-06-09 10:13:57,910 INFO [main] [ConsoleStatus] Starting [25/94]: SchemaFactory:v1-ser
2019-06-09 10:13:58,189 INFO [main] [ConsoleStatus] Starting [26/94]: SchemaFactory:v1-tok
2019-06-09 10:13:58,193 INFO [main] [ConsoleStatus] Starting [27/94]: SchemaFactory:v1-use
2019-06-09 10:13:58,419 INFO [main] [ConsoleStatus] Starting [28/94]: AgentBasedProcessHan
2019-06-09 10:13:58,419 INFO [main] [ConsoleStatus] Starting [29/94]: AgentHostStateUpdate
2019-06-09 10:13:58,420 INFO [main] [ConsoleStatus] Starting [30/94]: AgentManager
2019-06-09 10:13:58,420 INFO [main] [ConsoleStatus] Starting [31/94]: AuthServiceLauncher
2019-06-09 10:13:58,421 INFO [main] [ConsoleStatus] Starting [32/94]: BackupCreate
2019-06-09 10:13:58,423 INFO [main] [ConsoleStatus] Starting [33/94]: BackupRemove
2019-06-09 10:13:58,423 INFO [main] [ConsoleStatus] Starting [34/94]: CatalogLauncher
2019-06-09 10:13:58,423 INFO [main] [ConsoleStatus] Starting [35/94]: ComposeExecutorLaunc
2019-06-09 10:13:58,423 INFO [main] [ConsoleStatus] Starting [36/94]: ConfigItemRegistryIm
2019-06-09 10:13:58,568 INFO [main] [ConsoleStatus] Starting [37/94]: ConfigItemServerImpl
2019-06-09 10:13:58,791 INFO [main] [ConsoleStatus] Starting [38/94]: ConfigUpdatePublishe
2019-06-09 10:13:58,792 INFO [main] [ConsoleStatus] Starting [39/94]: DataManager
2019-06-09 10:13:58,792 INFO [main] [ConsoleStatus] Starting [40/94]: DefaultAuthorization
time="2019-06-09T10:13:59Z" level=info msg="Downloading key from http://localhost:8081/v1/scr
time="2019-06-09T10:13:59Z" level=fatal msg="Error getting config." error="Invalid key conten
2019-06-09 10:14:00,070 INFO [main] [ConsoleStatus] Starting [41/94]: DefaultJooqResourceM
2019-06-09 10:14:00,070 INFO [main] [ConsoleStatus] Starting [42/94]: DefaultObjectSeriali
2019-06-09 10:14:00,070 INFO [main] [ConsoleStatus] Starting [43/94]: DockerComposeStackHa
2019-06-09 10:14:00,070 INFO [main] [ConsoleStatus] Starting [44/94]: DynamicExtensionMana
2019-06-09 10:14:00,070 INFO [main] [ConsoleStatus] Starting [45/94]: ExtensionResourceMan
2019-06-09 10:14:00,071 INFO [main] [ConsoleStatus] Starting [46/94]: HostApiRSAKeyProvide
2019-06-09 10:14:00,071 INFO [main] [ConsoleStatus] Starting [47/94]: HostTemplateManager
2019-06-09 10:14:00,071 INFO [main] [ConsoleStatus] Starting [48/94]: ImageStoragePoolMapA
2019-06-09 10:14:00,072 INFO [main] [ConsoleStatus] Starting [49/94]: InstanceHostMapActiv
2019-06-09 10:14:00,073 INFO [main] [ConsoleStatus] Starting [50/94]: InstanceHostMapDeact
2019-06-09 10:14:00,074 INFO [main] [ConsoleStatus] Starting [51/94]: InstanceManager
2019-06-09 10:14:00,074 INFO [main] [ConsoleStatus] Starting [52/94]: IpsecHealthcheckEnab
2019-06-09 10:14:00,075 INFO [main] [ConsoleStatus] Starting [53/94]: LoadBalancerServiceI
2019-06-09 10:14:00,075 INFO [main] [ConsoleStatus] Starting [54/94]: MachineDriverLoader
2019-06-09 10:14:00,077 INFO [main] [ConsoleStatus] Starting [55/94]: MachineLauncher
2019-06-09 10:14:00,077 INFO [main] [ConsoleStatus] Starting [56/94]: MetadataConfigItemFa
2019-06-09 10:14:00,080 INFO [main] [ConsoleStatus] Starting [57/94]: MountRemove
2019-06-09 10:14:00,080 INFO [main] [ConsoleStatus] Starting [58/94]: PostInstancePurge
2019-06-09 10:14:00,080 INFO [main] [ConsoleStatus] Starting [59/94]: PostStartLabelsProvi
2019-06-09 10:14:00,080 INFO [main] [ConsoleStatus] Starting [60/94]: ProjectMemberResourc
2019-06-09 10:14:00,080 INFO [main] [ConsoleStatus] Starting [61/94]: ProjectResourceManag
2019-06-09 10:14:00,080 INFO [main] [ConsoleStatus] Starting [62/94]: PullTaskCreate
2019-06-09 10:14:00,080 INFO [main] [ConsoleStatus] Starting [63/94]: RestoreFromBackup
2019-06-09 10:14:00,080 INFO [main] [ConsoleStatus] Starting [64/94]: RevertToSnapshot
2019-06-09 10:14:00,081 INFO [main] [ConsoleStatus] Starting [65/94]: SampleDataStartupV10
2019-06-09 10:14:00,085 INFO [main] [ConsoleStatus] Starting [66/94]: SampleDataStartupV11
2019-06-09 10:14:00,086 INFO [main] [ConsoleStatus] Starting [67/94]: SampleDataStartupV12
2019-06-09 10:14:00,087 INFO [main] [ConsoleStatus] Starting [68/94]: SampleDataStartupV13
2019-06-09 10:14:00,088 INFO [main] [ConsoleStatus] Starting [69/94]: SampleDataStartupV14
2019-06-09 10:14:00,089 INFO [main] [ConsoleStatus] Starting [70/94]: SampleDataStartupV16
2019-06-09 10:14:00,090 INFO [main] [ConsoleStatus] Starting [71/94]: SampleDataStartupV17
2019-06-09 10:14:00,091 INFO [main] [ConsoleStatus] Starting [72/94]: SampleDataStartupV5
2019-06-09 10:14:00,092 INFO [main] [ConsoleStatus] Starting [73/94]: SampleDataStartupV6
2019-06-09 10:14:00,093 INFO [main] [ConsoleStatus] Starting [74/94]: SampleDataStartupV7
2019-06-09 10:14:00,094 INFO [main] [ConsoleStatus] Starting [75/94]: SampleDataStartupV8
2019-06-09 10:14:00,094 INFO [main] [ConsoleStatus] Starting [76/94]: SampleDataStartupV9
2019-06-09 10:14:00,095 INFO [main] [ConsoleStatus] Starting [77/94]: SecretManager
2019-06-09 10:14:00,096 INFO [main] [ConsoleStatus] Starting [78/94]: SecretsApiLauncher
2019-06-09 10:14:00,096 INFO [main] [ConsoleStatus] Starting [79/94]: ServiceManager
2019-06-09 10:14:00,096 INFO [main] [ConsoleStatus] Starting [80/94]: SettingManager
2019-06-09 10:14:00,096 INFO [main] [ConsoleStatus] Starting [81/94]: SnapshotCreate
2019-06-09 10:14:00,097 INFO [main] [ConsoleStatus] Starting [82/94]: SnapshotRemove
2019-06-09 10:14:00,097 INFO [main] [ConsoleStatus] Starting [83/94]: StackAgentHandler
2019-06-09 10:14:00,097 INFO [main] [ConsoleStatus] Starting [84/94]: StackAgentHandler
2019-06-09 10:14:00,098 INFO [main] [ConsoleStatus] Starting [85/94]: StackAgentHandler
2019-06-09 10:14:00,098 INFO [main] [ConsoleStatus] Starting [86/94]: StackAgentHandler
2019-06-09 10:14:00,098 INFO [main] [ConsoleStatus] Starting [87/94]: StackAgentHandler
2019-06-09 10:14:00,099 INFO [main] [ConsoleStatus] Starting [88/94]: TelemetryLauncher
2019-06-09 10:14:00,099 INFO [main] [ConsoleStatus] Starting [89/94]: VolumeManager
2019-06-09 10:14:00,099 INFO [main] [ConsoleStatus] Starting [90/94]: VolumeRemove
2019-06-09 10:14:00,100 INFO [main] [ConsoleStatus] Starting [91/94]: VolumeStoragePoolMap
2019-06-09 10:14:00,100 INFO [main] [ConsoleStatus] Starting [92/94]: VolumeStoragePoolMap
2019-06-09 10:14:00,100 INFO [main] [ConsoleStatus] Starting [93/94]: WebhookServiceLaunch
2019-06-09 10:14:00,101 INFO [main] [ConsoleStatus] Starting [94/94]: project.template.rel
2019-06-09 10:14:00,198 INFO [main] [ConsoleStatus] [DONE ] [40330ms] Startup Succeeded, L
time="2019-06-09T10:14:00Z" level=info msg="Starting rancher-compose-executor" version=v0.14.
time="2019-06-09T10:14:00Z" level=fatal msg="Unable to create event router" error="Get http:/al tcp 127.0.0.1:8080: getsockopt: connection refused"
time="2019-06-09T10:14:00Z" level=warning msg="Couldn't load install uuid: Get http://localho27.0.0.1:8080: getsockopt: connection refused. Sleep 250ms and retry"
time="2019-06-09T10:14:00Z" level=fatal msg="Failed to configure cattle client: Get http://lotcp 127.0.0.1:8080: connect: connection refused"
time="2019-06-09T10:14:00Z" level=warning msg="Couldn't load install uuid: Get http://localho27.0.0.1:8080: getsockopt: connection refused. Sleep 500ms and retry"
time="2019-06-09T10:14:01Z" level=warning msg="Couldn't load install uuid: Get http://localho27.0.0.1:8080: getsockopt: connection refused. Sleep 1s and retry"
time="2019-06-09T10:14:01Z" level=info msg="Downloading key from http://localhost:8081/v1/scr
time="2019-06-09T10:14:01Z" level=info msg="Starting websocket proxy. Listening on [:8080], Pocalhost:8081], Monitoring parent pid [10]."
time="2019-06-09T10:14:01Z" level=info msg="Configured http API filter"
time="2019-06-09T10:14:01Z" level=info msg="Configured authTokenValidator API filter"
time="2019-06-09T10:14:01Z" level=info msg="Master config file: master.conf"
time="2019-06-09T10:14:01Z" level=info msg="Downloading certificate from http://localhost:808icate"
time="2019-06-09T10:14:02Z" level=info msg="Starting go-machine-service..." gitcommit=v0.39.4
time="2019-06-09T10:14:02Z" level=info msg="Waiting for handler registration (1/2)" service=g
time="2019-06-09T10:14:02Z" level=info msg="Webhook service listening on 8085"
time="2019-06-09T10:14:02Z" level=info msg="Starting rancher-compose-executor" version=v0.14.
time="2019-06-09T10:14:02Z" level=info msg="Fetch uuid 30298836-8939-4754-986a-38c399eaf4f1 s
time="2019-06-09T10:14:02Z" level=info msg="Starting Catalog Service (port 8088, refresh inte
time="2019-06-09T10:14:02Z" level=info msg="Starting Rancher Auth service"
time="2019-06-09T10:14:03Z" level=info msg="No Auth provider configured"
time="2019-06-09T10:14:03Z" level=info msg="Initializing event router" workerCount=5
time="2019-06-09T10:14:04Z" level=info msg="Listening on :8090"
time="2019-06-09T10:14:04Z" level=info msg="Connection established"
time="2019-06-09T10:14:04Z" level=info msg="Starting websocket pings"
time="2019-06-09T10:14:04Z" level=info msg="Waiting for handler registration (2/2)" service=g
time="2019-06-09T10:14:04Z" level=info msg="Initializing event router" workerCount=250
time="2019-06-09T10:14:04Z" level=info msg="Connection established"
time="2019-06-09T10:14:04Z" level=info msg="Starting websocket pings"
time="2019-06-09T10:14:04Z" level=info msg="Installing builtin drivers" service=gms
time="2019-06-09T10:14:04Z" level=info msg="Initializing event router" workerCount=250
time="2019-06-09T10:14:04Z" level=info msg="Connection established"
time="2019-06-09T10:14:04Z" level=info msg="Starting websocket pings"
time="2019-06-09T10:14:07Z" level=info msg="Waiting for machinedriver.activate event" service
time="2019-06-09T10:14:10Z" level=info msg="Waiting for machinedriver.activate event" service
time="2019-06-09T10:14:10Z" level=info msg="Initializing event router" workerCount=250
time="2019-06-09T10:14:10Z" level=info msg="Connection established"
time="2019-06-09T10:14:10Z" level=info msg="Starting websocket pings"
time="2019-06-09T10:14:13Z" level=info msg="Waiting for machinedriver.activate event" service
time="2019-06-09T10:14:16Z" level=info msg="machinedriver.activate event detected" service=gm
time="2019-06-09T10:14:16Z" level=info msg="Downloading all drivers" service=gms
time="2019-06-09T10:14:16Z" level=info msg="Download https://github.com/packethost/docker-mac/download/v0.1.2/docker-machine-driver-packet_linux-amd64.zip" service=gms
time="2019-06-09T10:14:17Z" level=info msg="Found driver docker-machine-driver-packet" servic
time="2019-06-09T10:14:17Z" level=info msg="Copying /var/lib/cattle/machine-drivers/1f70583418e9ca5f57d5a650a049bcd5945e9-docker-machine-driver-packet => /usr/local/bin/docker-machine-drs
time="2019-06-09T10:14:17Z" level=info msg="Done downloading all drivers" service=gms
答案 0 :(得分:0)
出于未知原因,
CATTLE_DB_CATTLE_MYSQL_HOST=172.31.5.211
与您提到的--db-host
不同:
docker run --restart=unless-stopped -p 8080:8080 rancher/server --db-host 172.26.3.141 --db-port 3306 --db-user rancher --db-pass xxxx --db-name rancher