INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Docker access issue  (Read 1201 times)

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 947
Docker access issue
« on: December 28, 2020, 09:03:44 pm »

I am running MC27 in docker (shiomax image) on my Synology DS 1819+ and use the same library with my iMac MC27 installation. I experienced recently that when the container is running then the iMac MC27 can only access the library in read-only mode. If I stop the container the iMac MC27 can access the library r/w. Similarly, when the iMac 27 is open and the container is stopped, when I then restart the container the web UI tells me that the library can only be accessed read-only.
This wasn't the case until recently. I believe, but am not sure, that the trigger for this behavior was that I modified the library in the docker webUI.
Is there a way I can get to a point again where I can access the library from my iMac without stopping the container?
EDIT: I have mapped both the docker folder and the music (media) folder onto my iMac using NFS.
many thanks for any help

Hans
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (33.0.37 64 bit): 2784
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (33.0.41 64 bit): 3826
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sequoia 15.1.1 | JRMark (33.0.41 64 bit): 9056
Docker Container (shiomax) DS1819+ | JRMark (33.0.37 64 bit): 1431
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Docker access issue
« Reply #1 on: December 29, 2020, 10:32:01 am »

Do you mean that you're pointing two instances of MC to the same library database files?  Or that the two systems are in a client-server relationship sharing the same media files?

If you mean the first option (that you're pointing both instances to the exact same library database files), MC has never supported multiple instances of MC sharing the same library database files.  Normally the second MC instance to open throws an error box explaining that the library is read-only, but if the docker image is running with the /MediaServer flag it may be suppressing that error so you might not have seen it in the interface if the docker image was the second instance to start.  But whether the error appeared or not, the second MC instance to start in that kind setup will always be read-only because the MC library database is not intended to have two instances editing it at the same time.  This has been the behavior for years as far as I know.

The supported way to share a library with read-write privileges between two instances is to have one be a library server and the other a library client and then to enable authentication.  If you docker instance is on your NAS it might make sense to make it the server (assuming your NAS is usually on).
Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 947
Re: Docker access issue
« Reply #2 on: December 29, 2020, 12:31:13 pm »

Do you mean that you're pointing two instances of MC to the same library database files?  Or that the two systems are in a client-server relationship sharing the same media files?

If you mean the first option (that you're pointing both instances to the exact same library database files), MC has never supported multiple instances of MC sharing the same library database files.  Normally the second MC instance to open throws an error box explaining that the library is read-only, but if the docker image is running with the /MediaServer flag it may be suppressing that error so you might not have seen it in the interface if the docker image was the second instance to start.  But whether the error appeared or not, the second MC instance to start in that kind setup will always be read-only because the MC library database is not intended to have two instances editing it at the same time.  This has been the behavior for years as far as I know.

The supported way to share a library with read-write privileges between two instances is to have one be a library server and the other a library client and then to enable authentication.  If you docker instance is on your NAS it might make sense to make it the server (assuming your NAS is usually on).

Thanks for your help
That's interesting. I have used the same library for both the Mac and the docker MC for quite a while and never had an issue. I am mainly updating the library from the Mac and using the docker MC as a server to access the library remotely (JRemote).
I would like to have the NAS/docker MC as the server and the Mac as a client. Being rather green on this I don't know how to set up the Mac MC as a client. How do I do this?
many thanks
Hans
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (33.0.37 64 bit): 2784
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (33.0.41 64 bit): 3826
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sequoia 15.1.1 | JRMark (33.0.41 64 bit): 9056
Docker Container (shiomax) DS1819+ | JRMark (33.0.37 64 bit): 1431
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Docker access issue
« Reply #3 on: December 29, 2020, 01:25:16 pm »

Open MC on the Mac, then go to File-->Library-->Library Manager.  Once you've opened library manager, you should see an option to "add library."  You can click that button and then enter the information from your docker instance in the popup.  Now the Mac MC instance will be a client of the Docker instance.  In order to be able to make changes on the Mac, though, you will need to make sure authentication is enabled on the Docker instance, and enter the username and password on the Mac client. 
Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 947
Re: Docker access issue
« Reply #4 on: December 29, 2020, 02:27:22 pm »

Open MC on the Mac, then go to File-->Library-->Library Manager.  Once you've opened library manager, you should see an option to "add library."  You can click that button and then enter the information from your docker instance in the popup.  Now the Mac MC instance will be a client of the Docker instance.  In order to be able to make changes on the Mac, though, you will need to make sure authentication is enabled on the Docker instance, and enter the username and password on the Mac client.
Thank you
I'll give this a go. Will have to figure out how to enable authentication. I suppose I'll have to modify my docker-compose file?  This is what I have now:

Code: [Select]
version: '3'
services:
  jrivermc27:
    image: shiomax/jrivermc27
    restart: always
    container_name: jrivermc27
    network_mode: host
    environment:
      - VNC_PASSWORD=___________
      - USER_ID-1026
      - GROUP_ID=101
      - DISPLAY_WIDTH=2560
      - DISPLAY_HEIGHT=1440
      - TZ=America/New_York
    volumes:
      - /volume1/docker/MC27/config:/config:rw
      - /volume1/music:/data/music:rw
      - /volume1/docker/MC27/data/Library:/data/Library:rw
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (33.0.37 64 bit): 2784
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (33.0.41 64 bit): 3826
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sequoia 15.1.1 | JRMark (33.0.41 64 bit): 9056
Docker Container (shiomax) DS1819+ | JRMark (33.0.37 64 bit): 1431
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Docker access issue
« Reply #5 on: December 29, 2020, 05:02:38 pm »

Thank you
I'll give this a go. Will have to figure out how to enable authentication. I suppose I'll have to modify my docker-compose file?  This is what I have now:

You need to change it in the GUI I think by VNCing into the docker image, I'm not sure there's any way to enable or disable it via the command line. 
Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 947
Re: Docker access issue
« Reply #6 on: December 29, 2020, 09:57:31 pm »

Thank you, I'll investigate
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (33.0.37 64 bit): 2784
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (33.0.41 64 bit): 3826
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sequoia 15.1.1 | JRMark (33.0.41 64 bit): 9056
Docker Container (shiomax) DS1819+ | JRMark (33.0.37 64 bit): 1431
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro

max096

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 363
Re: Docker access issue
« Reply #7 on: December 30, 2020, 03:36:18 pm »

Thank you
I'll give this a go. Will have to figure out how to enable authentication. I suppose I'll have to modify my docker-compose file?  This is what I have now:

Code: [Select]
version: '3'
services:
  jrivermc27:
    image: shiomax/jrivermc27
    restart: always
    container_name: jrivermc27
    network_mode: host
    environment:
      - VNC_PASSWORD=___________
      - USER_ID-1026
      - GROUP_ID=101
      - DISPLAY_WIDTH=2560
      - DISPLAY_HEIGHT=1440
      - TZ=America/New_York
    volumes:
      - /volume1/docker/MC27/config:/config:rw
      - /volume1/music:/data/music:rw
      - /volume1/docker/MC27/data/Library:/data/Library:rw

The password you put into the compose file is just for the vnc / novnc access to get to the UI. It has nothing to do with MC itself. You can setup username/password authentication in MC (Tools > Options > Media Network > Authentication). That youŽd do on the server. Then you need those to connect to it from other MC instances.
Logged

HaWi

  • Citizen of the Universe
  • *****
  • Posts: 947
Re: Docker access issue
« Reply #8 on: December 30, 2020, 07:38:41 pm »

Yes, that's it. Thank you so much!
Logged
rPi5/8GB, Debian 12 Bookworm on SSD | JRMark (33.0.37 64 bit): 2784
MacBookPro (2013), 2.6 GHz Quad-Core Intel Core i7, MacOS 11.7.17 | JRMark (33.0.41 64 bit): 3826
Mac Studio M2 Max, 64GB, 1TB SSD, macOS Sequoia 15.1.1 | JRMark (33.0.41 64 bit): 9056
Docker Container (shiomax) DS1819+ | JRMark (33.0.37 64 bit): 1431
JRemote 3.43
MO 4Media 1.5.7 | Marantz SR7007 (RSL 5.1) HDMI to MacBookPro
Pages: [1]   Go Up