Logstash7.6.1 中 jackson-databind 升级到 2.10.1 说明文档

1 准备工作

jackson-2.9.x 升级到 2.10.1 说明文档

jackson-2.10.1.zip

1、备份logstash整个目录
cp-r /isearch/logstash-7.6.1 /isearch/logstash-7.6.1_bak

2 升级

1、修改/isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.11-java/lib/jrjackson_jars.rb

2、把2.9.10改为2.10.1(jackson-module-afterburner的版本不改)

3、创建六个目录(注意用isearch账号):
mkdir -p /isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.11-java/lib/com/fasterxml/jackson/core/jackson-core/2.10.1
mkdir -p /isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.11-java/lib/com/fasterxml/jackson/core/jackson-databind/2.10.1
mkdir -p /isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.11-java/lib/com/fasterxml/jackson/core/jackson-annotations/2.10.1
mkdir -p /isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.0.8-java/vendor/jar-dependencies/com/fasterxml/jackson/core/jackson-core/2.10.1
mkdir -p /isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.0.8-java/vendor/jar-dependencies/com/fasterxml/jackson/core/jackson-databind/2.10.1
mkdir -p /isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.0.8-java/vendor/jar-dependencies/com/fasterxml/jackson/core/jackson-annotations/2.10.1

4、把最新的jackson的对饮包拷贝进去(注意用非root账号)
/isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.11-java/lib/com/fasterxml/jackson/core/jackson-core/2.10.1/jackson-core-2.10.1.jar
/isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.11-java/lib/com/fasterxml/jackson/core/jackson-databind/2.10.1/jackson-databind-2.10.1.jar
/isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.11-java/lib/com/fasterxml/jackson/core/jackson-annotations/2.10.1/jackson-annotations-2.10.1.jar
/isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.0.8-java/vendor/jar-dependencies/com/fasterxml/jackson/core/jackson-core/2.10.1/jackson-core-2.10.1.jar
/isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.0.8-java/vendor/jar-dependencies/com/fasterxml/jackson/core/jackson-databind/2.10.1/jackson-databind-2.10.1.jar
/isearch/logstash-7.6.1/vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.0.8-java/vendor/jar-dependencies/com/fasterxml/jackson/core/jackson-annotations/2.10.1/jackson-annotations-2.10.1.jar

5、把所有6个路径下的2.9.x这个目录移走

6、移走/isearch/logstash-7.6.1/logstash-core/lib/jars/下面的三个旧版本文件,把新版本文件放入
/isearch/logstash-7.6.1/logstash-core/lib/jars/jackson-core-2.10.1.jar
/isearch/logstash-7.6.1/logstash-core/lib/jars/jackson-databind-2.10.1.jar
/isearch/logstash-7.6.1/logstash-core/lib/jars/jackson-annotations-2.10.1.jar

7、修改/isearch/logstash-7.6.1/logstash-core/versions-gem-copy.yml,把jackson: 2.9.10改为 jackson:2.10.1

6、重启logstash。

3 还原

1、删除当前logstash

2、还原备份
cp-r /isearch/logstash-7.6.1_bak /isearch/logstash-7.6.1