-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flex deployment fails for Windows 10 users. #937
Comments
Alex can you take a look and check out the severity of this? |
Sure, I can take a look this afternoon. |
This is coming from the common library though. Are we not detecting windows On Sep 27, 2016 10:02, "Alex Sloan" notifications@github.com wrote:
|
fyi, haven't been able to stage Flex successfully on Windows yet. tried on a gce instance and the test laptop. |
With this error? On Tue, Sep 27, 2016 at 4:02 PM, João Martins notifications@github.com
|
Yes |
Do the maven and gradle plugins work on Windows 10? On Tue, Sep 27, 2016 at 4:17 PM, João Martins notifications@github.com
|
Possibly, I doubt they're calling Files.setPosixFilePermissions(). What's causing this on Windows is that we're trying to get a PosixFileAttributeView from WindowsFileSystemProvider, and it can't return it. I don't know of another way to set permissions on a file using Files. I might try to not set any permissions and see if that works. |
In fact, this is failing for ALL windows users. Files.setPosixFilePermissions doesn't work in Windows, and I haven't been able to discover a way to modify file permissions on Windows, without having to run console commands.. I just verified that the copied file has owner and group read, which should be enough for our case, unless I'm missing anything? |
What determines the default permissions? And is it system dependent? |
As I understand, in java.nio there isn't a way to specify file permissions at copy time, you need to do it after copying, through Files.setPosixFilePermissions. However, this doesn't work on Windows, and I don't know of any other way other than running system commands. I removed the setPosixFilePermissions call on Windows and the whole deployment succeeded. Originally, I had only introduced the call to assure backwards compatibility with the previous call. However, unless there is an edge case that I can't see right now, we don't need this call. |
FWIW, on Windows, after the file is copied, SYSTEM, Administrators and the current user are given full control of the file. I'm running as a machine administrator, but for any user that has similar permissions to run a deployment, the same should still apply. |
We did push this down: But doesn't that beg the question why it works for Maven/Gradle? On Tue, Sep 27, 2016 at 6:07 PM, João Martins notifications@github.com
|
What I meant in my previous comment is that intellij isn't consuming this yet. |
Aha! In any case, both codepaths would share the same problem. On Tue, Sep 27, 2016 at 6:18 PM, Etan Shaul notifications@github.com
|
Yeah, I'd be surprised if they didn't since the common lib is also using the posix permission setter mechanism. |
It appears that someone on the library side was cunning enough to add a check:
I can go ahead and replicate this on our side? Although I think I was just able to run Jetty without it |
ah yes. I didn't notice that check. Perhaps in the interim, we should do the same thing in Intellij, and then get rid of this code once we defer to the common-lib for flex staging |
I do have an issue to track that too: #717 |
I wasn't able to reproduce any issue without this piece of code, running the war on Jetty. |
+1 On Tue, Sep 27, 2016 at 6:25 PM, Etan Shaul notifications@github.com
|
Ok. @chanseokoh can you elaborate on your comment about jetty and the file persmissions relating to this to make sure we aren't missing something? is this still reproducible? |
I was just able to reproduce the issue @chanseokoh was referring to. When the app is deployed to Flex, no instances will be spun up. Thanks @chanseokoh ! |
Actually, the version was stopped, which is why I couldn't reach the endpoint.. |
Unless @chanseokoh can still reproduce the issue with a different setup to mine, I suggest to go ahead with this code, and possibly delete the other one from the library. |
STGM On Tue, Sep 27, 2016 at 6:56 PM João Martins notifications@github.com
|
I just noticed that flex deploy works fine without the This permission issue in the flex runtime image is more or less "fixed" by myself, inadvertently. When I was fixing the broken Cloud Debugger in the flex image, I decided to explicitly unpack a war (which is done by |
But what about users of custom images? Couldn't they still have this issue? On Wed, Sep 28, 2016 at 10:57 AM, João Martins notifications@github.com
|
For posterity: GoogleCloudPlatform/appengine-plugins#224 describes why this code change is safe. |
Hello, Can i fix this bug with plugin 1.0-BETA-0.3 ? |
@anhld4 unfortunately not. We have a release planned tomorrow that'll include a fix for this. |
### What is this PR for? Fixing ZEPPELIN-2382: A fresh install of Zeppelin 0.7.1 failed to start on a Windows due to the use of [getPosixFilePermissions](https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#getPosixFilePermissions(java.nio.file.Path,%20java.nio.file.LinkOption...)) This method fails on Windows with an UnsupportedOperationException - however, recovering (that is ignoring the exception) appears to have no negative effects. (For a discussion on this related to a different project see, e.g., GoogleCloudPlatform/cloud-code-intellij#937 ) ### What type of PR is it? [Bug Fix] ### Todos * [x] - Have the binary distribution checked by the reporter of [ZEPPELIN-2382] ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-2382 ### How should this be tested? Check if clean distribution runs on Windows. Important: Ensure that HADOOP_HOME points to a folder containing bin/winutils.exe since this pull request does not include a fix for https://issues.apache.org/jira/browse/ZEPPELIN-2438 (which is part of a separate pull request). ### Screenshots (if appropriate) N/A ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Christian Fries <email@christian-fries.de> Closes #2305 from cfries/windows-compatiblity-interpreter-binding and squashes the following commits: e3b5738 [Christian Fries] Added graceful exception handling if posix permission is not available 096fed6 [Christian Fries] Merge branch 'master' into apache/master 3635ed8 [Christian Fries] [ZEPPELIN-2375]: Avoid modification of CLASSPATH variable. (cherry picked from commit fb80bf7) Signed-off-by: Lee moon soo <moon@apache.org>
### What is this PR for? Fixing ZEPPELIN-2382: A fresh install of Zeppelin 0.7.1 failed to start on a Windows due to the use of [getPosixFilePermissions](https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#getPosixFilePermissions(java.nio.file.Path,%20java.nio.file.LinkOption...)) This method fails on Windows with an UnsupportedOperationException - however, recovering (that is ignoring the exception) appears to have no negative effects. (For a discussion on this related to a different project see, e.g., GoogleCloudPlatform/cloud-code-intellij#937 ) ### What type of PR is it? [Bug Fix] ### Todos * [x] - Have the binary distribution checked by the reporter of [ZEPPELIN-2382] ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-2382 ### How should this be tested? Check if clean distribution runs on Windows. Important: Ensure that HADOOP_HOME points to a folder containing bin/winutils.exe since this pull request does not include a fix for https://issues.apache.org/jira/browse/ZEPPELIN-2438 (which is part of a separate pull request). ### Screenshots (if appropriate) N/A ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Christian Fries <email@christian-fries.de> Closes #2305 from cfries/windows-compatiblity-interpreter-binding and squashes the following commits: e3b5738 [Christian Fries] Added graceful exception handling if posix permission is not available 096fed6 [Christian Fries] Merge branch 'master' into apache/master 3635ed8 [Christian Fries] [ZEPPELIN-2375]: Avoid modification of CLASSPATH variable.
### What is this PR for? Fixing ZEPPELIN-2382: A fresh install of Zeppelin 0.7.1 failed to start on a Windows due to the use of [getPosixFilePermissions](https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#getPosixFilePermissions(java.nio.file.Path,%20java.nio.file.LinkOption...)) This method fails on Windows with an UnsupportedOperationException - however, recovering (that is ignoring the exception) appears to have no negative effects. (For a discussion on this related to a different project see, e.g., GoogleCloudPlatform/cloud-code-intellij#937 ) ### What type of PR is it? [Bug Fix] ### Todos * [x] - Have the binary distribution checked by the reporter of [ZEPPELIN-2382] ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-2382 ### How should this be tested? Check if clean distribution runs on Windows. Important: Ensure that HADOOP_HOME points to a folder containing bin/winutils.exe since this pull request does not include a fix for https://issues.apache.org/jira/browse/ZEPPELIN-2438 (which is part of a separate pull request). ### Screenshots (if appropriate) N/A ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Christian Fries <email@christian-fries.de> Closes apache#2305 from cfries/windows-compatiblity-interpreter-binding and squashes the following commits: e3b5738 [Christian Fries] Added graceful exception handling if posix permission is not available 096fed6 [Christian Fries] Merge branch 'master' into apache/master 3635ed8 [Christian Fries] [ZEPPELIN-2375]: Avoid modification of CLASSPATH variable.
OS: Windows 10
Java: 1.8.0_112-release
IJ: 2016.2.4
plugin: 1.0-BETA-0.2
NONE_
error.message
null
error.stacktrace
java.lang.UnsupportedOperationException
at java.nio.file.Files.setPosixFilePermissions(Files.java:2044)
at com.google.cloud.tools.intellij.appengine.cloud.AppEngineFlexibleStage.stage(AppEngineFlexibleStage.java:63)
at com.google.cloud.tools.intellij.appengine.cloud.AppEngineFlexibleDeployTask.execute(AppEngineFlexibleDeployTask.java:68)
at com.google.cloud.tools.intellij.appengine.cloud.AppEngineExecutor.run(AppEngineExecutor.java:37)
at com.intellij.openapi.application.TransactionGuardImpl$6.run(TransactionGuardImpl.java:291)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:326)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:310)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:793)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:629)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:385)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
The text was updated successfully, but these errors were encountered: