No uploads/attachments possible
Asked by Ulrich:

I installed a new Confluence on linux and managed to restore a backup.

No I want to add new pages and attachments, but the Upload-function always returns "Datei konnte nicht auf Confluence hochgeladen werden. Der Server ist m?glicherweise nicht verf?gbar."

I doesn't matter, which file type and which file size, the maximum filesize is set to 100MB, the user has all rights to the space.

I checked the linux permissions on the attlassian-data directory and set the osner/group to the confluence user, but this doesn't help either.

The logs only have the known issues with the "memory leak" (the Tomcat check issue), but no logs to the upload problems.

What could the problem be?

Thanks for any hint.

Ulrich


Answers:
author: Ulrich
body: So, the issue comes up again, but now, I think I have the solution:

Some PDF-files, which I attach to a page, have the "image/gif" as content type (you find this under the properties of an attachment in the attachment-list).

If I change this to "application/pdf", everything works fine again.

But the question is now, why the content type is not correctly set? All pdf-files have the ".pdf" extension, they are displayable in any PDF-readers.


author: Ulrich
body: So, after updating to Confluence 4.3.2, the issue does not show up anymore... actually, all attachments/uploads work correctly.


author: Bruna Griebeler
body: Ulrich

Since the issue is related to language my guest is about your database. Check if your database Encoding is set as UTF8 and using InnoDB.

Check here for more details: [Configuring Database Character Encoding](https://confluence.atlassian.com/display/DOC/Configuring+Database+Character+Encoding)

Hope it helps!

comments: author: Ulrich
body: Thanks for this suggestion.

But I use PostgreSQL and the scheme ist set to ENCODING='UTF8'... I will update my confluence to 4.3.x in the next days, perhaps the issue does not appear again ;-)


author: Ulrich
body: The problem now comes again, and I could reproduce it every time, I upload one PDF file, the dialog with attachments afterwards only gives "Bei der Kommunikation mit dem Server ist ein Fehler aufgetreten. Versuchen Sie es sp?ter noch einmal."

If I upload JPGs etc., everything works fine. Has this something to do with the indexer, that this has problems while indexing PDFs?


author: Ulrich
body: The problem now comes again, and I could reproduce it every time, I upload one PDF file, the dialog with attachments afterwards only gives "Bei der Kommunikation mit dem Server ist ein Fehler aufgetreten. Versuchen Sie es sp?ter noch einmal."

If I upload JPGs etc., everything works fine. Has this something to do with the indexer, that this has problems while indexing PDFs?


author: Andre Gammelgaard
body: OK, thats weird. MAybe some from Atlassian can answer on that. Maybe it's a bug ? Language should not have anything to with uploads I think.


author: Ulrich
body: I don't believe what was the solution:

I changed the language of confluence to english, now the upload works again!


author: Ulrich
body: Thanks for your help, but catalina.out and atlassian-confluence.log does not report any errors. WIKI without attachments is a bit useless ;-(


author: Andre Gammelgaard
body: OK, that jira gadget. I don't think that should give any problems, but can't say for sure. If it is running as root then it should be no problem with permissions on the OS. I'm blank on ideas if the atlassian-confluence.log is silent, and the catalina.out is silent.


author: Ulrich
body: the confluence was installed as root, so that the deamon could be configured correctly. With "root" user I can touch files without problems. Should the data directory have user/group confluence:confluence rather than root?

The import-action has imported attachments either, so basically confluence can store files in the attachment-directory.

I found an error in the atlassian-confluence.log:

2012-07-23 13:08:55,448 WARN \[http-8090-2\] \[atlassian.plugin.webresource.DefaultResourceDependencyResolver\] resolveDependencies Cannot find web resource module for: com.atlassian.jira.gadgets:common

Does this perhaps influence the upload problem?


author: Andre Gammelgaard
body: Try and log in as the user running confluence. And cd into the directory, and check that you can do a touch on a new file, maybe the OS will give you some hint.