go 安装软件报go.mod file not found 执行 go get -u github.com/go-sql-driver/mysql 下载mysql 报错。红圈值为NUL,需要设置GOMOD的值, 然后再控制台执行。然后再执行下载,如果有超时问题,设置如下代理然后再尝试。
Cannot resolve the name ‘repository:repositories‘ to a(n) ‘type definition‘ component Cannot resolve the name ‘repository:repositories‘ to a(n) ‘type definition‘ component
监控很重要的 线上系统有几个报表最近几天突然没有展示数据了,最近也未发版本。程序连接的是VIP,根据运维提供的数据库IP查询主库、从库都有数据。百思不得百思不得其解,决定本机测试看看,本机直接连接线上库,测试访问报表正常。唯一区别就是(本机连接的是个代理VIP,VIP又代理到数据库),找运维分析下原因,最近做了什么操作,运维说只做了主从切换。运维看了下监控图表,发信主从数据同步断开了几天,这种指标需要报警。,从库未同步问题造成的,而我们诚信连接的是读VIP。
运行时候报java.lang.NoClassDefFoundError: Could not initialize class 程序能正常启动,但运行时候报java.lang.NoClassDefFoundError: Could not initialize class。问题确定:格式化参数错误,导致类实例化错误。
java调用c/c++ 最近项目想将比较重要的配置文件加密、综合考虑后决定用java jni实现,步骤如下1.定义java本地接口package com.msg.jni;public class JniMsg { static { try { String os = System.getProperty("os.name").toLowerCase(); String path = "F:/opt/"; System.out.println("work dir:" + pat
springboot 1.x升级log4j2漏洞遇到打包问题 springboot-1.5.9.RELEASE 环境配置的spring-boot-starter-log4j2依赖log4j-core-2.7jarlog4j-api-2.7.jarlog4j-slf4j-impl-2.7.jar需要升级到最新版本,目前已经是2.16.0,老系统升级基本都是如下配置<dependency> <groupId>org.springframework.boot</groupId> <artifac...
recv() failed (104: Connection reset by peer) 最近用户调用我们服务接口偶报Connection reset,查看nginx会报recv() failed (104: Connection reset by peer) while sending to client、但是这个看上去对用户的影响并不大。针对这个错误,我们进行抓包分析,发现四次挥手、客户端并没有正常发送FIN数据包、而是发送了RST包,抓包如下:官方提供的接口代码、进行了压力测试、并未复现您说connect reset、请求成功。我们也进行了抓包分析、抓包如下:于是我..
java.net.BindException: Address already in use问题 jetty服务重启总是端口被占用,查询监听端口该端口8082并未占用解决办法通过命令查看与端口8082相关的网络链接lsof -i:8082重启nginx,重启jetty应用,服务正常启动
proxy_redirect多重代理导致跳转域名加上端口 nginx 设置多重代理,通过域名访问,有些请求301跳转加上了端口号浏览器访问http://test.i18n.io/doc/guide 出现301跳转http://test.i18n.io:8888/doc/guide导致访问失败nginx配置如下:server{ listen 80; server_name test.i18n.io; access_log /opt/sc/nginx/.
javamail设置Content-Transfer-Encoding无效 最近遇到javamail设置Content-Transfer-Encoding不起作用,代码如下:Properties props = System.getProperties(); props.setProperty("mail.transport.protocol", "smtp"); props.put("mail.smtp.host", SENDCLOUD_SMTP_HOST); props.put("mail.smtp.port", SENDCLOUD_SMTP_PORT);
java性能问题排查(Arthas) Arthas分析性能问题线上API服务运行一段时间,某一接口越来越慢,线上没有打印详细日志。采用Alibaba开源的Java诊断工具,线上服务非springboot框架搭建、采用ssm框架部署jetty容器。安装通过http://arthas.gitee.io/下载arthas-bin.zip,解压安装到/opt/arthas目录下如图:修改jetty.sh脚本,增加jvm参数-XX:+StartAttachListener执行命令,启动arthasjava -jar ar
springboot service测试报错 单独测试dao正常,测试service报错org.apache.ibatis.binding.BindingException:Invalidboundstatement(notfound):com.sendcloud.marketing.mapper.MailingListMapper.findxxx应该是MailingListMapper.xml没有编译到项目,pom文件中添加<build><resources>...
docker镜像加速 您可以通过修改daemon配置文件/etc/docker/daemon.json来使用加速器sudo mkdir -p /etc/dockersudo tee /etc/docker/daemon.json <<-'EOF'{ "registry-mirrors": ["https://j32y31nz.mirror.aliyuncs.com"]}EOFsudo systemctl daemon-reloadsudo systemctl restart docker...
python飞机游戏 练习下对象编程还是不错的 pip install pygame虽然pygame被淘汰的东东,但是学习下面向对象编程,还是不错的一、启动类import pygameimport pygame.midiimport pygame.localsfrom games.plane import Planefrom games.enemy_plane import EnemyPlaneimport timeclass MainFrame(): def __init__(self,win_width
hbase报java.lang.IllegalArgumentException: No columns to insert {"totalColumns":0,"families":{},"row":"#bda3e8a7b31e2f227"}302java.lang.IllegalArgumentException: No columns to insert{"totalColumns":1,"families":{"info":[{"timestamp":9223372036854775807,"tag":[],"qualifier":"invalid_count","vlen":1}]},"row":"#7c9160
hive编写自定义UDF函数 需求:hive表email_status_result中有个邮箱(receiver)字段,查询结果需要脱敏展示,表结构如下CREATE TABLE email_status_result(receiver STRING,email_status STRING,status_count INT)COMMENT 'email_status aggregation data'ROW FORMAT DELIMITEDFIELDS TERMINATED BY ','LINES TERMINATE.