以下软件是需要自己部署安装的。根据不同的系统,百度一下方法即可,网上很多方法。
需注意因使用到了json类型的字段,因此MySQL需是5.7以上的版本。
MySQL > 5.7
Go >= 1.14
Redis 新版即可
node >= v12 (稳定版本)
npm >= v6.14.8
拉取代码
git clone https://github.com/lanyulei/ferry.git
或者
git clone https://gitee.com/yllan/ferry.git
进入项目目录
cd ferry
执行部署脚本
./build.sh install
按照脚本提示的要求,进行输入。
需要注意的一点是,MySQL和Redis配置信息修改的时候,不要关闭 ./build.sh 的脚本程序,直接去修改脚本提供的配置文件路径即可。
修改完后,进入下一步即可。
启动服务
cd build
./ferry server -c=config/settings.yml
访问脚本最开始让你输入的地址,测试一下能否访问到。
评论列表(63条)
{“level”:”fatal”,”ts”:”2021-08-10 18:28:29.385683″,”caller”:”database/mysql.go:35″,”msg”:”mysql connect error dial tcp: lookup ferry_mysql on 100.100.2.138:53: no such host”}
有上面的异常提示,请教一下,如何解决
@zyl:数据库连接有问题吧。确认数据库地址是否正确。
@兰玉磊:同样的问题
部署完成后,验证码刷不出来,日志报404
@zzz:请问大佬这个问题您解决了吗?
部署完成后,验证码刷不出来,日志报404
{“level”:”info”,”ts”:”2021-08-11 11:10:07.456888″,”caller”:”middleware/logger.go:39″,”msg”:” 2021-08-11 11:10:07.4568 404 10.881µs 10.102.10.21 GET /172.16.15.90/api/v1/settings?classify=1″}
{“level”:”info”,”ts”:”2021-08-11 11:10:07.481427″,”caller”:”middleware/logger.go:39″,”msg”:” 2021-08-11 11:10:07.4398 200 41.539078ms 10.102.10.21 GET /static/web/js/chunk-16212a04.8b3ebcf8.js”}
{“level”:”info”,”ts”:”2021-08-11 11:10:07.512741″,”caller”:”middleware/logger.go:39″,”msg”:” 2021-08-11 11:10:07.5126 200 96.25µs 10.102.10.21 GET /static/web/fonts/element-icons.535877f5.woff”}
{“level”:”info”,”ts”:”2021-08-11 11:10:07.628001″,”caller”:”middleware/logger.go:39″,”msg”:” 2021-08-11 11:10:07.6278 200 152.436µs 10.102.10.21 GET /static/web/img/login.ede1cdb8.png”}
{“level”:”info”,”ts”:”2021-08-11 11:10:07.655141″,”caller”:”middleware/logger.go:39″,”msg”:” 2021-08-11 11:10:07.6551 404 14.678µs 10.102.10.21 GET /172.16.15.90/api/v1/getCaptcha”}
@zzz:F12看下访问的地址,是否正确。
@zzz:/localhost/api/v1/settings?classify=1 ,问下:为何多出localhost的目录
@leon:请问大佬您这个问题解决了吗?
@fands:Failed to load resource: the server responded with a status of 404 (Not Found)
chunk-libs.bb4e6098.js:64 Uncaught (in promise) Error: Request failed with status code 404
at t.exports (chunk-libs.bb4e6098.js:64)
at t.exports (chunk-libs.bb4e6098.js:64)
at XMLHttpRequest.g (chunk-libs.bb4e6098.js:64)
:8002/192.168.10.220/api/v1/getCaptcha:1 Failed to load resource: the server responded with a status of 404 (Not Found)
chunk-libs.bb4e6098.js:64 Uncaught (in promise) Error: Request failed with status code 404
at t.exports (chunk-libs.bb4e6098.js:64)
at t.exports (chunk-libs.bb4e6098.js:64)
at XMLHttpRequest.g (chunk-libs.bb4e6098.js:64)
:8002/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:8002/192.168.10.220/api/v1/getCaptcha:1 Failed to load resource: the server responded with a status of 404 (Not Found)
chunk-libs.bb4e6098.js:64 Uncaught (in promise) Error: Request failed with status code 404
at t.exports (chunk-libs.bb4e6098.js:64)
at t.exports (chunk-libs.bb4e6098.js:64)
at XMLHttpRequest.g (chunk-libs.bb4e6098.js:64)
@lele:同问
@zzz:有解决办法么,遇到同样的问题.
@zzz:我也有类似的问题
go: github.com/RichardKnop/machinery@v1.8.8: Get “https://proxy.golang.org/github.com/%21richard%21knop/machinery/@v/v1.8.8.mod”: dial tcp 172.217.24.17:443: i/o timeout
这个可以更改链接么!?
@xpy:按照这个方法,配置一下试试。https://www.fdevops.com/2020/03/22/fix-go-get
@xpy:请问你这个问题解决了吗?
部署完成后,可以登录,但是在系统管理中,可以添加用户或者岗位,但是不能删除,提示是服务器连接异常,但是看服务器是没有报错信息的,请问怎么解决啊
@ww:确认下,请求的地址,是你自己部署的地址吗?
@兰玉磊:是的,在.env.production中可以看到我添加的地址
@ww:可加群,详细聊聊。
>>> 开始编译后端程序…
go: github.com/RichardKnop/machinery@v1.8.8: Get https://proxy.golang.org/github.com/%21richard%21knop/machinery/@v/v1.8.8.mod: dial tcp 172.217.27.145:443: i/o timeout
编译后端代码失败,退出安装
@evolos:希望它可以帮到你。https://www.fdevops.com/2020/03/22/fix-go-get
@兰玉磊:安装完了,登录网页一直显示‘’‘正在加载系统资源,请耐心等待’‘。进不去了。。。。求助。。。。
@evolos:F12 看下报错,或者加群详聊。
>>> 开始编译后端程序…
go: golang.org/x/crypto@v0.0.0-20200622213623-75b288015ac9: unrecognized import path “golang.org/x/crypto”: https fetch: Get “https://golang.org/x/crypto?go-get=1”: dial tcp 216.58.200.49:443: i/o timeout
编译后端代码失败,退出安装
@111:希望它可以帮到你,https://www.fdevops.com/2020/03/22/fix-go-get
@兰玉磊:使用第一种git clone https://github.com/golang/下在之后,重新编译的时候他还是提示超时,还是要去下载,怎么能跳过这个步骤
@111:配置一下。goproxy
@兰玉磊:clone下来golang ,如果配置goproxy, 地址是什么?
@111:同样的错,你的弄好了吗 ,clone下来golang ,如果配置goproxy, 地址是什么?
楼主,qq群是多少呀
@jiakunbao:1043807251
@兰玉磊:谢谢,麻烦楼主通过下qq群
您这个问题解决了吗?
ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-element-admin@4.2.1 build:prod: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-element-admin@4.2.1 build:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-10-20T09_37_20_646Z-debug.log
这个ERR如何解决
@zzz:看不出来。
{“level”:”fatal”,”ts”:”2021-10-27 17:10:07.427611″,”caller”:”database/mysql.go:35″,”msg”:”mysql connect error dial tcp: lookup ferry_mysql on 127.0.0.53:53: server misbehaving”}
请教一下,这个问题如何解决
@zzn:数据库连接异常。
您好,按照您这边的方式部署好了,最后一步 ./ferry server -c=config/settings.yml
您好,这边按照您的文档部署好了,然后./ferry server -c=config/settings.yml启动服务之后,输出:
2021/10/28 17:49:01 Server Run http://0.0.0.0:8002/
2021/10/28 17:49:01 Swagger URL http://0.0.0.0:8002/swagger/index.html
2021/10/28 17:49:01 Enter Control + C Shutdown Server
但是去访问页面的时候 无法访问该页面
也没有日志可以看,请教一下,这是哪个地方搞错了导致的么,感谢!
@!:报错是啥呢?
作者大大,我按照脚本部署的方式按照以后,运行./ferry server -c=config/settings.yml 启动服务后 没有提示错误,我输入外网ip:8002,可以打开网站,但是验证码不显示,提示Request failed with status code 404。这是什么问题?
@superabbite:没有找到对应的后端服务,推荐docker方式部署。
安装报错了:
Install fail! Error: [tui-editor@1.3.3 ? tui-chart@3.11.3 ? raphael@git+https://github.com/nhn/raphael.git#2.2.0-c] git dep preparation failed
Error: [tui-editor@1.3.3 ? tui-chart@3.11.3 ? raphael@git+https://github.com/nhn/raphael.git#2.2.0-c] git dep preparation failed
at module.exports (/usr/local/lib/node_modules/cnpm/node_modules/npminstall/lib/download/git.js:36:11)
at async module.exports (/usr/local/lib/node_modules/cnpm/node_modules/npminstall/lib/download/index.js:17:12)
at async _install (/usr/local/lib/node_modules/cnpm/node_modules/npminstall/lib/install.js:125:16)
at async install (/usr/local/lib/node_modules/cnpm/node_modules/npminstall/lib/install.js:26:12)
at async mapper (/usr/local/lib/node_modules/cnpm/node_modules/npminstall/lib/install.js:266:9)
离谱,卡在[75/81] Installing zrender@4.3.2 一个多小时了
@琉璃:终止,然后多试几次,前端依赖下载确实会有这种问题。
部署完成后,启动服务时有以下报错,是哪里的问题。有朋友有类似的情况吗?
{“level”:”error”,”ts”:”2022-04-23 14:08:16.067449″,”caller”:”worker/worker.go:41″,”msg”:”执行失败: NOAUTH Authentication required.”}
WARNING: 2022/04/23 14:08:16 retry.go:20 Retrying in 1 seconds
{“level”:”error”,”ts”:”2022-04-23 14:08:17.068194″,”caller”:”worker/worker.go:41″,”msg”:”执行失败: NOAUTH Authentication required.”}
WARNING: 2022/04/23 14:08:17 retry.go:20 Retrying in 2 seconds
{“level”:”error”,”ts”:”2022-04-23 14:08:19.069012″,”caller”:”worker/worker.go:41″,”msg”:”执行失败: NOAUTH Authentication required.”}
WARNING: 2022/04/23 14:08:19 retry.go:20 Retrying in 3 seconds
{“level”:”error”,”ts”:”2022-04-23 14:08:22.069827″,”caller”:”worker/worker.go:41″,”msg”:”执行失败: NOAUTH Authentication required.”}
WARNING: 2022/04/23 14:08:22 retry.go:20 Retrying in 5 seconds
{“level”:”error”,”ts”:”2022-04-23 14:08:27.071925″,”caller”:”worker/worker.go:41″,”msg”:”执行失败: NOAUTH Authentication required.”}
WARNING: 2022/04/23 14:08:27 retry.go:20 Retrying in 8 seconds
{“level”:”error”,”ts”:”2022-04-23 14:08:35.072829″,”caller”:”worker/worker.go:41″,”msg”:”执行失败: NOAUTH Authentication required.”}
@大聪明:redis 密码的问题。配置文件中,配置一下 redis 的密码。
您好,执行脚本./ferry server -c=config/settings.yml 后,能正常链接数据库,但访问不了,日志如下:
2022/06/17 08:35:35 starting api server
{“level”:”info”,”ts”:”2022-06-17 08:35:35.750274″,”caller”:”database/mysql.go:37″,”msg”:”mysql connect success!”}
INFO: 2022/06/17 08:35:35 worker.go:57 Launching a worker with the following settings:
INFO: 2022/06/17 08:35:35 worker.go:58 – Broker: redis://127.0.0.1:6379
INFO: 2022/06/17 08:35:35 worker.go:60 – DefaultQueue: ServerTasksQueue
INFO: 2022/06/17 08:35:35 worker.go:64 – ResultBackend: ://
INFO: 2022/06/17 08:35:35 redis.go:96 [*] Waiting for messages. To exit press CTRL+C
[GIN-debug] [WARNING] Running in “debug” mode. Switch to “release” mode in production.
– using env: export GIN_MODE=release
– using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET /info –> ferry/handler.Ping (7 handlers)
[GIN-debug] GET /static/*filepath –> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (7 handlers)
[GIN-debug] HEAD /static/*filepath –> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (7 handlers)
panic: html/template: pattern matches no files: `template/web/index.html`
goroutine 1 [running]:
html/template.Must(…)
/usr/lib/golang/src/html/template/template.go:374
github.com/gin-gonic/gin.(*Engine).LoadHTMLGlob(0xc00061e340, 0x1581b12, 0x17)
/root/go/pkg/mod/github.com/gin-gonic/gin@v1.7.0/gin.go:209 +0x385
ferry/router.sysStaticFileRouter(0xc0004b2f00, 0xc00061e340)
/opt/ferry/router/router.go:39 +0x78
ferry/router.InitSysRouter(0xc00061e340, 0xc0006c2d80, 0x1573d18)
/opt/ferry/router/router.go:23 +0xdd
ferry/router.InitRouter(0xc0001905a0)
/opt/ferry/router/init_router.go:25 +0xd0
ferry/cmd/api.run(0x0, 0x0)
/opt/ferry/cmd/api/server.go:72 +0xd1
ferry/cmd/api.glob..func2(0x343d480, 0xc000dd00b0, 0x0, 0x1, 0x0, 0x0)
/opt/ferry/cmd/api/server.go:37 +0x25
github.com/spf13/cobra.(*Command).execute(0x343d480, 0xc000dd00a0, 0x1, 0x1, 0x343d480, 0xc000dd00a0)
/root/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0x343d1e0, 0x41ad01, 0x0, 0x0)
/root/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x375
github.com/spf13/cobra.(*Command).Execute(…)
/root/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
ferry/cmd.Execute()
/opt/ferry/cmd/cobra.go:39 +0x2d
main.main()
/opt/ferry/main.go:8 +0x25
@逍遥书生:缺少文件,文档里有介绍,看下吧。
@兰玉磊:您还在线不
@兰玉磊:文档哪里有介绍呢
@逍遥书生:同样的问题,文档位置找到了吗》或者有没有解决办法
pkg/task/worker/worker.go:49:9: worker.SetPostTaskHandler undefined (type *machinery.Worker has no field or method SetPostTaskHandler)
pkg/task/worker/worker.go:51:9: worker.SetPreTaskHandler undefined (type *machinery.Worker has no field or method SetPreTaskHandler)
对小白完全看不懂,全部配置完没报错但是打不开
{“level”:”fatal”,”ts”:”2023-02-17 14:05:47.850058″,”caller”:”database/mysql.go:35″,”msg”:”mysql connect error dial tcp: lookup ferry_mysql on 183.60.83.19:53: no such host”}
free版本对于配置文件的说明可否详细点?
@卡酷:ok
# github.com/golang-jwt/jwt
/home/hyh/gopath/pkg/mod/github.com/golang-jwt/jwt@v3.2.2+incompatible/ecdsa.go:135:4: r.FillBytes undefined (type *big.Int has no field or method FillBytes)
/home/hyh/gopath/pkg/mod/github.com/golang-jwt/jwt@v3.2.2+incompatible/ecdsa.go:136:4: s.FillBytes undefined (type *big.Int has no field or method FillBytes)
>>> 开始安装前端依赖…
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-02-27T06_37_48_623Z-debug-0.log
./build.sh: line 210: cnpm: command not found
@yikebantang:可加群或者加微信看下。
@yikebantang:我也是
@yikebantang:哥们解决了吗,一摸一样问题
安装脚本中,能否直接带上mysql和redis的安装呢?这样只要把操作系统准备好,一条命令就可以搞定不是更方便?
我的软硬件环境:
1、硬件:Intel i7 CPU、16GB内存、512GB SSD硬盘
2、软件:Anolis OS 8.8 龙蜥操作系统 内核 5.10。138 只打了补丁
Docker启动的Mysql 8 和 redis 6
node v20.12.0
npm 10.5.0
cnpm 9.4.0
一、安装过程中提示:
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired
二、安装到最后提示:
编译后端代码失败,退出安装
请问该如何解决?
本地以dnf命令安装了mysql 8 ,以官方源码方式编译安装了 redis 6.26,配置了host,都可以ping ferry_mysql 和 ferry_redis 了,也核对了 ferry/config/settings.yml里的配置,最后以 docker 方式启动 ferry 都正常,然后用docker ps -a 查看,提示ferry 这个容器的状态 是Exited。