Discussion - 'Transport endpoint not connected' recurring error only with gcrypt | PlexGuide.com

Discussion 'Transport endpoint not connected' recurring error only with gcrypt

  • Stop using Chrome! Download the Brave Browser via >>> [Brave.com]
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the PlexGuide.com
Serving the Community since 2016!
Register Now

nj543

Citizen
Original poster
Oct 25, 2019
13
2
Hi,

I have a recurring error every 1-2 days where only the /mnt/gcrypt folder throws an error and the service cannot restart without a reboot. All other folders are working fine. The system has 14GB of free ram, only 20% swap usage and on Ubuntu 18.04 so I don't think it's an issue with limited RAM or drive space. The log files are blank and pgui shows everything working normally even though it isn't. Any suggestions?

Code:
[email protected]:~$ sudo systemctl restart gcrypt
Job for gcrypt.service failed because the control process exited with error code.
See "systemctl status gcrypt.service" and "journalctl -xe" for details.


[email protected]:~$ sudo systemctl status gcrypt
● gcrypt.service - gcrypt Daemon
   Loaded: loaded (/etc/systemd/system/gcrypt.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-03-25 11:07:58 EDT; 10s ago
  Process: 11027 ExecStart=/usr/bin/rclone mount gcrypt: /mnt/gcrypt --config=/opt/appdata/plexguide/rclone.conf --log-file=/var/plexguide/logs/rclone-gcr
Main PID: 11027 (code=exited, status=1/FAILURE)

Mar 25 11:07:57 Server systemd[1]: Starting gcrypt Daemon...
Mar 25 11:07:58 Server systemd[1]: gcrypt.service: Main process exited, code=exited, status=1/FAILURE
Mar 25 11:07:58 Server systemd[1]: gcrypt.service: Failed with result 'exit-code'.
Mar 25 11:07:58 Server systemd[1]: Failed to start gcrypt Daemon.
Post automatically merged:

ls -la /mnt/gcrypt
ls: cannot access '/mnt/gcrypt': Transport endpoint is not connected
Post automatically merged:

screen15_59_11.png
 
Last edited:

Edrock200

MVP
Staff
Nov 17, 2019
545
195
Your mount keeps dropping. This usually occurs if your internet connection isn't stable but there can be other causes. When this happens try an ls /mnt/gdrive. Do you get the same error? To recover do:
sudo fusermount -uz /mnt/gcrypt
sudo systemctl start gcrypt
The timeout is set to 1h so increasing that probably won't help. Grab the file /var/plexguide/logs/rclone-gcrypt.log and post it here. It might yield some clues.
 

nj543

Citizen
Original poster
Oct 25, 2019
13
2
It seems all the log files except pgmove are blank. The archived ones are all over a week old. ls /mnt/gdrive works but not for gcrypt, I get:
Code:
ls: cannot access '/mnt/gcrypt': Transport endpoint is not connected

This may be useful. My internet doesn't seem to ever be unstable and plenty of free RAM.
Rich (BB code):
 systemctl status gcrypt
● gcrypt.service - gcrypt Daemon
   Loaded: loaded (/etc/systemd/system/gcrypt.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2020-04-17 07:21:26 EDT; 2h 40min ago
  Process: 15906 ExecStart=/usr/bin/rclone mount gcrypt: /mnt/gcrypt --config=/opt/appdata/plexguide/rclone.conf --log-file=/var/plexguide/logs/rclone-gcrypt.log --log-
 Main PID: 15906 (code=exited, status=2)

Apr 10 15:22:16 ParmarServer systemd[1]: Starting gcrypt Daemon...
Apr 10 15:22:18 ParmarServer systemd[1]: Started gcrypt Daemon.
Apr 17 07:21:26 ParmarServer systemd[1]: gcrypt.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 17 07:21:26 ParmarServer systemd[1]: gcrypt.service: Failed with result 'exit-code'.
Using the two commands specified does fix the issue but now wondering why this is happening or perhaps there's a way to make a script to automatically recover from this?
 

Admin9705

Administrator
Project Manager
Donor
Jan 17, 2018
5,156
2,114
it would take some work on 8.7.5, but pgx will have self healing drive due to it's bash implentation.
 

nj543

Citizen
Original poster
Oct 25, 2019
13
2
Oh ok thanks. I look forward to testing that out. Would there be any way to run a cron task to check if it's mounted and if not run:

sudo fusermount -uz /mnt/gcrypt
sudo systemctl start gcrypt

I'm new to linux so not sure if this is an easy or difficult quick and dirty fix.
 

Edrock200

MVP
Staff
Nov 17, 2019
545
195
I could have sworn I posted this on this thread but maybe someone else asked a similar question. You make a mounted.bin file in your gcrypt folder. Then paste the code below in a shell script and set it as a cronjob to run every minute.

Code:
[[ -f /mnt/gcrypt/mounted.bin ]] && echo "All Good"  || { fusermount -uz /mnt/gcrypt ; systemctl start gcrypt ; }
I haven't tested it so test it first. You can have it stop and start containers based on this logic too. Like instead of echo all good it can be docker start plex if you add a docker stop plex to the inverse.

We should probably add a "Restart=OnFailure" to the pgx service files.
 
Last edited:

nj543

Citizen
Original poster
Oct 25, 2019
13
2
hmm I'm not entirely sure I'm doing this right. So if it is working and I run the script as a normal user, I get all good. If I run as root I get this and it always seems to restart the service regardless.
Code:
/Documents$ sudo ./checkGcrypt.sh
./checkGcrypt.sh: 1: ./checkGcrypt.sh: [[: not found
However if run as a normal user when it's offline, it gives me this and does fix it. Although giving it manual authentication doesn't make sense so I'd want it running as root.

Code:
$ ./checkGcrypt.sh
fusermount: entry for /mnt/gcrypt not found in /etc/mtab
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'gcrypt.service'.
Authenticating as: Server,,, (home)
Password:
==== AUTHENTICATION COMPLETE ===
 

nj543

Citizen
Original poster
Oct 25, 2019
13
2
Thanks I used #!/bin/bash in the script and that seemed to fix it. I'll monitor it over the next few days to see if it fails and auto recovers with this script
 
  • Like
Reactions: 1 user

Recommend NewsGroups

      Up To a 58% Discount!

Trending