-
python monitor ubuntu port
环境 Ubuntu 14.04 Python 2.7 JDK8通过python监控ubuntu上面的端口 通过crontab调用shell脚本, shell脚本里面会根据指定的端口去查找是否能连接上,如果不能连接会先发送消息,然后尝试重启改端口对应的服务,如果重启成功会发送重启成功的消失,失败会发送失败的消失,通过修改javaCmd,让具体消失发送可以是email,也可以是其他的。monitor.sh#!/bin/bashcd /home/ubuntu/SNS/#/home/ubu...…
-
Java GPG encode and decode
GPG GPG的生成请参考GPG入门教程 生成gpg的过程中执行下面命令,可以加快生成的速度 # 随机生成1百万个1K的文件cd /tmpseq 1000000 | xargs -i dd if=/dev/zero of={}.dat bs=1024 count=1 pom 文件中 bouncycastle dependency <dependency> <groupId>org.bouncycastle&...…
-
Restricting IP addresses for Jetty and Solr
环境 Solr6.3.0 (jetty-server-9.3.8.v20160314) Solr6.6.0 (jetty-server-9.3.14.v20161028) Solr默认外网直接可以通过8983端口访问, Solr限制访问的ip为127.0.0.1, 这样外网ip可以访问8983端口,但是api访问,response http code 都是403, jetty xml配置语法参考Jetty IoC XML format Solr6.3.0 修改$solr...…
-
Jenkins git polling log error with code 128
环境 Jenkins 1.x ,2.x git 2.11git远程仓库有新的commit ,但是jenkins不能触发自动编译, 但是手动点击编译是可以的 git 仓库配置是https协议的,用户名和密码直接写带url上面 jenkins git Poll SCM 配置 H H/1 * * * Git Polling Log git.exe -c core.askpass=true ls-remote -h https://useranme@bitbucket...…
-
IntelliJ IDEA with JRebel
环境IntelliJ-IDEA 2017.1JRabel IntelliJ-IDEA plugin 7.0.7JDK8IntelliJ IDEA 中 使用JRebel plugin 到 jreble 注册账号, 根据提示得到License code 在 IntelliJ IDEA 安装 JRebel plugin, 用上面的license code激活 在 IntelliJ IDEA settings 里面找到 compiler , enable “Buld project auto...…
-
eclipse information center
环境Eclipse NeonJDK8搭建 eclipse help server 下载Eclipse Neon 安装Neon 在 D:\test 目录, 会创建 D:\test\eclipse目录, 在D:\test\eclipse\plugins 目录查看 eclipse help base jar 的版本,然后替换下面version, 在cmd窗口里面运行下面命令 java -classpath D:\test\eclipse\plugins\org.eclipse....…
-
ubuntu automatically rotate log file
环境 Ubuntu 14.04查看apache2和tomcat7的自动rotate apache2 和tomcat7 是通过 apt-get install 安装 进入 rotate 的 配置目录 查看apache2 rotate 配置 cd /etc/logrotate.d/vim apache2 logrotate 部分参数 monthly: 日志文件将按月轮循。其它可用值为‘daily’,‘weekly’或者‘yearly’。 rotate 5: 一次将存储...…
-
solr6 data import with mysql
环境 Ubuntu 12.04 Solr 6.3.0 JDK8 数据库表foo,user public class Foo { private long id; private String name; private Date updateDate; private long userId; } public class User { private long id; priva...…
-
install solr6 as ubuntu service
环境 Ubuntu 12.04 Solr 6.3.0 JDK8 到官网下载 solr-6.3.0.tgz(JDK版本必须大于等于8) 解压solr-6.3.0.tgz , 得到install_solr_service.sh tar xzf solr-6.3.0.tgz solr-6.3.0/bin/install_solr_service.sh --strip-components=2 安装solr sudo bash ./install_solr_se...…
-
AWS ELB 504 with Apache2
环境 Ubuntu 14.04 Apache 2.4.7 Tomcat7 mpm_worker 不会出现504 ,mpm_event 可能会出现504 ,出错概率在万分之一左右,出错的时候apache access log看不到出错的request url , apache2 error log 里面也看不到这个 request url 用 jmeter 测试的时候最大的response time 超过 ELB idle time 就会出现504 …