【ELK】elasticsearch中使用脚本报错:scripts of type [inline], operation [update] and lang [groovy] are disabled
查看ID为2的这条数据:

使用更新命令:
使用脚本对年龄+5
curl -XPOST http://192.168.6.16:9200/my_new_index/user/2/_update?pretty -d '{"script" : "ctx._source.age += 5"}'
报错:
"reason" : "scripts of type [inline], operation [update] and lang [groovy] are disabled"

解决方法:
在es的conf目录下的 elasticsearch.yml 文件添加如下配置:
script.inline: on
script.indexed: on
之后重启,再重试该命令

执行成功:
查看
curl -XGET http://192.168.6.16:9200/my_new_index/user/2?pretty

【ELK】elasticsearch中使用脚本报错:scripts of type [inline], operation [update] and lang [groovy] are disabled的更多相关文章
- shell脚本报错:-bash: xxx: /bin/bash^M: bad interpreter: No such file or directory
当我们把文件从windows系统中编辑的文件拷贝到linux系统中,如果我们执行文件会保存如下的错: shell脚本报错:-bash: xxx: /bin/bash^M: bad interprete ...
- shell脚本报错:"[: =: unary operator expected"
shell脚本报错:"[: =: unary operator expected" 在匹配字符串相等时,我用了类似这样的语句: if [ $STATUS == "OK&q ...
- 解决执行sql脚本报错:没有足够的内存继续执行程序。
出现执行sql脚本报错:没有足够的内存继续执行程序.是因为sql脚本过大,大家可能分为多个文件多次执行,这种笨方法可行,不过比较麻烦,大家可以用下面的方式,利用sqlcmd一次就行了: 执行cmd ...
- windows 2012执行powershell脚本报错
使用powershell运行脚本报错:进行数字签名.无法在当前系统上运行该脚本.有关运行脚本和设置执行策略的详细信息 修复方法:powershell "Set-ExecutionPolicy ...
- Appium 运行脚本报错InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported for (转)
现象:Appium运行脚本报错InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported f ...
- 解决:在Eclipse中运行monkeyrunner脚本报错: IOError: (2, 'File not found - D:\\workspace\\monkeyrunner_test01 (\u62d2\u7edd\u8bbf\u95ee\u3002)')
在eclipse中搭建运行monkeyrunner脚本的环境,请见lynnLi的博客monkeyrunner之eclipse中运行monkeyrunner脚本之环境搭建(四) 但在实践中,状况确实层出 ...
- Oracle 11g安装GI后,运行roothas.pl脚本报错libcap.so.1找不到
环境:RHEL6.4 + Oracle 11.2.0.3问题:需求是文件系统迁移到ASM,在安装GI后,运行roothas.pl脚本报错 1.运行root.sh后,按提示运行roothas.pl报错 ...
- CRLF line terminators导致shell脚本报错:command not found
Linux和Windows文本文件的行结束标志不同.在Linux中,文本文件用"/n"表示回车换行,而Windows用"/r/n"表示回车换行.有时候在Wind ...
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...
随机推荐
- AutoLayout的使用
虽然苹果提供了AutoresizingMask的布局方式,这个方式局限性太大:只能解决父控件和子控件间的相对关系: 因此,推出了AutoLayout:苹果官方也是推荐开发者尽量使用autolayout ...
- Visual Studio Code 远程开发探秘
摘要: IDE新时代! 作者:SHUHARI 的博客 原文:Visual Studio Code 远程开发探秘 Fundebug按照原文要求转载,版权归原作者所有. 在以前的文章 有趣的项目 - 在浏 ...
- pipenv管理python开发环境
简介 简单说,pipenv就是把pip和virtualenv包装起来的一个便携工具. 它不会在你的项目文件夹里生成一大堆东西,只有两个文本文件: Pipfile, 简明地显示项目环境和依赖包. Pip ...
- nginx配置多个静态资源
#user nobody; worker_processes ; worker_cpu_affinity ; #error_log logs/error.log; #error_log logs/er ...
- openstack Train版 “nova-status upgrade check”报错:Forbidden: Forbidden (HTTP 403)
部署openstack train版,在部署完nova项目时,进行检查,执行 nova-status upgrade check 返回报错信息如下: [root@controller ~]# nova ...
- time,datetime,random,os,sys,hashlib,logging,configparser,re模块
#-----time模块----- print(help(time)) #打印time帮助文档 print(time.time()) #打印时间戳 1569824501.6265268 time.sl ...
- django-图形验证码(django-simple-captcha)
在网站开发的登录页面中,经常会需要使用到图形验证码来验证.在Django中,django-simple-captcha库包提供了图形验证码的使用. django-simple-captcha的安装 p ...
- java 获取安全随机字符
private static final char[] CHAR_32 = new char[] {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', ...
- ansible 模块 roles
setup 作用,用来查看用看内部的详细信息 ansible_all_ipv4_addresses # ipv4的所有地址 ansible_all_ipv6_addresses # ipv6的所有地址 ...
- XSS-Stored
存储型XSS (持久性XSS) 将恶意JavaScript代码存储在数据库,当下次用户浏览的时候执行 Low <?php if( isset( $_POST[ 'btnSign' ] ) ) { ...