Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yapi-web启动失败了 #22

Closed
LL3706 opened this issue Apr 6, 2020 · 65 comments
Closed

yapi-web启动失败了 #22

LL3706 opened this issue Apr 6, 2020 · 65 comments
Labels
enhancement New feature or request

Comments

@LL3706
Copy link

LL3706 commented Apr 6, 2020

我的配置文件
`version: '3'

services:
yapi-web:
image: jayfong/yapi:latest
container_name: yapi-web
ports:
- 40001:3000
environment:
- YAPI_ADMIN_ACCOUNT=admin@163.com
- YAPI_ADMIN_PASSWORD=admin
- YAPI_CLOSE_REGISTER=true
- YAPI_DB_SERVERNAME=yapi-mongo
- YAPI_DB_PORT=27017
- YAPI_DB_DATABASE=yapi
- YAPI_MAIL_ENABLE=false
- YAPI_LDAP_LOGIN_ENABLE=false
- YAPI_PLUGINS=[{"name":"add-user"}]
- YAPI_NPM_REGISTRY=https://registry.npm.taobao.org
depends_on:
- yapi-mongo
links:
- yapi-mongo
restart: unless-stopped
yapi-mongo:
image: mongo:latest
container_name: yapi-mongo
volumes:
- ./data/db:/data/db
expose:
- 27017
restart: unless-stopped
`

image

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

哪里配置的不对吗,请大佬支持下

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

mongo 启动是好的

image

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

我加了start.js 还是不行,一样的错误

image

@fjc0k
Copy link
Owner

fjc0k commented Apr 6, 2020

你什么都没动过?编辑过没?在什么上用什么编辑的?

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

我只改了dokcer-compose.yml文件

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

js 没有改过,是复制粘贴进去的

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

用服务器vim 命令修改的yml 文件

@fjc0k
Copy link
Owner

fjc0k commented Apr 6, 2020

你是不是把换行符号从 lf 整成 crlf 了,你重新 clone,啥都别动再试试,ok那就是你编辑器原因

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

把原来文件夹都删掉吗,我试试

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

我重新clone 了

image

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

我重新修改yml 文件吗

@fjc0k
Copy link
Owner

fjc0k commented Apr 6, 2020

啥都别动 启动看看

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

好的

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

我啥都没有动

image

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

我刚才用vim 看了一眼配置文件yml,没有改,难道这也影响吗

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

我感觉说不通啊,mongo 服务都是好的,就yapi-web 服务启动不了

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020


image

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020


image

@fjc0k
Copy link
Owner

fjc0k commented Apr 6, 2020

建议你搜索:

standard_init_linux.go:190: exec user process caused "exec format error"

自行解决

@fjc0k
Copy link
Owner

fjc0k commented Apr 6, 2020

建议你升级下 docker 再试试

image

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

我搜了,说是脚本前面没有加#!bin/bash ,但是试了下,还是那个错误

image

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

好吧,我试试升级docker

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

image
我升级了版本但是还是报原来的错,太匪夷所思了

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020


image

@LL3706
Copy link
Author

LL3706 commented Apr 6, 2020

image
已经升级到最新版本的

@LL3706
Copy link
Author

LL3706 commented Apr 9, 2020

大佬,我查了资料,这个错误是指容器镜像格式错误,意思就是说这个用的是X86的镜像,需要替换成ARM镜像,现在问题是有没有ARM的镜像

@fjc0k
Copy link
Owner

fjc0k commented Apr 9, 2020

好的,找到问题出在哪里就好办了,晚上搞搞

@fjc0k fjc0k added the enhancement New feature or request label Apr 9, 2020
@LL3706
Copy link
Author

LL3706 commented Apr 9, 2020

好的,辛苦了,这是源头https://bbs.huaweicloud.com/forum/thread-26434-1-1.html

image

@LL3706
Copy link
Author

LL3706 commented Apr 9, 2020

好的,找到问题出在哪里就好办了,晚上搞搞

大佬,有思路吗

@fjc0k
Copy link
Owner

fjc0k commented Apr 9, 2020

😄 超时了,最好给 docker 搞个国内镜像

@LL3706
Copy link
Author

LL3706 commented Apr 9, 2020

😄 超时了,最好给 docker 搞个国内镜像

修改daemon.json 文件吗

@LL3706
Copy link
Author

LL3706 commented Apr 9, 2020

😄 超时了,最好给 docker 搞个国内镜像

修改daemon.json 文件吗

但是你上传的是dockerHub 啊

@fjc0k
Copy link
Owner

fjc0k commented Apr 9, 2020

@fjc0k
Copy link
Owner

fjc0k commented Apr 9, 2020

不用阿里也有其他家的,自行选择一个源

@LL3706
Copy link
Author

LL3706 commented Apr 9, 2020

不用阿里也有其他家的,自行选择一个源

[
image

](url)
这个行不

@fjc0k
Copy link
Owner

fjc0k commented Apr 9, 2020

你试试吧

@LL3706
Copy link
Author

LL3706 commented Apr 9, 2020

你试试吧

image

@LL3706
Copy link
Author

LL3706 commented Apr 9, 2020

你试试吧

image

这个应该拉下来

@LL3706
Copy link
Author

LL3706 commented Apr 9, 2020

你试试吧

image

这个应该拉下来

太慢了,明天看结果吧,感谢大佬的支持

@fjc0k
Copy link
Owner

fjc0k commented Apr 9, 2020

阿里快呀 😂

@LL3706
Copy link
Author

LL3706 commented Apr 9, 2020

阿里快呀 😂

我原来就是用ali 的镜像加速器,结果拉不下来

@LL3706
Copy link
Author

LL3706 commented Apr 9, 2020

阿里快呀 😂

我原来就是用ali 的镜像加速器,结果拉不下来

image
终于不报那个错了,但是还是启动不了

@LL3706
Copy link
Author

LL3706 commented Apr 9, 2020

这是新的错误
<--- Last few GCs --->
yapi-web |
yapi-web |
yapi-web | <--- JS stacktrace --->
yapi-web |
yapi-web |
yapi-web | #
yapi-web | # Fatal process OOM in insufficient memory to create an Isolate
yapi-web | #

@fjc0k
Copy link
Owner

fjc0k commented Apr 9, 2020

内存不足,还是换一台服务器吧。话说你这服务器啥配置啊

@LL3706
Copy link
Author

LL3706 commented Apr 10, 2020

内存不足,还是换一台服务器吧。话说你这服务器啥配置啊
内存1G ,我在别的服务器上安装好,把镜像复制过来能运行吗

@fjc0k
Copy link
Owner

fjc0k commented Apr 10, 2020

image

你可以把插件去掉试试

@LL3706 LL3706 closed this as completed Apr 10, 2020
@fjc0k
Copy link
Owner

fjc0k commented Apr 10, 2020

? 去掉插件好了?

@LL3706
Copy link
Author

LL3706 commented Apr 10, 2020

? 去掉插件好了?

正在进行中。。。稍等。。。

@LL3706
Copy link
Author

LL3706 commented Apr 10, 2020

? 去掉插件好了?

正在进行中。。。稍等。。。

现在华为云 挂了。。。。

@fjc0k
Copy link
Owner

fjc0k commented Apr 10, 2020

挂了。。。

@LL3706
Copy link
Author

LL3706 commented Apr 10, 2020

挂了。。。
去掉插件还是报这错
yapi-web | <--- Last few GCs --->
yapi-web |
yapi-web |
yapi-web | <--- JS stacktrace --->
yapi-web |
yapi-web |
yapi-web | #
yapi-web | # Fatal process OOM in insufficient memory to create an Isolate
yapi-web | #
yapi-web |
yapi-web |
yapi-web | <--- Last few GCs --->
yapi-web |
yapi-web |
yapi-web | <--- JS stacktrace --->
yapi-web |
yapi-web |
yapi-web | #
yapi-web | # Fatal process OOM in insufficient memory to create an Isolate
yapi-web | #
yapi-web |

@LL3706
Copy link
Author

LL3706 commented Apr 10, 2020

挂了。。。
去掉插件还是报这错
yapi-web | <--- Last few GCs --->
yapi-web |
yapi-web |
yapi-web | <--- JS stacktrace --->
yapi-web |
yapi-web |
yapi-web | #
yapi-web | # Fatal process OOM in insufficient memory to create an Isolate
yapi-web | #
yapi-web |
yapi-web |
yapi-web | <--- Last few GCs --->
yapi-web |
yapi-web |
yapi-web | <--- JS stacktrace --->
yapi-web |
yapi-web |
yapi-web | #
yapi-web | # Fatal process OOM in insufficient memory to create an Isolate
yapi-web | #
yapi-web |
能不能在别的服务器上把镜像搞好,然后复制到这台服务器上,能运行吗

@fjc0k
Copy link
Owner

fjc0k commented Apr 10, 2020

不行哦

@LL3706
Copy link
Author

LL3706 commented Apr 10, 2020

不行哦

image
你在这里说不是可以吗

@fjc0k
Copy link
Owner

fjc0k commented Apr 10, 2020

我说的是插件,把插件打包进镜像,你这不要插件镜像都启动不了。

@LL3706
Copy link
Author

LL3706 commented Apr 10, 2020

我说的是插件,把插件打包进镜像,你这不要插件镜像都启动不了。

好吧,明白了,用docker-compose 安装 不了yapi

@fjc0k
Copy link
Owner

fjc0k commented Apr 10, 2020

你可以考虑升级个 0.5G 的内存

@LL3706
Copy link
Author

LL3706 commented Apr 10, 2020

你可以考虑升级个 0.5G 的内存

好的,感谢您的指导

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants