YunoHost-Apps / seafile_ynh

Seafile package for YunoHost
https://seafile.com
MIT License
14 stars 19 forks source link

installation failed #45

Closed thomas-lemaire closed 3 years ago

thomas-lemaire commented 5 years ago

From the yunohost admin web interface, I went to application>add>Seafile. The installation failed with the given log:

https://paste.yunohost.org/raw/zehemogiri

I have a fairly up-to-date yunohost installation (RPi3)

Josue-T commented 5 years ago

It look like that you have a memory error. Can you check that you have enough free memory with free -h ?

thomas-lemaire commented 5 years ago

How much should I have ?

Josue-T commented 5 years ago

Well, don't know exacly. Did you setup any swap ?

thomas-lemaire commented 5 years ago

I have 1Go RAM plus 100Mo swap (I guess it is the default yunohost installation), in normal usage I have 303/926Mo used (htop)

sant-sh commented 5 years ago

I am too getting this error and installation is falling from both GUI and CLI with below error.

Warning: Please find here an extract of the log before the crash:
Warning: [DEBUG]: WARNING -     _download_url(resp, link, content_file, hashes)
Warning: [DEBUG]: WARNING -   File "/usr/lib/python2.7/dist-packages/pip/download.py", line 603, in _download_url
Warning: [DEBUG]: WARNING -     hashes.check_against_chunks(downloaded_chunks)
Warning: [DEBUG]: WARNING -   File "/usr/lib/python2.7/dist-packages/pip/utils/hashes.py", line 46, in check_against_chunks
Warning: [DEBUG]: WARNING -     for chunk in chunks:
Warning: [DEBUG]: WARNING -   File "/usr/lib/python2.7/dist-packages/pip/download.py", line 571, in written_chunks
Warning: [DEBUG]: WARNING -     for chunk in chunks:
Warning: [DEBUG]: WARNING -   File "/usr/lib/python2.7/dist-packages/pip/utils/ui.py", line 139, in iter
Warning: [DEBUG]: WARNING -     for x in it:
Warning: [DEBUG]: WARNING -   File "/usr/lib/python2.7/dist-packages/pip/download.py", line 560, in resp_read
Warning: [DEBUG]: WARNING -     decode_content=False):
Warning: [DEBUG]: WARNING -   File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 432, in stream
Warning: [DEBUG]: WARNING -     data = self.read(amt=amt, decode_content=decode_content)
Warning: [DEBUG]: WARNING -   File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 380, in read
Warning: [DEBUG]: WARNING -     data = self._fp.read(amt)
Warning: [DEBUG]: WARNING -   File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 63, in read
Warning: [DEBUG]: WARNING -     self._close()
Warning: [DEBUG]: WARNING -   File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 50, in _close
Warning: [DEBUG]: WARNING -     self.__callback(self.__buf.getvalue())
Warning: [DEBUG]: WARNING -   File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/controller.py", line 275, in cache_response
Warning: [DEBUG]: WARNING -     self.serializer.dumps(request, response, body=body),
Warning: [DEBUG]: WARNING -   File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/serialize.py", line 87, in dumps
Warning: [DEBUG]: WARNING -     ).encode("utf8"),
Warning: [DEBUG]: WARNING - MemoryError
Warning: [DEBUG]: DEBUG   - + ynh_exit_properly
Warning:
Info: The operation 'Install 'seafile' application' has failed! To get help, please share the full log of this operation using the command 'yunohost log display 20190901-130744-app_install-seafile --share'
Warning: Failed to stop seafile-server.service: Unit seafile-server.service not loaded.
sant-sh commented 5 years ago

Here is the full log - https://paste.yunohost.org/raw/pegefodowa

Josue-T commented 5 years ago

Maybe I need to setup more swap at the install... I'll see for this...

HugoPoi commented 4 years ago

@sant-sh I pretty sure you have no space left in your instance ?

I run the install script on a VM with 0 swap and 1GB of mem and it works fine on my side.

sant-sh commented 4 years ago

@HugoPoi Yes, I understand because of memory its falling but on my instance i am just running 4 application from yunohost so just wanted to know if possible, can memory requirement for seafile be less?

HugoPoi commented 4 years ago

I maybe hasn't enough clear, but I think this is not a memory/RAM issue but a disk usage issue, you use a Rpi can you check with df -h how much you have space left on your sdcard.

In your traces logs, the failure occur during downloading a python dependencies, in the chunk_write method.

sant-sh commented 4 years ago

Hard disk space cannot be the the issue in my case as I have more than 20GB space available (having 32 GB of SD card - class 10)

HugoPoi commented 4 years ago

Do you have only one partition ?

I check more precisely the error and we might check the python dependencies install code because the file are maybe downloaded in RAM which is bad.

Josue-T commented 4 years ago

It should be fixed in testing now.

sant-sh commented 4 years ago

@HugoPoi Sorry for the late reply. I haven't done any partition changes, its the same what yunohost does. I have just mounted a drive

image

HugoPoi commented 4 years ago

@sant-sh you can test the testing release with sudo yunohost app install https://github.com/YunoHost-Apps/seafile_ynh/tree/testing --debug

sant-sh commented 4 years ago

@HugoPoi unfortunately it still failed, here is the full log https://paste.yunohost.org/fujasuvudo.bash

sant-sh commented 4 years ago

Currently I am not even running multiple applications (Nextcloud, automatic backup archive)

This would be the generic usage image

HugoPoi commented 4 years ago

Try with SD_CARD_CAN_SWAP=1 yunohost install ...

sant-sh commented 4 years ago

Try with SD_CARD_CAN_SWAP=1 yunohost install ...

https://paste.yunohost.org/xosanugeca.bash

HugoPoi commented 4 years ago

Ok After digging your 2 logs the command that always fail is sudo -u seafile pip install --user --upgrade Pillow 'moviepy<1.0' certifi idna In the first log pip crash with a Memory error In the second log pip crash with TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' indicate I think a bad python installation.

I think the problem from the begining is your python installation has been broken at a certain point.

See https://stackoverflow.com/questions/37495375/python-pip-install-throws-typeerror-unsupported-operand-types-for-retry

You can try reinstalling pip from external source but I think this is not the prettier solution :

apt-get remove python-pip python3-pip
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
python3 get-pip.py
sant-sh commented 4 years ago

@HugoPoi I cannot replace python-pip with bootstrap as I have some dependency scripts but I have re-installed and cleaned up few packages which solved the issue and I was able to get the GUI.

Now the login is working only with mail (not the username - LDAP), is there any known bug?

Thanks for your help!

Also this is only working with testing branch with SD_CARD... command so will it be merged in main branch?

Josue-T commented 4 years ago

Now the login is working only with mail (not the username - LDAP), is there any known bug?

The authentication is throught LDAP even though it's with email. And yes you can't just use a username because seafile authenticate all user with the email. I don't really like this choice but anyway it can do anything about that.

sant-sh commented 4 years ago

Now the login is working only with mail (not the username - LDAP), is there any known bug?

The authentication is throught LDAP even though it's with email. And yes you can't just use a username because seafile authenticate all user with the email. I don't really like this choice but anyway it can do anything about that.

@Josue-T Understood, thanks for the info.

Josue-T commented 3 years ago

I close this issue as there was no more activity. Please create a new issue if you still have some issue.