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配置文件

防火墙https://blog.csdn.net/fareast_mzh/article/details/137462544

允许34901端口

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.

相关推荐
打工仔折腾 AI15 分钟前
LLaMA 1 到 LLaMA 3 架构演进拆解:从 RoPE、GQA 到词表扩张
人工智能·后端·python·深度学习·langchain·llama
朝朝辞暮i25 分钟前
C++ 第 32 课:main()、rclcpp::init()、spin()、shutdown()
开发语言·c++·算法
可乐鸡翅yeah_31 分钟前
HLS 分片过期清理,直播旧 TS 分片磁盘爆满问题处理
java·后端·spring·m3u8·m3u8在线·音视频在线播放
旋生万物44 分钟前
螺旋角分布的功率谱分析:多窗谱 + FDR 校正
开发语言·python
张彦峰ZYF1 小时前
加了锁不等于扛得住争用:synchronized、显式锁与 CAS 的语义分层、争用代价账本与选型判据
后端·同步设施·内置锁的四种状态与单向升级·可重入的由来与四条硬边界·显式锁的状态字段与等待队列·读写锁与邮戳锁·一次同步的开销账本
沫璃染墨1 小时前
《从零入门Linux系统篇(五十七):线程篇·十——生产者消费者模型进阶:从环形缓冲区到POSIX信号量》
linux·运维·服务器·开发语言·c++·系统架构·信号处理
时间的拾荒人1 小时前
Qt 窗口系统详解:从菜单栏到对话框的完整指南
开发语言·qt·面试
专业程序开发源1 小时前
SSM校园拍摄交流服务平台36936-计算机课程设计、毕业设计
java·spring boot·后端·python·elasticsearch·php·课程设计
Gopher_HBo1 小时前
zap采样器与性能优化内幕
后端
变量探索SEQVEC1 小时前
我埋了 8 个假文件,看谁会上钩:12 天 502 次扫描实录
后端