You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2021/05/17 13:22:57 UTC

[GitHub] [drill] kingswanwho opened a new issue #2231: Drill cannot startup if java path contains a whitespace

kingswanwho opened a new issue #2231:
URL: https://github.com/apache/drill/issues/2231


   **Describe the bug**
   My JAVA_PATH set to "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home",
   when run `./drillbit.sh start`, drill cannot startup and report error:
   ` /Users/Chester/Gwssi/ApacheDrill/apache-drill-1.19.0-SNAPSHOT/bin/runbit: line 109: /Library/Internet: No such file or directory`  
   `/Users/Chester/Gwssi/ApacheDrill/apache-drill-1.19.0-SNAPSHOT/bin/runbit: line 109: exec: /Library/Internet: cannot execute: No such file or directory`
   
   **To Reproduce**
   Steps to reproduce the behavior:  
   1. set JAVA_PATH to a jdk path which contains whitespace:  
   `export JAVA_PATH=/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home`
   2. startup drill:  
   `./bin/drillbit.sh start`
   3. See error in log file:  
   `log/drillbit.out`
   
   **Expected behavior**
   Drill cannot startup normally.
   
   **Screenshots**
   ![image](https://user-images.githubusercontent.com/15710469/118493228-77805600-b753-11eb-89f0-0bc677cf0f74.png)
   ![image](https://user-images.githubusercontent.com/15710469/118493303-8a932600-b753-11eb-8cf6-418bcd3e23e0.png)
   
   **Desktop (please complete the following information):**
    - MacOS Big Sur 11.2.3 
   
   **Additional context**
   print the command of line 109 in runbit:
   `echo exec $BITCMD`  
   
   See the print result in `log/drillbit.out`:  
   ![image](https://user-images.githubusercontent.com/15710469/118494219-8582a680-b754-11eb-8957-3f52a6a2de61.png)
   We can see that the whitespace in java path doesn't come up with a backslash escape, so that `exec` cannot find the correct java path.
   After I set the java path without white space, like:  
   `/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home`  
   Drill startup process back to normal.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] kingswanwho edited a comment on issue #2231: Drill cannot startup if java path contains whitespace

Posted by GitBox <gi...@apache.org>.
kingswanwho edited a comment on issue #2231:
URL: https://github.com/apache/drill/issues/2231#issuecomment-947277615


   > @kingswanwho Did you ever find a solution for this?
   @cgivre Hi Charles,  unfortunately, I didn't find a solution so far. What I found now is, in MacOS,  JDK installed by HomeBrew saves in path ”Internet Plug-Ins“ with a whitespace. And in Drill runbit script, BITCMD is composed by JAVA and other variable, so I think even use double quote to assign JAVA would not work when use JAVA to compose BITCMD. I have ever tried use regex to replace whitespace with "\  ", but still not work. What I did now is just use a java path without whitespace. If Drill needs to handle a java path with whitespace, I could try to find a solution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] cgivre commented on issue #2231: Drill cannot startup if java path contains whitespace

Posted by GitBox <gi...@apache.org>.
cgivre commented on issue #2231:
URL: https://github.com/apache/drill/issues/2231#issuecomment-947042534


   @kingswanwho Did you ever find a solution for this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] kingswanwho edited a comment on issue #2231: Drill cannot startup if java path contains whitespace

Posted by GitBox <gi...@apache.org>.
kingswanwho edited a comment on issue #2231:
URL: https://github.com/apache/drill/issues/2231#issuecomment-947277615


   > @kingswanwho Did you ever find a solution for this?
   @cgivre Hi Charles,  unfortunately, I didn't find a solution so far. What I found now is, in MacOS,  JDK installed by HomeBrew will save in path ”Internet Plug-Ins“ with a whitespace. And in Drill runbit script, BITCMD is composed by JAVA and other variable, so I think even use double quote to assign JAVA would not work when use JAVA to compose BITCMD. I have ever tried use regex to replace whitespace with "\  ", but still not work. What I did now is just use a java path without whitespace. If Drill needs to handle a java path with whitespace, I could try to find a solution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] vdiravka commented on issue #2231: Drill cannot startup if java path contains whitespace

Posted by GitBox <gi...@apache.org>.
vdiravka commented on issue #2231:
URL: https://github.com/apache/drill/issues/2231#issuecomment-844319725


   Please use Jira to publish bugs and improvement ideas:
   http://drill.apache.org/docs/apache-drill-contribution-guidelines/
   https://issues.apache.org/jira/projects/DRILL/issues
   
   The recommendation here:
   > Sometimes using the absolute path like C:\Program Files\Java\jdk1.8.0_131 can cause some ambiguity while installing a tool or running a script where JAVA is needed. So, using double quotes for the path is a wise choice.
   Also, you can set the JAVA_HOME path in the following ways if it contains space:
   C:\Program~1\Java\jdk1.8.0_131
   Progra~1 = 'Program Files'
   Progra~2 = 'Program Files(x86)'
   
   https://stackoverflow.com/questions/45660062/shoud-java-home-variable-contain-quotes-if-points-to-path-with-spaces
   
   But anyway you can create a ticket and mark it is as minor


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] kingswanwho commented on issue #2231: Drill cannot startup if java path contains whitespace

Posted by GitBox <gi...@apache.org>.
kingswanwho commented on issue #2231:
URL: https://github.com/apache/drill/issues/2231#issuecomment-947277615


   > @kingswanwho Did you ever find a solution for this?
   No, I didn't find a solution so far. What I found now is, in MacOS,  JDK installed by homebrew will save in path ”Internet Plug-Ins“ with a whitespace. And in Drill runbit script, BITCMD is composed by JAVA and other variable, so I think even use double quote to assign JAVA would not work when use JAVA to compose BITCMD. I have ever tried use regex to replace whitespace with "\  ", but still not work. What I did now is just use a java path without whitespace. If Drill needs to handle a java path with whitespace, I could try to find a solution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] kingswanwho commented on issue #2231: Drill cannot startup if java path contains whitespace

Posted by GitBox <gi...@apache.org>.
kingswanwho commented on issue #2231:
URL: https://github.com/apache/drill/issues/2231#issuecomment-845308675


   @vdiravka Hi, thank you so much for your two solutions, include **double quotes for the path** and **use a variable to replace the part which contains white space**. I tried both of them, but seems both of them cannot solved the problem. Maybe I could provide a screen record, so that you can help me to figure out anything wrong I did here.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] cgivre commented on issue #2231: Drill cannot startup if java path contains whitespace

Posted by GitBox <gi...@apache.org>.
cgivre commented on issue #2231:
URL: https://github.com/apache/drill/issues/2231#issuecomment-845147999


   @vdiravka There was a discussion about allowing users to post issues here and using JIRA to track actual work in progress. 
   
   It seems we should add this to the documentation however as I think people have run into this issue before. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] kingswanwho edited a comment on issue #2231: Drill cannot startup if java path contains whitespace

Posted by GitBox <gi...@apache.org>.
kingswanwho edited a comment on issue #2231:
URL: https://github.com/apache/drill/issues/2231#issuecomment-845308675


   @vdiravka Hi, thank you so much for your two solutions, include **double quotes for the path** and **use a variable to replace the part which contains white space**. I tried those two methods, but seems both of them cannot solved the problem. Maybe I could provide a screen record, so that you can help me to figure out anything wrong I did here.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] kingswanwho edited a comment on issue #2231: Drill cannot startup if java path contains whitespace

Posted by GitBox <gi...@apache.org>.
kingswanwho edited a comment on issue #2231:
URL: https://github.com/apache/drill/issues/2231#issuecomment-947277615


   > @kingswanwho Did you ever find a solution for this?
   @cgivre Hi Charles,  unfortunately, I didn't find a solution so far. What I found now is, in MacOS,  JDK installed by HomeBrew saves in path ”Internet Plug-Ins“ with a whitespace. And in Drill runbit script, BITCMD is composed by JAVA and other variable, so I think even use double quote to assign JAVA would not work when use JAVA to compose BITCMD. I have ever tried use regex to replace whitespace with "\  " in runbit, but still not work. What I did now is just use a java path without whitespace. If Drill needs to handle a java path with whitespace, I could try to find a solution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] kingswanwho edited a comment on issue #2231: Drill cannot startup if java path contains whitespace

Posted by GitBox <gi...@apache.org>.
kingswanwho edited a comment on issue #2231:
URL: https://github.com/apache/drill/issues/2231#issuecomment-947277615


   > @kingswanwho Did you ever find a solution for this?
   @cgivre Hi Charles,  unfortunately, I didn't find a solution so far. What I found now is, in MacOS,  JDK installed by HomeBrew saves in path ”Internet Plug-Ins“ with a whitespace. And in Drill runbit script, BITCMD is composed by JAVA and other variable, so I think even use double quote to assign JAVA would not work even use JAVA to compose BITCMD. I have ever tried use regex to replace whitespace with "\  ", but still not work. What I did now is just use a java path without whitespace. If Drill needs to handle a java path with whitespace, I could try to find a solution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] kingswanwho edited a comment on issue #2231: Drill cannot startup if java path contains whitespace

Posted by GitBox <gi...@apache.org>.
kingswanwho edited a comment on issue #2231:
URL: https://github.com/apache/drill/issues/2231#issuecomment-947277615


   @cgivre Hi Charles,  unfortunately, I didn't find a solution so far. What I found now is, in MacOS,  JDK installed by HomeBrew saves in path ”Internet Plug-Ins“ with a whitespace. And in Drill runbit script, BITCMD is composed by JAVA and other variable, so I think even use double quote to assign JAVA would not work when use JAVA to compose BITCMD. I have ever tried use regex to replace whitespace with "\  " in runbit, but still not work. What I did now is just use a java path without whitespace. If Drill needs to handle a java path with whitespace, I could try to find a solution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] luocooong commented on issue #2231: Drill cannot startup if java path contains whitespace

Posted by GitBox <gi...@apache.org>.
luocooong commented on issue #2231:
URL: https://github.com/apache/drill/issues/2231#issuecomment-845174269


   I think we can talk about solution for any idea here before we create the JIRA.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org