docker pull 报错Get “https://registry-1.docker.io/v2/“: net/http: request canceled while waiting for c

报错 :Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
解决方法

配置加速地址

vim /etc/docker/daemon.json

添加以下内容

{
  "registry-mirrors": ["https://docker.1panel.live"]
}

或者

{
    "registry-mirrors": [
            "https://docker.211678.top",
            "https://docker.1panel.live",
            "https://hub.rat.dev",
            "https://docker.m.daocloud.io",
            "https://do.nark.eu.org",
            "https://dockerpull.com",
            "https://dockerproxy.cn",
            "https://docker.awsl9527.cn"
      ]
}

{
  "registry-mirrors": ["https://docker.m.daocloud.io"]
}

保存

:wq

重启docker

systemctl daemon-reload
systemctl restart  docker

nodejs打包有时候会出现文件过大的问题

-  Building for production...[BABEL] Note: The code generator has deoptimised the styling of D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\src\components\AddressCascader\address.js as it exceeds the max of 500KB.
 ERROR  Error: error:0308010C:digital envelope routines::unsupported
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\node_modules\compression-webpack-plugin\dist\index.js:243:42
    at CompressionPlugin.compress (D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\node_modules\compression-webpack-plugin\dist\index.js:284:9)
    at D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\node_modules\compression-webpack-plugin\dist\index.js:305:12
    at _next3 (eval at create (D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:17)
    at eval (eval at create (D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:35:1)
    at D:\javaProject\platform\backend-ui-lanyuancc\backend-ui-lanyuancc\node_modules\copy-webpack-plugin\dist\index.js:91:9

可以使用:

set NODE_OPTIONS=--openssl-legacy-provider
npm run build:prod

dubbo多层嵌套异常报错抛出会有点问题

会多很多字符
,所以可以才有报错向上抛出的原则来实现

 /**
        * 注册用户信息
        *
        * @param member 用户信息
        * @return 结果
        */
       Boolean registerUserInfo(Member member) throws ServiceException;
       
       
       @Override
       public Boolean registerUserInfo(Member member) throws ServiceException{
           //判断账号是否已注册
           boolean exist = TenantHelper.dynamic(member.getTenantId(), () -> {
               return memberMapper.exists(new LambdaQueryWrapper<Member>()
                   .eq(Member::getUsername, member.getUsername()));
           });
           if (exist) {
               throw new ServiceException("账号已存在,请勿重复注册!");
           }
   
   //        //判断账号是否已注册
   //        boolean register = TenantHelper.dynamic(member.getTenantId(), () -> {
   //            return remoteMemberService.registerByMobile(registerBody.getUsername());
   //        });
   //        if (register) {
   //            throw new ServiceException("账号已存在,请勿重复注册!");
   //        }
           RedisUtils.deleteObject(RedisKeyEnum.SMS.getKey() + member.getUsername() + member.getType());
   
           String username = member.getUsername();
   //        if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser")))) {
   //            throw new ServiceException("当前系统没有开启注册功能");
   //        }
           member.setName("U:" + RandomUtil.randomNumbers(6));
           member.setAccountStatus(0);
           member.setAuthStatus(3);
           member.setAuthType(0);//默认个人认证  认证类型0 未认证 1个人认证 2企业认证
           //member.setShopStatus(0);
           member.setAccountStatus(0);
           member.setStatus(0);
           member.setIsDeleted(0);
           member.setShippersStatus(0);
   
           member.setCreateBy(member.getUsername());
           member.setUpdateBy(member.getUsername());
           member.setCreateTime(TimeUtils.getNowDate());
           boolean save = userService.save(member);
           if (save) {
               Company company = new Company();
               company.setTenantId(member.getTenantId());
               company.setMemberId(member.getId());
               company.setCompanyName("个人");
               company.setRoleId(1);
               company.setCompanyMobile(username);
               company.setCheckStatus(3);//审核状态 0 待审核 1审核通过 2审核不通过  3待提交
               company.setIsDefault(1);
               companyService.save(company);
           }
           return save;
       }

Ubuntu安装中文字体

安装中文字体

在centos中,字体库的存放位置就是/usr/shared/fonts目录,所以我们要做的就是在Windows系统找到中文字体文件,然后拷贝到该目录下。Windows系统中的字体文件

就在C:\Windows\Fonts目录中。所以,安装步骤就是:

在CentOS中创建新的中文字体文件夹,输入命令

mkdir -p /usr/share/fonts/chinese && chmod -R 755 /usr/share/fonts/chinese

将C:\Windows\Fonts中的中文字体——比如msyh.ttc

(微软雅黑)、simhei.ttf(黑体)、simsun.ttc(宋体)——拷贝上传到CentOS中刚刚创建的目录/usr/share/fonts/chinese下。PS:在WIndows中打开字体文件夹显示的不是msyh.ttc这样名字的文件,而是中文的字体名字,可以将需要的字体拷贝到桌面上先,到桌面上就会显示出真正的文件名
,再从桌面上上传到centos中。
安装字体索引指令,输入命令

yum install mkfontscale -y

进入目录/usr/share/fonts/chinese,生成字体索引,输入命令:

cd /usr/share/fonts/chinese mkfontscale

最后,通过上面介绍的查看已安装中文字体的命令,确认字体是否已安装成功

fc-list :lang=zh

ubuntu使用方法:

再刷新字体缓存就可以了,命令如下

sudo mkfontscale
sudo mkfontdir
sudo fc-cache -fv

注意:
如果运行mkfontscale命令时终端提示mkfontscale: command not found,则需要首先安装mkfontscale mkfontdir和fc-cache这个命令,安装方法如下:

使mkfontscale和mkfontdir命令正常运行

sudo apt-get install ttf-mscorefonts-installer

使fc-cache命令正常运行

sudo apt-get install fontconfig