Noam created ZEPPELIN-5490:
------------------------------
Summary: Zeppelin impersonate user not working with
ZEPPELIN_IMPERSONATE_CMD
Key: ZEPPELIN-5490
URL: https://issues.apache.org/jira/browse/ZEPPELIN-5490
Project: Zeppelin
Issue Type: Bug
Components: interpreter-launcher, interpreter-setting, Interpreters,
zeppelin-interpreter
Affects Versions: 0.9.0
Environment: Debin in docker container
Linux 5.10.25-linuxkit x86_64
cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Reporter: Noam
Attachments: zeppelin.log
I am trying to set up user impersonations in notebooks using
ZEPPELIN_IMPERSONATE_CMD and followed the instructions here:
[https://zeppelin.apache.org/docs/0.9.0/usage/interpreter/user_impersonation.html]
* I added the system users in my zeppelin container
* I added those same users into shiro.ini.
* In zeppelin_env.sh I set: export ZEPPELIN_IMPERSONATE_CMD='sudo -H -u
${ZEPPELIN_IMPERSONATE_USER} bash -c '
* I configured my shell interpreter to do user impersonation (per user,
isolated, user impersonate
However when I try to launch the shell interpreter I get:
org.apache.zeppelin.interpreter.InterpreterException: java.io.IOException:
Interpreter process is not running
/opt/zeppelin/bin/interpreter.sh: line 294: exec: sudo -H -u zeppelin_user bash
-c: not found
However when I run the same command on the system it works
root@spark-zeppelin-0:/opt/zeppelin# sudo -H -u zeppelin_user bash -c whoami
zeppelin_user
I don't understand why. I can login into the web app using the usernames I set
in shiro.ini
The full error from the paragraph is:
org.apache.zeppelin.interpreter.InterpreterException: java.io.IOException: Fail
to launch interpreter process: /opt/zeppelin/bin/interpreter.sh: line 294:
exec: sudo -H -u zeppelin_user bash -c: not found at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.open(RemoteInterpreter.java:129)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getFormType(RemoteInterpreter.java:271)
at org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:444) at
org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:72) at
org.apache.zeppelin.scheduler.Job.run(Job.java:172) at
org.apache.zeppelin.scheduler.AbstractScheduler.runJob(AbstractScheduler.java:132)
at
org.apache.zeppelin.scheduler.RemoteScheduler$JobRunner.run(RemoteScheduler.java:182)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at
java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: Fail
to launch interpreter process: /opt/zeppelin/bin/interpreter.sh: line 294:
exec: sudo -H -u zeppelin_user bash -c: not found at
org.apache.zeppelin.interpreter.remote.RemoteInterpreterManagedProcess.start(RemoteInterpreterManagedProcess.java:126)
at
org.apache.zeppelin.interpreter.ManagedInterpreterGroup.getOrCreateInterpreterProcess(ManagedInterpreterGroup.java:68)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getOrCreateInterpreterProcess(RemoteInterpreter.java:104)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.internal_create(RemoteInterpreter.java:154)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.open(RemoteInterpreter.java:126)
... 13 more
--
This message was sent by Atlassian Jira
(v8.3.4#803005)