mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
WebDAV: Service can't be configured to connect on a non-standard port #1835
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#1835
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @eculicny on GitHub (Jul 27, 2023).
Originally assigned to: @lastzero on GitHub.
It seems that photoprism doesn't support the case when a port is specified when setting up a WebDAV service connection.
Environment: Docker
Photoprism version:
230719-73fa7bbe8-Linux-AMD64-PlusDocker host is physically separate from a TrusNAS WebDAV host
The recommended curl command works as expected from inside the docker container and prints the XML for the directory and the items within it.
curl -X PROPFIND -H "Depth: 1" -u <user>:<pwd> http://<ip>:<port>/photosimport/When setting up this connection in the UI, the network request to the Photoprism API is returning 400
Could not connect, please try againIf I remove the port in the setup form,
http://<ip>/photosimport/, the service is added successfully, although it obviously doesn't actually work since that is the wrong port.Original discussion
(edit: fixed link markdown)
@eculicny commented on GitHub (Jul 27, 2023):
One additional piece I noticed while testing, the IP address used does need to be accessible in some way, which I assume is verifying that a response is returned from the default 80/443 port. In my case, there is a web server running on the server that responds to requests on port 80, which is why I assume it was able to be saved.
http://192.168.0.100:8080/photosimport/- returns the "Could not connect" popup messagehttp://192.168.0.100/photosimport/- saves the connection successfullyhttp://192.168.0.123/photosimport/- returns the "Could not connect" popup message, there isn't any host with that local IP address@lastzero commented on GitHub (Aug 15, 2023):
@eculicny I could not reproduce this, unfortunately. Using port 8080 worked perfectly after I configured the firewall to allow connections from the local network via port 8080.
At first, I could not connect to my host over the internal Docker network, also not with curl from inside our dev Docker container:
However, once the firewall was properly configured, it worked with both curl and PhotoPrism:
Uploading files worked as well after the service was added:
I see you are also using an address from your local network, possibly the same host that Docker is running on. So it might also be a problem with the firewall or another network related issue?
I don't know what else I could try to reproduce this...
Screenshots
Add Account Dialog
Account Successfully Added
Edit Account Dialog
@lastzero commented on GitHub (Aug 15, 2023):
There is a tiny chance that it is a bug in the Go programming language. It has been updated recently, so I tested it with the latest version, while our stable versions use an older Go version. However, it's unlikely that such a basic feature is broken or that Google wouldn't have found and fixed such a major bug long ago.
@eculicny commented on GitHub (Aug 16, 2023):
@lastzero Thanks for taking a look and trying to reproduce it!
They are both on the same local network, but the NAS host is a physically separate machine from the host running Docker. The addresses listed are just examples and not actual; my local network is mostly in
10.10.0.0/16which is where both of these hosts are. I just went with defaults for the examples since I didn't think the actual IP values might be an issue here.It could be something I missed with the networking. However, the fact that running the
curlcommand from within the running Photoprism container properly connects to and gets the expected response from the NAS host made me think that it's something happening within the Photoprism application when setting up the service connection.I'll take another look and see if updating to latest from my current version seems to fix the issue or provides any more useful info.
@eculicny commented on GitHub (Aug 20, 2023):
Yeah, seems to still be resulting in the same problem with the
previewamd64 image available on docker hub. However, I think this might be some problem(s) with how TrueNAS is configuring the webdav share (or some weird networking problem I haven't noticed yet)From inside the running container
In the UI:

If I remove the authentication on the webdav share, I can save the connection in the Photoprism UI

However, I can't seem to get any of the upload or syncing functionality to work. The generic "Could not connect, please try again" popup comes up each time I go to configure one or the other and neither seem to work.
So my guess as to what is happening is that when authentication is setup for the webdav share, the initial test for it fails, and photoprism doesn't save the service config. When auth isn't present, it can save the service, but if the service isn't configured properly, then trying to configure it in Photoprism fails. And the initial troubleshooting I was doing seemed to lead us down the wrong path since all other non-photoprism testing seemed to indicate the webdav share was working as expected.
I'll keep trying to sort this issue out, but it seems less likely that Photoprism is the culprit and more likely that TrueNAS is setting up the share in an incompatible way which was triggering when authentication was enabled. I don't see a reason to keep this issue open as an actual problem since the initial issue seems to work correctly.