• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

File Sharing error

Sam12

New Pleskian
Hi,

After enabling File Sharing in Plesk 12, the service appears to function correctly. If only a few files are uploaded, they are ok. However, after uploading a directory structure with a handful of MB, and subdirectories, File Sharing stops. It shows at the top of the screen:

"Internal error: The File Sharing service is temporarily unavailable because the site is down for maintenance."

it also says in the main window:

"Unable to load folders list."

Clicking on Upload Files, that dialog also shows "Unable to load folders list."

I have checked that the ownership of those files on the server is www-data:www-data , and that permissions are 755 for directories and 644 for files, because it seems like ownership and permissions could be an issue, however that doesn't fix it. Removing all the files in the share does fix it, however that's not helpful if the files should be available for sharing.

Any ideas?

Thanks.
 
@Sam12,

You have to verify first that you can receive and send data from the server (i.e. excluding the possibility that the network of the ISP has a hickup).

If that is the case, please provide some (relevant) output from the logs, enabling me to investigate the issue.

Kind regards.....
 
>> You have to verify first that you can receive and send data from the server (i.e. excluding the possibility that the network of the ISP has a hickup).

the plesk admin panel is up. the website is up. therefore, the ISP doesn't have a hiccup.

>> If that is the case, please provide some (relevant) output from the logs, enabling me to investigate the issue.

based on that error description, which log files are interesting? I have looked in some logs already. but did not yet find a very good log entry to explain it.

panel.log has:

[2015-04-06 08:49:18] ERR [panel] Share folders tree retrival failed: sharing type=shared, error=Method Not Allowed
[2015-04-06 08:50:17] ERR [panel] Share folders tree retrival failed: sharing type=shared, error=Method Not Allowed
[2015-04-06 08:50:33] ERR [panel] File sharing list retrieval failed: sharing type=shared, error=The File Sharing service is temporarily unavailable because the site is down for maintenance.

the next entry in panel.log, more than an hour later, is unrelated:
[06-Apr-2015 10:13:57 America/New_York] PHP Warning: proc_open(): fork failed
 
@Sam12,

Seems to be the case that the SMB part in Plesk is working properly, but that the external file share is not available. Can you confirm?

You can try a ping to the remote file server, in order to verify the possible to connect.

You can also do a "nmap portscan" of the remote file server, in order to verify that the appropriate ports are open.

Ciao
 
@Sam1

By the way, also check your memory usage, the command "free -m" should give a (simple) indication of memory overusage.

Also check whether swap has been activated properly, if you use a swap.

Just let me know,

Kind regards....
 
>> but that the external file share is not available. Can you confirm?
the external file share is available. I can mount a drive with linux, and read/write files.

>> You can try a ping to the remote file server
ping and ICMP are blocked, however there is connectivity. the website is available. the fileshare is available.

>> "nmap portscan"
Scanned at 2015-04-08 14:32:24 UTC for 44s
Not shown: 988 filtered ports
PORT STATE SERVICE
20/tcp closed ftp-data
21/tcp open ftp
22/tcp closed ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
110/tcp open pop3
443/tcp open https
587/tcp open submission
8443/tcp open https-alt
60020/tcp closed unknown
60443/tcp closed unknown

>> "free -m"
it's a good point, because a test server was out of memory. However, continuing testing with other machine:
free -m
total used free shared buffers cached
Mem: 1690 862 828 44 15 134
-/+ buffers/cache: 711 979
Swap: 0 0 0

>>swap
no swap, but memory is ok

As per the original post, File Sharing is sort of working. Files can be uploaded, downloaded, viewed, mounted, everything.
Only after adding more than a trivial number of files, something breaks somewhere. And then.. it shows those errors in the Plesk window:
"Internal error: The File Sharing service is temporarily unavailable because the site is down for maintenance."
and
"Unable to load folders list."
So, which files are enough to break it? I have a copy of a default website that Plesk generates when a new website is created. It has a few test files, a few directories. Precisely this small set of files, when copied into the File Share, is enough to generate the above mentioned errors. Also, copying a different set of web files, from another app, also has the same result.

"the site is down for maintenance." ??? that is what plesk is saying.
 
@Sam12,

I have the feeling that the processes behind the file sharing are using up memory after some time.

Furthermore, I am a little bit surprised by the portscan, since I am not seeing the SMB ports. But that does not bother, we can ignore that for the time being.

Note that the error notification is not really relevant, it is just a text provided in case of a specific error (i.e. the text can be anything, at least in theory). In short, let´s ignore this.

However, I miss some information:

- type of machines and their capacities (memory, backbone etc) used on both ends,
- is the file share present on a server, that is not managed by you? (i.e. is the file share/disk space consumed from an external service provider)

Can you give a (short) answer?

I will return to the issue, as soon as possible.

Kind regards....
 
>> - type of machines and their capacities (memory, backbone etc) used on both ends,

Testing on Amazon. server machines AWS c1.medium and t1.micro. client machine AWS t1.micro.
c1.medium has 1.7GB memory, t1.micro has .6GB memory
There was a problem with memory on the t1.micro server, yes. I have switched all the testing to the c1.medium. The problem is still present there.
There are actually two "clients". One is a t1.micro which I have mounted a webdav drive. The other "client" is just a chrome browser on a windows workstation, with the Plesk admin panel GUI, which allows upload/download of files, and it is there where the real error is occurring. Forget about the linux client. It is working fine. The only error is in the browser. The only problem is in the browser.

>> is the file share present on a server, that is not managed by you? (i.e. is the file share/disk space consumed from an external service provider)

It is managed by me. there is no external service provider. well, besides Amazon.

>> I have the feeling that the processes behind the file sharing are using up memory after some time.

checked memory before and after adding some files. the memory on the server, the c1.medium, is ok.

>> Furthermore, I am a little bit surprised by the portscan, since I am not seeing the SMB ports. But that does not bother, we can ignore that for the time being.

I have not installed or configured SMB, and perhaps it isn't even there. This is a webdav fileshare over port 80 or port 443. "File Sharing" panel in Plesk.

>> Note that the error notification is not really relevant, it is just a text provided in case of a specific error (i.e. the text can be anything, at least in theory). In short, let´s ignore this.

We can ignore this, although I am tempted to not ignore it, and rather to see where in the code that error message is originating from.
 
@Sam1

Thanks! I do like the short, to-the-point reaction.

Testing on Amazon. server machines AWS c1.medium and t1.micro. client machine AWS t1.micro.
c1.medium has 1.7GB memory, t1.micro has .6GB memory
There was a problem with memory on the t1.micro server, yes. I have switched all the testing to the c1.medium. The problem is still present there.
There are actually two "clients". One is a t1.micro which I have mounted a webdav drive. The other "client" is just a chrome browser on a windows workstation, with the Plesk admin panel GUI, which allows upload/download of files, and it is there where the real error is occurring. Forget about the linux client. It is working fine. The only error is in the browser. The only problem is in the browser.

What do you mean with "it is there where the real error is occurring"? I suppose that you are stating that something goes wrong in the Plesk GUI.

Note that a c1.medium with file sharing and Plesk is still a little bit on the small side, but it should suffice.

It can be the case that the following commands can help:

/usr/local/psa/admin/sbin/file-sharing --sync
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

If this does not help, can you give a more elaborate description (or screenshot) of the issues with the browser?

In the meantime, I will create a server with a similar setup as yours.

It is managed by me. there is no external service provider. well, besides Amazon.

This is bad luck: of all places, I do not have a free possibility (i.e. enough possibilities) to test on Amazon, otherwise I would replicate the exact situation and error(s).

checked memory before and after adding some files. the memory on the server, the c1.medium, is ok

Please check for double processes (before running before mentioned commands), to exclude the possibility that earlier errors are not enabling us to isolate the issue.

I have not installed or configured SMB, and perhaps it isn't even there. This is a webdav fileshare over port 80 or port 443. "File Sharing" panel in Plesk.

Should be correct, thanks for the (confirming) information.

Kind regards....
 
output from the top command:
KiB Mem: 1731580 total, 651596 used,
so, there is memory.

>> It can be the case that the following commands can help:
>> /usr/local/psa/admin/sbin/file-sharing --sync
>> /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

did not help.

>> If this does not help, can you give a more elaborate description (or screenshot) of the issues with the browser?

see attached files.

>> What do you mean with "it is there where the real error is occurring"? I suppose that you are stating that something goes wrong in the Plesk GUI.

yes, in the Plesk GUI. not with mounting the filesystem (at least on linux).

When first going to the File Sharing panel, it's ok, and even the Upload button is ok.
Then, drill down into the directories, and eventually the errors appear. After that, the Upload button is also broken.
 

Attachments

  • filesharing.jpg
    filesharing.jpg
    161.5 KB · Views: 11
  • filesharing2.jpg
    filesharing2.jpg
    69.3 KB · Views: 10
@Sam12,

As far as I can see by now, it is a memory related problem, but I am still not sure what causes that problem.

In general, adding file sharing to Plesk will result an extensive usage of memory (i.e. more than appropriate).

It is rather difficult to isolate the issue, since memory related settings are everywhere on the Plesk server.

I will report back, thanks for the additional information!

Kind regards....
 
>> As far as I can see by now, it is a memory related problem, but I am still not sure what causes that problem.

It should not be memory related now, with this output from top: "KiB Mem: 1731580 total, 651596 used," There is 1GB of memory free and available on the server now. It's not maxing out with memory.

>> I will report back, thanks for the additional information!

Ok. Thanks for your assistance.
 
@Sam12,

Finally some breakthroughs, it seems to me that you are very likely to have a number of issues, depending on the OS you are using. Please give me full information about the OS!

First of all, if you have Ubuntu 14.04 LTS, the issue is primarily related to

a) a broken installation of the file sharing module (in this case, just use the command line autoinstaller to remove and, afterwards, reinstall the module), OR

b) an activated Web application firewall (WAF) on the webdav domain (in this case, go to domain > "Websites & Domains" (tab) > "Web Application Firewall" and select "Detection only" option. If that does not help, something is completely wrong. Note that it is not "good practice" to have the "Detection only" option checked, it should give you information about the security rule IDs that can be switched off in a later stage, at which the WAF has to be activated again, with exclusion of some security rule IDs).

Second, if you have a CentOS server, the issue can be related to

c) the problem as mentioned in point a),

d) the problem(s) as mentioned in point b),

d) the DavLockDB settings, i.e. access to either the DavLock database itself or the directories in which the DavLock database is residing,

e) a whole lot of other access related issues.

In general, I am pretty sure that the issue with the listing of folders and files is (or can) be related to WAF settings. Can you try the solution, mentioned in b) and report back?

I do not have a good solution (yet) for the "CentOS DavLockDB issue", but I will have a go (again).

Kind regards....
 
Hi trialotto,

It is Ubuntu 14.04 LTS.
Web application firewall (WAF) is not installed. Going to "Add/Remove Components" in the admin panel, it shows "ModSecurity Web Application Firewall for Apache" with a red X.

>> a) a broken installation of the file sharing module (in this case, just use the command line autoinstaller to remove and, afterwards, reinstall the module), OR
what is the command?

Thanks.
 
@Sam12,

Log in with SSH and

- cd to /opt/psa/admin/sbin
- run command ./autoinstaller

and that is all.

But before doing the above, do the following

- check the presence of /opt/psa/admin/conf/file-sharing.conf (and contents thereof) and
- the values of /opt/psa/admin/conf/php.ini (if desired, set the memory_limit variable to a higher value, in order to exclude memory outages)
- check the existence of /tmp/DavLock (and appropriate ownership and permissions)
- restart apache
- try to do an upload (if it fails, do steps below)
- configure webdav to be hosted on another domain (Tools & Settings > File Sharing Setting : select different domain from "Web Folder root URL" drop-down)
- try to do an upload again (some patience is required, wait 1 or 2 minutes after changing the file sharing settings)

Note that you can also start a conversation with me, maybe that works more direct (and faster).

Kind regards....
 
Hello trialotto,
That did not solve the problem.
To reproduce this, try:
- create a web domain on plesk, such as www.example2.com. This is to generate a set of generic files which will be used in the next step.
- copy those new files into the fileshare like this: cp -rp /var/www/vhosts/ip-1-2-3-4/www.example2.com /var/www/vhosts/fs/shared/
- In the Plesk admin panel, navigate to File Sharing -> Shared Files, and then drill down into the list of new files as far as you can go.

any error?

Thanks,
Sam
 
@Sam12,

That would not reproduce any error on my (Ubuntu and CentOS) test servers. I have tested that already.

From the tests, I can conclude safely that there is some issue when changing file sharing settings, with this issue often (but not always) unrelated to standard webdav errors, hence implying that there are some conflicts and/or conflicting parameters within out-of-the-box Plesk settings.

However, your issue is twofold: (on the one hand) an issue with the Panel (GUI) and (on the other hand) a more general issue (see above).

I am still investigating the matter and, due to a lack of time, it cannot be expected that a final solution is available on short term.

I suggest that we take our discussion (and primarily your valuable feedback) to a (private) conversation, can you agree?

Kind regards....
 
>> I suggest that we take our discussion (and primarily your valuable feedback) to a (private) conversation, can you agree?

yes that is fine, no problem, send a private message.
 
Back
Top