Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
Old 04-02-2025, 01:34 PM   #1
mitrian
Junior Member
mitrian began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2025
Device: iPad/iPhone
Errno 98 when starting content server from Web UI

I'm running Calibre in docker on an ubuntu server, using docker-compose.yml to define the container. I maintain two libraries ("fiction" and "non-fiction"). The Web UI works great, however, I get an error when I try to start the content server from the "Connect/Share" button in the UI:

Code:
"Could not start the Content server.  Error: No socket could be created -- (('172.20.0.6',8080): [Errno 98] Address already in use)"
Why would it try to bind to the same internal port that the Web UI is already using? Regardless, I configured the content server to use internal port 8083, not port 8080. Here is my yml:
Code:
  calibre:
    image: linuxserver/calibre
    container_name: calibre
    environment:
      - PUID=1000
      - PGID=1000
      - CONTENT_SERVER_PORT=8083
    volumes:
      - /home/mitrian/docker/calibre:/config
      - /home/mitrian/docker/calibre/fiction:/fiction
      - /home/mitrian/docker/calibre/non-fiction:/non-fiction
    ports:
      - "8088:8080"  # Calibre Web UI
      - "8090:8083"  # Content Server
    restart: unless-stopped
I can resolve the problem by adding the following line to docker-compose.yml:

Code:
command: calibre-server --port=8083 /config/fiction  # Start content server on 8083
This is nice because it starts ODPS automatically when the container loads. However, it is library specific, meaning, I have to specify in the command which library to start the server for. This is mostly acceptable, except that the button in the UI doesn't stop the content server, and if I want to start the content server for "non-fiction", I have to modify the yaml and restart the container, which is cumbersome, especially if I'm remote (which is most of the time).

I could create separate containers, one for each library, to resolve this, but I'd like to figure out how to get the service working as intended, if possible. And I'd prefer it all be self-contained in a single container, as I also use calibre-web-automation and plan to add plug-ins and I don't want to duplicate all of that.

I've tried putting the Web UI on port 8083 instead, and a variety of other port configurations, but I still always get the same exact error above. Even if I put neither service on 8080, it seems to try and bind OPDS to 8080. Is that expected behavior?

My question is how to get the Web UI button to work to start/stop the content server, based on whichever library I have active at the time. And why it seems to force using port 8080 when that's already in use by the Web UI, and I've configured OPDS to be otherwise.
mitrian is offline   Reply With Quote
Old 04-02-2025, 09:54 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,337
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
What web UI? The content server is the web UI for calibre. And you can configure the port it uses in Preferences->Sharing over the net.

And running calibre-server without any library arguments will serve all libraries calibre knows about as noted in its --help output.

On a side note, I strongly recommend getting rid of docker, it will just complicate your life for no actual benefit.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-03-2025, 08:50 PM   #3
mitrian
Junior Member
mitrian began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2025
Device: iPad/iPhone
Thanks for the response, Kovid!

Preferences-->Sharing port configuration solved everything in this case, by the way, THANK YOU for that. I feel super dumb for not checking that before... sheesh.

I'm not opposed to dropping Docker -- I mostly like it for its code-driven deployment/implementation, but maybe it's not worth it?

The content server I'm referring to is what I use for OPDS access to my eReader app, accessible through the Connect/Share button.

Anyway, problem solved. Thank you again!
mitrian is offline   Reply With Quote
Reply

Tags
content server, docker, port, ubuntu 24.04


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What web server software is used for Calibre content server? hollowpoint Server 2 06-02-2021 05:23 PM
Content Server - Web jojovee Development 2 08-16-2017 02:56 PM
Calibre Content Server in El Capitan not starting OK perezbalen Devices 2 07-18-2016 02:16 PM
Web Content Server mezme Calibre 7 01-08-2010 09:59 PM
Starting content server throws an error 55 valiant66 Calibre 4 06-09-2009 10:40 AM


All times are GMT -4. The time now is 09:55 PM.


MobileRead.com is a privately owned, operated and funded community.