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

Can not use update functionality in docker container. #484

Closed
abubaman opened this issue Apr 5, 2018 · 19 comments
Closed

Can not use update functionality in docker container. #484

abubaman opened this issue Apr 5, 2018 · 19 comments
Labels

Comments

@abubaman
Copy link

abubaman commented Apr 5, 2018

I use Docker in Synology NAS. and it works well.
But when I try to update in administrator page, I didn't work.

is there any problem of update functionality in docker edition?

@gelsas
Copy link

gelsas commented Apr 5, 2018

For me it is working fine but i am using a QNAP NAS, check the logs if there is any error when pressing the update button.

@Johni81
Copy link

Johni81 commented Apr 5, 2018

For me its working on the Synology NAS, press the update button once for checking for updates and the second time for updating.

@Technosoft2000
Copy link

For me its working on the Synology NAS too (DS415+).

I've pressed the button to search for an update and one was found.
Then the button text was changed to execute/install the update and I've pressed the button again.
After the update the application restarts and it took a little bit until the application is available again.

@abubaman please check your logs and post the output here, otherwise it's not possible to detect why it's not working in your docker container.

@abubaman
Copy link
Author

abubaman commented Apr 5, 2018

could you let me know the location of log file?
I looked into ./opt/app/calibre-web.log but I think it seems okay. but this was the log file I need to check. I will copy and paste the content of that log file.

and in my case, when I click once update button, it finds new version. and I click once again, it seems perform update(it showed downloading, replacing the files). but when I reload that page, it showed me old version again. and if I try to update again, it perform same procedure again and again and again.

@benkirton
Copy link

I have the same issue on a Synology NAS as abubaman. Says it updates but a page refresh just shows the old commit date and then restarting the docker causes a 502 bad gateway error.

@Technosoft2000
Copy link

... restarting the docker causes a 502 bad gateway error.

This 502 bad gateway error appears only while the docker container restarts, so please be patient and wait a little bit - afterwards when it is up & running again and you refresh the site again you'll see that the commit date is the actual one :)

@benkirton
Copy link

so please be patient and wait a little bit

Is there an upper bound on this? It's been up 21 minutes since restart and still nothing but 502.

@Technosoft2000
Copy link

21 minutes is of course too long ... it takes here less than a minute ... for me it's sounds that your container wasn't started/created with the option --restart=always
so in your case when Calibre-Web gets stopped inside the container and the container shuts down and doesn't start again

@benkirton
Copy link

benkirton commented Apr 23, 2018

I thought restart=always was a setting external to the container and just meant if the whole thing got shut down, it started it up again, not related to an internal process not starting?
I have enabled the option and there is no change in behaviour.
I create the container in the GUI on the Synology and only set the drive mappings and ports and leave all else default. Other than that, there is nothing interesting happening on my system I am aware of.

I see another issue detailed in here that relates to the update files not being writable by the update process. As the docker is delivered as an older version, could that issue still be present, and the web server doesn't have access to the site files? It's issue #488

@Technosoft2000
Copy link

I thought restart=always was a setting external to the container and just meant if the whole thing got shut down, it started it up again ...

correct, when the container stops than the docker daemon starts the related container again

... not related to an internal process not starting?

the internal process gets stopped through the update and therefore the container stops too

I create the container in the GUI on the Synology ...

okay I've never used the Synology Docker GUI to create a new container, I've done this always over SSH at the terminal - I'll do some tests with the GUI too

As the docker is delivered as an older version ...

The container downloads via git the latest version of Calibre-Web while startup of the container, also stopping and starting the container will update inside the Calibre-Web version (but not the Docker Image itself) , but maybe your Docker Image is not the latest and you've to upgrade to the latest version (actual version is 2018-04-14 - v1.1.11). At the logs of the container you get detailed information which version you've in use at the moment.

The best in such a case would be always that a related log output whould be provided.

At terminal via docker logs -f calibre-web or look into the Synology Docker GUI

@benkirton
Copy link

benkirton commented Apr 26, 2018

I feel we are discussing different things.
I am using the janeczku/calibre-web docker image as it works without 17 workarounds and also includes https support. Are you referring to your own docker image technosoft2000/calibre-web as none of the things you detail seem to happen with my setup. There does not seem to be an auto update process as best I can tell.

Here are the only logs I can get for the upgrade itself when setting the calibre-web logs to DEBUG in the web interface:
It still always says:
Current commit timestamp: 2017-07-08T16:47:07+02:00
Newest commit timestamp: 2018-04-13T19:16:37Z
When I hit check for update and then a container restart ends in a 502, even with auto restart enabled.

useless logs
*snip
/useless logs

@OzzieIsaacs
Copy link
Collaborator

From the readme of the docker you are using:

This image has been deprecated. Please see here for links to alternative Docker images for Calibre Web.

@benkirton
Copy link

Damn. Right at the top and everything. I completely missed it.

The multiple workarounds needed to run the others and the lack of HTTPS support do make it painful to move to the others, but I guess I don't have a choice.

@benkirton
Copy link

Ok, I take it back. Everything worked in the Technosoft2000/calibre-web docker this time but obviously with no HTTPS.
Thanks for all the help, even though I had it wrong from the beginning.

@Technosoft2000
Copy link

Ok I'll check what is needed to directly support HTTPS at the container and will enhance it if possible.

For info only:
I use my Synology NAS as Reverse-Proxy with a Let's Encrypt SSL Certificate to have from internet access only via HTTPS and inside my home network I've also access directly via HTTP.

@benkirton
Copy link

Well I am just getting called out on the gaps in my knowledge.
I have just looked for and found the reverse proxy on the Synology you mentioned and it was so easy to set up and use the LE certificate already running on the NAS that I'm embarrassed I didn't know about it already.

Being able to use a legitimate certificate this easily means I would rather this set up than the calibre-web server using a self signed one, or needing to maintain a certificate separately.

@OzzieIsaacs
Copy link
Collaborator

Is the problem now solved?

@benkirton
Copy link

All of my issues are now fully resolved.
I am not sure about the original poster.

@OzzieIsaacs
Copy link
Collaborator

No feedback for long time

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

No branches or pull requests

6 participants