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.

相关推荐
春生野草12 分钟前
反射、Tomcat执行
java·开发语言
zhangxingchao22 分钟前
AI 大模型核心六:量化、Workflow 与 Agent、多轮 RAG
前端·人工智能·后端
雪的季节1 小时前
企业级 Qt 全功能项目
开发语言·数据库·qt
IT_陈寒1 小时前
Vite打包时遇到的坑,原来问题出在这里
前端·人工智能·后端
代龙涛2 小时前
WordPress page.php 页面模板与自定义模板使用方法
android·开发语言·php
bigfootyazi2 小时前
python爬虫-基本库-urllib库(常用速查)
开发语言·爬虫·python
ayqy贾杰2 小时前
基层管理的三板斧,在AI时代行不通了
前端·后端·团队管理
Apifox2 小时前
Apifox 5 月更新|Postman 导入优化、Runner 支持非 root 运行、请求代码自动带鉴权
前端·后端·安全
belong_my_offer3 小时前
认识到精通函数
开发语言·python
guygg883 小时前
最大相关-最小冗余(mRMR)特征选择 MATLAB 实现
开发语言·matlab