• 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

    1. set GO111MODULE=
    2. set GOARCH=amd64
    3. set GOBIN=E:\usr\local\golang\go1.13\bin
    4. set GOCACHE=C:\Users\xxx\AppData\Local\go-build
    5. set GOENV=C:\Users\xxxAppData\Roaming\go\env
    6. set GOEXE=.exe
    7. set GOEXPERIMENT=
    8. set GOFLAGS=
    9. set GOHOSTARCH=amd64
    10. set GOHOSTOS=windows
    11. set GOINSECURE=
    12. set GOMODCACHE=E:\usr\local\golang\code\pkg\mod
    13. set GONOPROXY=
    14. set GONOSUMDB=
    15. set GOOS=windows
    16. set GOPATH=E:\usr\local\golang\code
    17. set GOPRIVATE=
    18. set GOPROXY=https://goproxy.io
    19. set GOROOT=E:\usr\local\golang\go1.13
    20. set GOSUMDB=sum.golang.org
    21. set GOTMPDIR=
    22. set GOTOOLDIR=E:\usr\local\golang\go1.13\pkg\tool\windows_amd64
    23. set GOVCS=
    24. set GOVERSION=go1.18.10
    25. set GCCGO=gccgo
    26. set GOAMD64=v1
    27. set AR=ar
    28. set CC=gcc
    29. set CXX=g++
    30. set CGO_ENABLED=1
    31. set GOMOD=M:\GolandProjects\mosn-1.6.0\go.mod
    32. set GOWORK=
    33. set CGO_CFLAGS=-g -O2
    34. set CGO_CPPFLAGS=
    35. set CGO_CXXFLAGS=-g -O2
    36. set CGO_FFLAGS=-g -O2
    37. set CGO_LDFLAGS=-g -O2
    38. set PKG_CONFIG=pkg-config
    39. 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

    1. #!/usr/bin/bash
    2. set -x
    3. USER=admin
    4. PASSWD=admin
    5. groupadd gousers
    6. useradd ${USER} -g gousers
    7. echo ${USER}:${PASSWD} | chpasswd
    8. echo ${USER} | passwd --stdin ${PASSWD}
    9. 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=N7T8https://blog.csdn.net/fareast_mzh/article/details/137462544

    允许34901端口 

    mosn.json 

    1. {
    2. "servers":[
    3. {
    4. "default_log_path":"stdout",
    5. "routers":[
    6. {
    7. "router_config_name":"server_router",
    8. "virtual_hosts":[{
    9. "name":"serverHost",
    10. "domains": ["*"],
    11. "routers": [
    12. {
    13. "match":{"prefix":"/"},
    14. "route":{"cluster_name":"serverCluster"}
    15. }
    16. ]
    17. }]
    18. },
    19. {
    20. "router_config_name":"client_router",
    21. "virtual_hosts":[{
    22. "name":"clientHost",
    23. "domains": ["*"],
    24. "routers": [
    25. {
    26. "match":{"prefix":"/"},
    27. "route":{"cluster_name":"clientCluster"}
    28. }
    29. ]
    30. }]
    31. },
    32. {
    33. "router_config_name":"application",
    34. "virtual_hosts":[{
    35. "name":"appHost",
    36. "domains": ["*"],
    37. "routers": [
    38. {
    39. "match":{"prefix":"/"},
    40. "direct_response":{
    41. "status": 200,
    42. "body": "Welcome to MOSN!\nThe Cloud-Native Network Proxy Platform.\n"
    43. }
    44. }
    45. ]
    46. }]
    47. }
    48. ],
    49. "listeners":[
    50. {
    51. "name":"appListener",
    52. "address": "127.0.0.1:2047",
    53. "bind_port": true,
    54. "filter_chains": [{
    55. "filters": [
    56. {
    57. "type": "proxy",
    58. "config": {
    59. "downstream_protocol": "Http1",
    60. "router_config_name":"application"
    61. }
    62. }
    63. ]
    64. }]
    65. },
    66. {
    67. "name":"serverListener",
    68. "address": "127.0.0.1:2046",
    69. "bind_port": true,
    70. "filter_chains": [{
    71. "filters": [
    72. {
    73. "type": "proxy",
    74. "config": {
    75. "downstream_protocol": "Auto",
    76. "router_config_name":"server_router"
    77. }
    78. }
    79. ]
    80. }]
    81. },
    82. {
    83. "name":"clientListener",
    84. "address": "127.0.0.1:2045",
    85. "bind_port": true,
    86. "filter_chains": [{
    87. "filters": [
    88. {
    89. "type": "proxy",
    90. "config": {
    91. "downstream_protocol": "Http1",
    92. "router_config_name":"client_router"
    93. }
    94. }
    95. ]
    96. }]
    97. }
    98. ]
    99. }
    100. ],
    101. "cluster_manager":{
    102. "clusters":[
    103. {
    104. "name":"serverCluster",
    105. "type": "SIMPLE",
    106. "lb_type": "LB_RANDOM",
    107. "max_request_per_conn": 1024,
    108. "conn_buffer_limit_bytes":32768,
    109. "hosts":[
    110. {"address":"127.0.0.1:2047"}
    111. ]
    112. },
    113. {
    114. "name": "clientCluster",
    115. "type": "SIMPLE",
    116. "lb_type": "LB_RANDOM",
    117. "max_request_per_conn": 1024,
    118. "conn_buffer_limit_bytes":32768,
    119. "hosts":[
    120. {"address":"127.0.0.1:2046"}
    121. ]
    122. }
    123. ]
    124. },
    125. "admin": {
    126. "address": {
    127. "socket_address": {
    128. "address": "0.0.0.0",
    129. "port_value": 34901
    130. }
    131. }
    132. }
    133. }

    [admin@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 ~]$ 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 ~]$ 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.
     

  • 相关阅读:
    STM32H750之FreeRTOS学习--------(一)初识RTOS
    Python获取与设置Windows当前窗口
    关于在线音乐软件设计与实现的答辩问题
    3 Thymeleaf 常用语法
    Rsync学习笔记1
    Elasticsearch:使用不同的 CA 更新安全证书 (二)
    Elasticsearch:从零开始创建一个 REST handler 插件
    FL Studio21中文版本新增功能FL2023完整版
    java基于springboot+vue的宠物领养饲养交流管理平台nodejs前后分离
    论文笔记 《FAST-LIO2: Fast Direct LiDAR-inertial Odometry》及 激光SLAM综述
  • 原文地址:https://blog.csdn.net/fareast_mzh/article/details/138174826