This download does NOT match an earlier download recorded in go.sum.

SECURITY ERROR

This download does NOT match an earlier download recorded in go.sum.

Networking

go clean -modcache

del go.sum

go mod tidy

Go modules: checksum mismatch

go.sum security error

go env

bash 复制代码
set GO111MODULE=
set GOARCH=amd64
set GOBIN=E:\usr\local\golang\go1.13\bin
set GOCACHE=C:\Users\xxx\AppData\Local\go-build
set GOENV=C:\Users\xxxAppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=E:\usr\local\golang\code\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=E:\usr\local\golang\code
set GOPRIVATE=
set GOPROXY=https://goproxy.io
set GOROOT=E:\usr\local\golang\go1.13
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=E:\usr\local\golang\go1.13\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.18.10
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=M:\GolandProjects\mosn-1.6.0\go.mod
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=E:\tmp\go-build2946792011=/tmp/go-build -gno-record-gcc-switches

设置本机http代理

M:\GolandProjects\mosn-1.6.0>echo %http_proxy%

127.0.0.1:8226

M:\GolandProjects\mosn-1.6.0>echo %https_proxy%

127.0.0.1:8226

go mod tidy

新增admin用户添加到gousers组

* admin.sh

bash 复制代码
#!/usr/bin/bash

set -x

USER=admin
PASSWD=admin

groupadd gousers
useradd ${USER} -g gousers

echo ${USER}:${PASSWD} | chpasswd
echo ${USER} | passwd --stdin ${PASSWD}

chmod g+r,g+x /home/${USER}

chmod a+x ./admin.sh

sudo ./admin.sh

mosn

make build-local

admin@vultr mosn-1.6.0\]$ ./build/bundles/v1.6.0/binary/mosnd start -c ./build/bundles/v1.6.0/binary/mosn_config.json 或者用这个./configs/mosn_config.json配置文件 [防火墙![icon-default.png?t=N7T8](https://file.jishuzhan.net/article/1783757433772969986/c9868f5524aa31bbc2ae673827f18730.webp)https://blog.csdn.net/fareast_mzh/article/details/137462544](https://blog.csdn.net/fareast_mzh/article/details/137462544 "防火墙") 允许34901端口 ![](https://file.jishuzhan.net/article/1783757433772969986/48b6c6b64fe752d5883878685e38f6ff.webp) mosn.json ```javascript { "servers":[ { "default_log_path":"stdout", "routers":[ { "router_config_name":"server_router", "virtual_hosts":[{ "name":"serverHost", "domains": ["*"], "routers": [ { "match":{"prefix":"/"}, "route":{"cluster_name":"serverCluster"} } ] }] }, { "router_config_name":"client_router", "virtual_hosts":[{ "name":"clientHost", "domains": ["*"], "routers": [ { "match":{"prefix":"/"}, "route":{"cluster_name":"clientCluster"} } ] }] }, { "router_config_name":"application", "virtual_hosts":[{ "name":"appHost", "domains": ["*"], "routers": [ { "match":{"prefix":"/"}, "direct_response":{ "status": 200, "body": "Welcome to MOSN!\nThe Cloud-Native Network Proxy Platform.\n" } } ] }] } ], "listeners":[ { "name":"appListener", "address": "127.0.0.1:2047", "bind_port": true, "filter_chains": [{ "filters": [ { "type": "proxy", "config": { "downstream_protocol": "Http1", "router_config_name":"application" } } ] }] }, { "name":"serverListener", "address": "127.0.0.1:2046", "bind_port": true, "filter_chains": [{ "filters": [ { "type": "proxy", "config": { "downstream_protocol": "Auto", "router_config_name":"server_router" } } ] }] }, { "name":"clientListener", "address": "127.0.0.1:2045", "bind_port": true, "filter_chains": [{ "filters": [ { "type": "proxy", "config": { "downstream_protocol": "Http1", "router_config_name":"client_router" } } ] }] } ] } ], "cluster_manager":{ "clusters":[ { "name":"serverCluster", "type": "SIMPLE", "lb_type": "LB_RANDOM", "max_request_per_conn": 1024, "conn_buffer_limit_bytes":32768, "hosts":[ {"address":"127.0.0.1:2047"} ] }, { "name": "clientCluster", "type": "SIMPLE", "lb_type": "LB_RANDOM", "max_request_per_conn": 1024, "conn_buffer_limit_bytes":32768, "hosts":[ {"address":"127.0.0.1:2046"} ] } ] }, "admin": { "address": { "socket_address": { "address": "0.0.0.0", "port_value": 34901 } } } } ``` \[admin@[vultr](https://www.vultr.com/?ref=7922375 "vultr") \~\]$ curl -i http://127.0.0.1:2046 HTTP/1.1 200 OK Date: Thu, 25 Apr 2024 01:42:00 GMT Content-Type: text/plain; charset=utf-8 Content-Length: 58 Host: 127.0.0.1:2046 User-Agent: curl/7.29.0 Accept: \*/\* Welcome to MOSN! The Cloud-Native Network Proxy Platform. \[admin@[vultr](https://www.vultr.com/?ref=7922375 "vultr") \~\]$ curl -i http://127.0.0.1:2045 HTTP/1.1 200 OK Date: Thu, 25 Apr 2024 01:42:02 GMT Content-Type: text/plain; charset=utf-8 Content-Length: 58 Host: 127.0.0.1:2045 User-Agent: curl/7.29.0 Accept: \*/\* Welcome to MOSN! The Cloud-Native Network Proxy Platform. \[admin@[vultr](https://www.vultr.com/?ref=7922375 "vultr") \~\]$ curl -i http://127.0.0.1:2047 HTTP/1.1 200 OK Date: Thu, 25 Apr 2024 01:42:04 GMT Content-Type: text/plain; charset=utf-8 Content-Length: 58 Host: 127.0.0.1:2047 User-Agent: curl/7.29.0 Accept: \*/\* Welcome to MOSN! The Cloud-Native Network Proxy Platform.

相关推荐
逾非时8 分钟前
python网络爬虫的基本使用
开发语言·爬虫·python
ppdkx11 分钟前
python训练营第33天
开发语言·python
玉笥寻珍37 分钟前
从零开始:Python语言进阶之异常处理
开发语言·python
Java永无止境38 分钟前
JavaSE常用API之Runtime类:掌控JVM运行时环境
java·开发语言·jvm
caihuayuan539 分钟前
Vue3 Composition API: 企业级应用最佳实践方案
java·大数据·spring boot·后端·课程设计
只在空想家42 分钟前
SpringBoot JAR 启动原理
java·spring boot·后端·jar
龙湾开发1 小时前
C++ vscode配置c++开发环境
开发语言·c++·笔记·vscode·学习
步行cgn1 小时前
函数式编程思想详解
java·开发语言·windows
南瓜胖胖1 小时前
R语言科研编程-标准偏差柱状图
开发语言·r语言