Trying this forum as I am not getting responses on the Android Player forum.
Camera upload was working perfectly fine until a week or so ago.
I get the message that Plex it is uploading N pictures but in reality it is not uploading.
Can someone from the support team help me with reviewing the logs please?
Solved:
This was not a Plex issue but a permission issue on my side.
If you are using Linux to run your PMS, make sure that the user running Plex has x (execute) permission all the way through the directory tree, up to the folder where you are uploading the pictures, otherwise the user running the Plex service won’t be able to traverse the whole path.
Do you know how to get the app logs?
Would you like to review both the app and the server or only the server logs?
Attaching Server Logs in the meanwhile.
the app logs, would prefer both but because the message is showing on app would like to see why app is not actually uploading
Sure thing Here they are.
Just to let you know that also other android clients I have cannot upload the pictures. Please let me know if I can provide any other info. Thanks.
@BigWheel any chance to check the logs?
I’m also seeing these issues, but didn’t see a reply in my topic.
I am trying to get away from depending on Google Photos for photo backups. I think a lot of people want this feature to work properly because we need a good alternative to Google Photos & company. If we cannot rely on Plex then people will not adopt this feature…
hi apologies for late reply back
you logs indicate that at somepoints camera upload was stopped because either batterery was too low or you have it set to only upload when charging and it stops when you disconnected the charger.
also see indication that the location on your server for which it is trying to upload has no space left. but i am guessing thta is not actually the case. it is trying each photo but failing every time and moving on to next and failing again. is your photo library on the separate drive?
05-26 12:26:05.401 i: [CameraUploader] Uploading file Burst_stack_229849558701644_5.jpg with URL https://192.168.1.250:32400/library/metadata?createdAt=1459045349&filename=2016-03-27%2004.22.29.jpg&locationID=9§ionID=4&type=13&subdirectory=Plex&X-Plex-Token=...yNwC from initial offset 0
05-26 12:26:06.971 w: [CameraUploader] Unexpected return code: 500, bytes available 0, bytes remaining 8221882
Thanks for replying.
The camera upload is set to start only when the phone is charging. You probably see the stop signal cause I disconnect the phone 1h or so after Plex is trying to upload the files.
The camera upload drive is in a different drive than root and the plex installation. The photos are stored in /dev/sde1 and has about 80% free space.
I have also noticed the following errors on the Plex Media Server log file. I do can write files/dir to the Photo Library folder as I have treid with: sudo -u plex 'touch file' and that works fine…
Jun 07, 2017 09:27:00.787 [0x7f7d9d7f9700] DEBUG - Request: [94.234.55.217:9023
(WAN)] POST /library/metadata?createdAt=1494155659&filename=2017-05-07%2013.14.1
9.jpg&locationID=9§ionID=4&type=13&subdirectory=Plex (4 live) TLS GZIP Signe
d-in Token (returntrip)
Jun 07, 2017 09:27:00.930 [0x7f7d9d7f9700] DEBUG - It took 140.000000 ms to retr
ieve 0 items.
Jun 07, 2017 09:27:00.933 [0x7f7dc0fff700] DEBUG - Completed: [94.234.55.217:902
3] 404 POST /library/metadata?createdAt=1494155659&filename=2017-05-07%2013.14.19.jpg&locationID=9§ionID=4&type=13&subdirectory=Plex (4 live) TLS GZIP 146ms 379 bytes (pipelined: 4)
Jun 07, 2017 09:27:01.148 [0x7f7dc07fe700] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
Jun 07, 2017 09:27:01.149 [0x7f7dc07fe700] DEBUG - Auth: authenticated user 1 as returntrip
Jun 07, 2017 09:27:01.149 [0x7f7dc07fe700] DEBUG - Auth: Came in with a super-token, authorization succeeded.
Jun 07, 2017 09:27:01.151 [0x7f7dc07fe700] ERROR - Couldn't check for the existence of file /usr/share/webapps/nextcloud/data/returntrip/files/Pictures: boost::filesystem::status: Permission denied: "/usr/share/webapps/nextcloud/data/returntrip/files/Pictures"
Jun 07, 2017 09:27:01.151 [0x7f7dc07fe700] ERROR - IsDirectory failed boost::filesystem::status: Permission denied: "/usr/share/webapps/nextcloud/data/returntrip/files/Pictures"
Jun 07, 2017 09:27:01.151 [0x7f7dc07fe700] ERROR - Error creating directory /usr/share/webapps/nextcloud/data/returntrip/files/Pictures: boost::filesystem::create_directory: Permission denied: "/usr/share/webapps/nextcloud/data/returntrip/files/Pictures"
@BigWheel said:
hi apologies for late reply back
you logs indicate that at somepoints camera upload was stopped because either batterery was too low or you have it set to only upload when charging and it stops when you disconnected the charger.
also see indication that the location on your server for which it is trying to upload has no space left. but i am guessing thta is not actually the case. it is trying each photo but failing every time and moving on to next and failing again. is your photo library on the separate drive?
05-26 12:26:05.401 i: [CameraUploader] Uploading file Burst_stack_229849558701644_5.jpg with URL https://192.168.1.250:32400/library/metadata?createdAt=1459045349&filename=2016-03-27%2004.22.29.jpg&locationID=9§ionID=4&type=13&subdirectory=Plex&X-Plex-Token=...yNwC from initial offset 0
05-26 12:26:06.971 w: [CameraUploader] Unexpected return code: 500, bytes available 0, bytes remaining 8221882
What is nextcloud? is it a remote network drive/share mounted on your computer with server? I don’t want to say that is the issue but I have never done that so just want to see if that may have anything to do with it.
The local folder /usr/share/webapps/nextcloud/data is mapped to a local drive /dev/sde1. Nextcloud and Plex share the same local drive. Not using any remote mounts etc.
if they are the same would you mind trying to set the library location to /dev/sde1/returntrip/files/Pictures just for the sake of ruling that out.
@BigWheel said:
if they are the same would you mind trying to set the library location to /dev/sde1/returntrip/files/Pictures just for the sake of ruling that out.
in linux you cannot directly access the partition (/dev/sde1is the first partition of the device /dev/sde/) and you must mount the partition to a folder on the linux filesystem.
However, I have created a new library on a different folder and Plex has magically uploaded the remaining 105 photos…
Now I need to understand why Plex does not like anymore the old library/folder…
This does not make any sense… It does not look like an issue with linux FS permissions because the old folder is owned by user plex and it used to work perfectly fine. I even created a test dire in the camera upload folder as user plex…
Is there a Linux expert in your team who could cast an eye on this issue?
I think I am getting closer to the solution. I have inspected the path tree permissions and noticed that the x flag was missing for “other” users on the directory data.
Working tree permissions:
namei -mo /usr/share/webapps/nextcloud/data/returntrip/files/Pictures/Plex
f: /usr/share/webapps/nextcloud/data/returntrip/files/Pictures/Plex
drwxr-xr-x root root /
drwxr-xr-x root root usr
drwxr-xr-x root root share
drwxr-xr-x root root webapps
drwxr-xr-x http http nextcloud
drwxr-xr-x http http data <- Execute flag for other users
is present. Mask is 755
drwxr-xr-x http http returntrip
drwxr-xr-x http http files
drwxr-xr-x http http Pictures
drwxrwxrwx plex plex Plex
Not working permission tree:
namei -mo /usr/share/webapps/nextcloud/data/returntrip/files/Pictures
f: /usr/share/webapps/nextcloud/data/returntrip/files/Pictures
drwxr-xr-x root root /
drwxr-xr-x root root usr
drwxr-xr-x root root share
drwxr-xr-x root root webapps
drwxr-xr-x http http nextcloud
drwxrwx--- http http data <- Execute flag for other users
is missing. Mask is 770
drwxr-xr-x http http returntrip
drwxr-xr-x http http files
drwxrwxrwx http http Pictures
I have marked in bold the lines to show the difference. I guess that plex is unable to traverse the directories because the ‘x’ (execute) flag for ‘others’ was missing.
I really do not understand why that permission flag would change by itself tho… Camera Upload had worked for many days and for many picture uploads…
I need to investigate further.
If the above is not clear I can try to rephrase.
hi what is you permissions on /usr/share/webapps/nextcloud/ can you run
ls -la /usr/share/webapps/nextcloud/
please
@andyblac1974 said:
hi what is you permissions on /usr/share/webapps/nextcloud/ can you run
ls -la /usr/share/webapps/nextcloud/
please
I think I have fixed it. I have mounted the partition with ‘acl’ and set ‘x’ flag on the ‘data’ directory for user ‘plex’. This way, even if the ‘data’ mount point mask keeps resetting to 770, plex will always be able to access that dir…
Tomorrow morning I will try to understand why the mount point mask keeps resetting to 770…
# ls -latd /usr/share/webapps/nextcloud/
drwxr-xr-x 14 http http 4096 May 22 23:32 /usr/share/webapps/nextcloud/
Coming to this thread a little late …
- Are you mounting this automatically through /etc/fstab? If so, what are the mount flags?
- PMS only needs
0555 permission for directories and 0444 for files to read
- It does need the write bit (
2). This means a 7 for a directory and a 6 for a file in the appropriate position.
If there’s anything else I can add / help with, please don’t hesitate to ask.
@ChuckPA said:
Coming to this thread a little late …
- Are you mounting this automatically through /etc/fstab? If so, what are the mount flags?
- PMS only needs
0555 permission for directories and 0444 for files to read
- It does need the write bit (
2). This means a 7 for a directory and a 6 for a file in the appropriate position.
If there’s anything else I can add / help with, please don’t hesitate to ask.
Yes I automount via /etc/fstab using UUID=whateverUUID /usr/share/webapps/nextcloud/data ext4 defaults,acl 0 1
Note that I have added acl to work around ‘mount’ messing the permissions.
Maybe you can help me get my head around why when I mount the partition the permission change from:
Unmounted mount point:
#ls -latd /usr/share/webapps/nextcloud/data/
drwxr-xr-x 2 http http 4096 Jun 8 23:59 /usr/share/webapps/nextcloud/data/
to when mount point is mounted using mount -a:
# ls -latd /usr/share/webapps/nextcloud/data/
drwxrwx---+ 7 http http 4096 Feb 9 12:57 /usr/share/webapps/nextcloud/data/
I am not getting why mount -a changes the permissions from 755 to 770 and how to stop mount form changing the the permissions.
Hope you can help me figure this out.