INTERACT FORUM

Please login or register.

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

Author Topic: Cannot access media server with local IP:port URL - database read-only  (Read 427 times)

madbrain

  • Galactic Citizen
  • ****
  • Posts: 321

I have a Media server running on a Windows 11 host, which has a DHCP reservation of 192.168.100.44 . The library is shared on the default port of 52199 . Authentication is enabled for both read-only and read-write.

On another Win11 host, I reinstalled MC31 - all config entries deleted, except for licensing.
The first thing I did after installation was to try to connect to the local library server on the LAN.

I used a URL of http://192.168.100.144:52199 .

However, I got a pop-up saying : "Database read-only . This database will be opened in read-only mode. Any changes will be lost when the program exits". See the first screenshot.

My expectation would have been to get prompted for the username & password to login to the library server, but that prompt never came.

After I dismissed the pop-up by clicking OK, MC claimed to be connected to the server, but actually showed a completely empty library. See the second screenshot.

I deleted this library from MC, since it was not working.

I then tried to add the library server again, this time using its access key, rather than the URL.
This time, I got prompted for the username and password, as I expected. The pop-up actually asks to "please enter the credentials for '192.168.100.144:52199'", which is the same as the local URL I entered before. After typing in credentials, I was then able to access the library server's content successfully.

Why can I only access the server while using the access key, but not the URL ?

I would like my MC client to be resilient to Internet outages, and work without the access key. Even if Internet is up, it takes longer to resolve the access key, and I don't want to use it.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2789
Re: Cannot access media server with local IP:port URL - database read-only
« Reply #1 on: February 06, 2025, 02:11:05 pm »

Try without the http:// prefix, just 192.168.100.144:52199.

MC first tries to connect as Guest (read-only), and if it succeeds it doesn't ask for any user/pass - that's not so good. To force it to ask, maybe try changing the guest username/password on the server.
Logged

madbrain

  • Galactic Citizen
  • ****
  • Posts: 321
Re: Cannot access media server with local IP:port URL - database read-only
« Reply #2 on: February 06, 2025, 04:38:38 pm »

Try without the http:// prefix, just 192.168.100.144:52199.

MC first tries to connect as Guest (read-only), and if it succeeds it doesn't ask for any user/pass - that's not so good. To force it to ask, maybe try changing the guest username/password on the server.

Thanks. Dropping the http:// prefix worked !

I'm an engineer, and I have been working with and implementing HTTP and HTTPS servers for nearly 3 decades. The definition of a URL includes a protocol scheme. It isn't a complete URL without one. Since MC server optionally supports SSL, I thought the scheme would be required. But apparently, MC server uses a separate port for SSL, instead, with a checkbox to use SSL on the client.

To be fair, the example in small print does show a "URL" omitting the protocol scheme as an example. But it is slightly too small on my 4K screen, and with my maculopathy, my brain has a tendency to just skip and ignore anything that is too hard to read, so I failed to see the example.

My suggestion would be to update the wording and GUI a little bit. Since complete URLs are never actually used, the word "URL" just should not appear in the GUI. When not using an access key, MC could show 3 fields :

1) one for the IP address or hostname (currently part of the so-called "URL" field)
2) one for the port (currently part of the so-called "URL" field)
3) one for the SSL checkbox (already there)

2 and 3 mirror the settings that are already there for the server side in Tools -> Options -> Media network -> Advanced, so this would be more consistent between client and server.

1 doesn't have a server-side equivalent. It could, but there is probably no need to bind the MC library server to a specific IP address.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2789
Re: Cannot access media server with local IP:port URL - database read-only
« Reply #3 on: February 06, 2025, 05:21:44 pm »

Fair. MC could just parse or ignore the http:// prefix, as the protocol is really REST over http/https.

You can set the UI size on the View->Size menu, or just increase the zoom level on Windows itself.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72735
  • Where did I put my teeth?
Re: Cannot access media server with local IP:port URL - database read-only
« Reply #4 on: February 07, 2025, 02:27:00 am »

madbrain, you make some valid points.  We'll take a look.

I went looking for a definition of URL and ended up reading this RFC:
https://datatracker.ietf.org/doc/html/rfc1738

I got about half way through before I dozed off.

There are schemes allowed other than http and https.  ftp and telnet, for example.  But I didn't find whether a scheme was required.

For localhost, under file: I found this though.

As a special case, <host> can be the string "localhost" or the empty
   string; this is interpreted as `the machine from which the URL is
   being interpreted'.


And, you know, it's the Internet, and we can make stuff up.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4321
Re: Cannot access media server with local IP:port URL - database read-only
« Reply #5 on: February 07, 2025, 02:50:44 am »

https://datatracker.ietf.org/doc/html/rfc1738#section-2.1 says that scheme is required, the full specification is linked from there
Logged
Pages: [1]   Go Up