问题描述
我正在创建一个EMR集群,并使用jupyter Notebook运行一些spark任务.我的任务在执行大约1小时后死亡,错误是:
I am creating an EMR cluster, and using jupyter notebook to run some spark tasks.My tasks die after approximately 1 hour of execution, and the error is:
An error was encountered:
Invalid status code '400' from https://xxx.xx.x.xxx:18888/sessions/0/statements/20 with error payload: "requirement failed: Session isn't active."
我的理解是它与Livy配置livy.server.session.timeout
有关,但是我不知道如何在集群的引导程序中进行设置(我需要在引导程序中进行设置,因为集群是使用没有ssh访问权限)
My understanding is that it is related to the Livy config livy.server.session.timeout
, but I don't know how I can set it in the bootstrap of the cluster (I need to do it in the bootstrap because the cluster is created with no ssh access)
非常感谢
推荐答案
在EMR上,livy-conf
是livy的livy.conf
文件属性的分类,因此在创建EMR群集时,请选择Livy为advanced options
选择安装的应用程序,请在Enter Configuration
字段中传递此EMR配置.
On EMR, livy-conf
is the classification for the properties for livy's livy.conf
file, so when creating an EMR cluster, choose advanced options
with Livy as an application chosen to install, please pass this EMR configuration in the Enter Configuration
field.
[{'classification': 'livy-conf','Properties': {'livy.server.session.timeout':'5h'}}]
- 在EMR上,livy二进制文件位于
/etc/livy/
,因此配置文件位于/etc/livy/conf/livy.conf
- On EMR, Livy binary is located at
/etc/livy/
, and so the config file is at/etc/livy/conf/livy.conf
- 使用已知的
ec2 key-pair
,Livy及更高版本的配置创建EMR集群 - 使用ec2
key-pair
,登录与集群ssh -i some-ec2-key-pair.pem [email protected]
关联的EC2主节点. - 导航至
/etc/livy/conf
,vimlivy.conf
&查看livy.server.session.timeout
的更新值 - Create an EMR cluster with a known
ec2 key-pair
, Livy and above config - Using the ec2
key-pair
, login to the EC2 Master node associated with the clusterssh -i some-ec2-key-pair.pem [email protected]
- Navigate to
/etc/livy/conf
, vimlivy.conf
& see the updated value oflivy.server.session.timeout
要验证这一点,
这篇关于如何在EMR群集boostrap上设置livy.server.session.timeout?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!