You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/03/23 04:15:00 UTC

[jira] [Commented] (IMPALA-12011) Shell command of webserver_private_key_password_cmd doesn't unset JAVA_TOOL_OPTIONS variable

    [ https://issues.apache.org/jira/browse/IMPALA-12011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17703861#comment-17703861 ] 

ASF subversion and git services commented on IMPALA-12011:
----------------------------------------------------------

Commit fe29a356b91b3a13b95a3ecbaf2d161b556e93ef in impala's branch refs/heads/master from stiga-huang
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=fe29a356b ]

IMPALA-12011: Unset JAVA_TOOL_OPTIONS variable for webserver_private_key_password_cmd

IMPALA-6293 intends to unset JAVA_TOOL_OPTIONS variable for all the
shell commands that run java. So they won't fail in binding to the same
debug port. However, it's not done correctly for the command of
webserver_private_key_password_cmd. This patch corrects the mistake.

Tests:
 - Tested on a secured cluster. Verified catalogd can start with port
   binding options set in JAVA_TOOL_OPTIONS.

Change-Id: I40b57a8eb28e6e2b48b35b0f361f0e220c7f89d2
Reviewed-on: http://gerrit.cloudera.org:8080/19638
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Shell command of webserver_private_key_password_cmd doesn't unset JAVA_TOOL_OPTIONS variable
> --------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-12011
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12011
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>            Reporter: Quanlong Huang
>            Assignee: Quanlong Huang
>            Priority: Critical
>
> I'm using IntelliJ to attach to a catalog server in a secured cluster (Kerberos+SSL), I set JAVA_TOOL_OPTIONS to
> {code:java}
> -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=30020{code}
> However, catalogd fails to start since the java process launched by the webserver_private_key_password_cmd also inherits this env variable. Hence failed to bind the port of 30020 which is already used by catalogd.
> {code:java}
> ERROR: transport error 202: bind failed: Address already in use
> ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
> JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
> F0321 06:23:42.424225 577816 catalogd-main.cc:70] SSL private-key password command ('/var/run/cloudera-scm-agent/process/63-impala-CATALOGSERVER/altscript.sh sec-0-webserver_private_key_password_cmd') failed with error: Shell cmd: '/var/run/cloudera-scm-agent/process/63-impala-CATALOGSERVER/altscript.sh sec-0-webserver_private_key_password_cmd' exited with error status: '2'. Stdout was: ''
> . Impalad exiting.
> *** Check failure stack trace: ***
>     @          0x2e3d5ec
>     @          0x2e3eedc
>     @          0x2e3cf4a
>     @          0x2e40b48
>     @           0xbdfec7
>     @           0xb54a07
>     @     0x7feabb01d444
>     @           0xbdeb96
> Picked up JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=30020 {code}
> IMPALA-6293 is supposed to address this issue. But the patch of it has a mistack in 
> be/src/util/webserver.cc: https://gerrit.cloudera.org/c/12005/7/be/src/util/webserver.cc
> {code:cpp}
> const string& password_cmd = FLAGS_webserver_private_key_password_cmd;
> if (!password_cmd.empty()) {
>   if (!RunShellProcess(password_cmd, &key_password, true)) {
>     return Status(TErrorCode::SSL_PASSWORD_CMD_FAILED, password_cmd, key_password,
>         {"JAVA_TOOL_OPTIONS"});  // The last argument should be added to the above RunShellProcess() call
>   }{code}
> Thus the shell command of webserver_private_key_password_cmd doesn't unset the JAVA_TOOL_OPTIONS env variable.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org