cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] Upload file 404 Not Found " No disk space available"

gsardisco
Champ in-the-making
Champ in-the-making

Hi everyone, in Alfresco 6.1 Community, I sent to /alfresco/service/api/upload file and metadata, as I sent in Alfresco 4.2 (I migrated from this).

Now the response is:

{
    "status": {
        "code": 404,
        "name": "Not Found",
        "description": "Requested resource is not available."
    },
    "message": " No disk space available",
    "exception": "",
    "callstack": [],
    "server": "Community v6.1.2 (r589dc49b-b205) schema 13,001",
    "time": "May 24, 2021 10:56:43 AM"
}

I have 69GB free space and 200KB is my file.

This is the request:

curl -L -X POST 'http://my.host.com:8080/alfresco/service/api/upload' \
-H 'Authorization: Basic YWRtaW46YWRtaW4=' \
-F 'filedata=@"/path/to/file"' \
-F 'filename="filename"' \
-F 'description="some description"' \
-F 'siteid="my-fite"' \
-F 'containerid="documentLibrary"' \
-F 'uploaddirectory="Path/to/folder"' \
-F 'contenttype="my:content"'

I generate Path/to/folder calling POST /service/api/metadata/node/workspace/SpacesStore and I see the new folder in /share webapp.

There are no error in log file:

 2021-05-21 17:11:43,692  DEBUG [web.scripts.RepositoryContainer] [http-nio-8080-exec-20] Current authentication: unauthenticated
 2021-05-21 17:11:43,692  DEBUG [web.scripts.RepositoryContainer] [http-nio-8080-exec-20] Authentication required: user
 2021-05-21 17:11:43,692  DEBUG [web.scripts.RepositoryContainer] [http-nio-8080-exec-20] Guest login requested: false
 2021-05-21 17:11:43,700  DEBUG [scripts.servlet.RemoteUserAuthenticatorFactory] [http-nio-8080-exec-20] Extracted external user ID from request: ad***
 2021-05-21 17:11:43,700  DEBUG [web.scripts.RepositoryContainer] [http-nio-8080-exec-20] Authentication: authenticated as admin
 2021-05-21 17:11:43,701  DEBUG [web.scripts.RepositoryContainer] [http-nio-8080-exec-20] Creating Transactional Response for ReadWrite transaction; buffersize=4096
 2021-05-21 17:11:43,701  DEBUG [web.scripts.RepositoryContainer] [http-nio-8080-exec-20] Begin retry transaction block: required,readwrite
 2021-05-21 17:11:43,702  DEBUG [jscript.RhinoScriptProcessor.calls] [http-nio-8080-exec-20] upload.post.js Start
 2021-05-21 17:11:43,710  DEBUG [jscript.RhinoScriptProcessor.calls] [http-nio-8080-exec-20] upload.post.js End 8 ms
 2021-05-21 17:11:43,712  DEBUG [web.scripts.RepositoryContainer] [http-nio-8080-exec-20] End retry transaction block: required,readwrite
 2021-05-21 17:11:43,713  DEBUG [web.scripts.RepositoryContainer] [http-nio-8080-exec-20] Authentication reset: unauthenticated

Alfresco runs in bare metal, without screen.

How can I do troubleshooting?

Thanks

1 ACCEPTED ANSWER

Hello,

Its doesn't looks like a space issue but in alfresco 6.2 certain param has been changed.

Here is the sample curl request for uploading a file .

$ curl -X POST 
-F filedata=@test.txt 
-F "name=somefile.txt" 
-F "nodeType=cm:content" 
-F "cm:title=My text" 
-F "cm:description=My text document description" 
-F "relativePath=My Folder" 
-H 'Authorization: Basic VElDS0VUXzA4ZWI3ZTJlMmMxNzk2NGNhNTFmMGYzMzE4NmNjMmZjOWQ1NmQ1OTM=' http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/children 

If you are using a custom file type then here is the sample request and body for that,

$ curl -X POST -F filedata=@test.txt 
-F "name=somefile.txt" 
-F "nodeType=acme:document" 
-F "acme:documentId=DOC001" 
-F "aspectNames=acme:securityClassified" 
-F "acme:securityClassification=Public" 
-F "cm:title=My text" 
-F "cm:description=My custom text document description" 
-F "relativePath=My Custom Folder" 
-H 'Authorization: Basic VElDS0VUXzA4ZWI3ZTJlMmMxNzk2NGNhNTFmMGYzMzE4NmNjMmZjOWQ1NmQ1OTM=' http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/children 

https://docs.alfresco.com/content-services/6.1/develop/rest-api-guide/folders-files/#uploadfilecusto...

-Arjun

View answer in original post

4 REPLIES 4

gsardisco
Champ in-the-making
Champ in-the-making

I tried another endpoint to upload file:

curl -L -X POST /alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/children
-H 'Authorization: Basic YWRtaW46YWRtaW4=' \
-F 'filename="my-file.pdf"' \
-F 'description="my-description"' \
-F 'siteid="my-site"' \
-F 'containerid="documentLibrary"' \
-F 'uploaddirectory="Path/to/folder"' \
-F 'contenttype="my:content"' \
-F 'filedata=@"/path/to/my-file.pdf"'

The response is the same:

{
    "error": {
        "errorKey": "No disk space available",
        "statusCode": 409,
        "briefSummary": "04250013 No disk space available",
        "stackTrace": "For security reasons the stack trace is no longer displayed, but the property is kept for previous versions",
        "descriptionURL": "https://api-explorer.alfresco.com"
    }
}

I see in souce code, that problem is parse request.

This instruction

List<FileItem> fileItems = upload.parseRequest(req);

return an emply list and the caller throw an exception:

if (formData.getFields().length == 0) {
    throw new ConstraintViolatedException("No disk space available");
}

I have another application in the same server, for upload file through form-data and it works fine.

Can you help me to understand where is the problem?
Do I need to add some configuration in Alfresco?

Thanks

 
 

 

 

Hello,

Its doesn't looks like a space issue but in alfresco 6.2 certain param has been changed.

Here is the sample curl request for uploading a file .

$ curl -X POST 
-F filedata=@test.txt 
-F "name=somefile.txt" 
-F "nodeType=cm:content" 
-F "cm:title=My text" 
-F "cm:description=My text document description" 
-F "relativePath=My Folder" 
-H 'Authorization: Basic VElDS0VUXzA4ZWI3ZTJlMmMxNzk2NGNhNTFmMGYzMzE4NmNjMmZjOWQ1NmQ1OTM=' http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/children 

If you are using a custom file type then here is the sample request and body for that,

$ curl -X POST -F filedata=@test.txt 
-F "name=somefile.txt" 
-F "nodeType=acme:document" 
-F "acme:documentId=DOC001" 
-F "aspectNames=acme:securityClassified" 
-F "acme:securityClassification=Public" 
-F "cm:title=My text" 
-F "cm:description=My custom text document description" 
-F "relativePath=My Custom Folder" 
-H 'Authorization: Basic VElDS0VUXzA4ZWI3ZTJlMmMxNzk2NGNhNTFmMGYzMzE4NmNjMmZjOWQ1NmQ1OTM=' http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/children 

https://docs.alfresco.com/content-services/6.1/develop/rest-api-guide/folders-files/#uploadfilecusto...

-Arjun

gsardisco
Champ in-the-making
Champ in-the-making

Hi Arjun, thank for your answare.

I had Tomcat misconfiguration.
I actived allowCasualMultipartParsing="true" in context.xml. Deleted this, API upload back to work.

Thanks.

EddieMay
World-Class Innovator
World-Class Innovator

Hi @gsardisco 

Thanks for updating your thread and I've accepted the answer on your behalf - it's really helpful to other users when a correct answer is accepted as a solution.

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!