Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-5490

Zeppelin impersonate user not working with ZEPPELIN_IMPERSONATE_CMD

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.9.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Description

      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

        Attachments

        1. zeppelin.log
          108 kB
          Noam

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Almog Noam
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: