Skip to content
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

Having trouble in creating a file #18

Open
IolandaRosu opened this issue Jan 27, 2017 · 3 comments
Open

Having trouble in creating a file #18

IolandaRosu opened this issue Jan 27, 2017 · 3 comments

Comments

@IolandaRosu
Copy link

Files.createFile(glusterPath) with or without a set of pre-permissions does not create a file, nor an exception is thrown. What would be the cause of it?

@louiszuckerman
Copy link
Collaborator

Check the logs on your glusterfs servers. There should be some indication there. Is the client connecting? Is the server giving an error?

@eskuai
Copy link

eskuai commented Oct 30, 2019

Running example , /baz is not a file, it is a directory and show error:


sun.nio.fs.LinuxFileSystemProvider@12a3a380
com.sun.nio.zipfs.ZipFileSystemProvider@29453f44
com.peircean.glusterfs.GlusterFileSystemProvider@5cad8086
com.peircean.glusterfs.GlusterFileSystemProvider@5cad8086
mountPath/
TOTAL SPACE: 85886742528
USABLE SPACE: 73609973760
UNALLOCATED SPACE: 73609973760
gluster://10.0.3.33:logs
Is /foo/.bar hidden? true
Is /foo/bar hidden? false
glusterPath.getClass:=class com.peircean.glusterfs.GlusterPath
glusterPath:=/baz
glusterPath.getFileSystem().toString:=gluster://10.0.3.33:logs
java.nio.file.FileAlreadyExistsException: /baz
File exists, created at 2019-10-30T15:10:07Z
java.nio.file.FileAlreadyExistsException: /baz
        at com.peircean.glusterfs.GlusterFileChannel.init(GlusterFileChannel.java:78)
        at com.peircean.glusterfs.GlusterFileSystemProvider.newFileChannelHelper(GlusterFileSystemProvider.java:129)
        at com.peircean.glusterfs.GlusterFileSystemProvider.newByteChannel(GlusterFileSystemProvider.java:119)
        at java.nio.file.Files.newByteChannel(Files.java:361)
        at java.nio.file.Files.createFile(Files.java:632)
        at com.peircean.glusterfs.example.Example.main(Example.java:70)
Exception in thread "main" java.io.IOException: Unable to create or open file '/baz' on volume 'gluster://10.0.3.33:logs'
        at com.peircean.glusterfs.GlusterFileChannel.init(GlusterFileChannel.java:86)
        at com.peircean.glusterfs.GlusterFileSystemProvider.newFileChannelHelper(GlusterFileSystemProvider.java:129)
        at com.peircean.glusterfs.GlusterFileSystemProvider.newByteChannel(GlusterFileSystemProvider.java:119)
        at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
        at java.nio.file.Files.newOutputStream(Files.java:216)
        at java.nio.file.Files.write(Files.java:3292)
        at com.peircean.glusterfs.example.Example.main(Example.java:79)
[INFO] ---------------------------------------------------------------------

@eskuai
Copy link

eskuai commented Nov 5, 2019

It is about permissions ... always try applygin 0777
Tx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants