Joplin service failed to locate yarn

What type of hardware are you using: Virtual machine
What YunoHost version are you running: 12.0.11
What app is this about: Joplin

Describe your issue

Did some failover-testing yesterday, the machine got orderly shutdown all the time as seen in log but since yesterday all runs but the joplyn service. The error in Joplyn says
rror: Error 502 Bad Gateway: 502 Bad Gateway body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; }

502 Bad Gateway

If you see this page, your connection with the server is working but the internal service providing this path is not responding.

Administrator, make sure that the service is running, and check its logs if it is not. The Ser…

and in Yunohost log see attached.

Any idea why this yarn executable cant be found now?

Share relevant logs or error messages

https://paste.yunohost.org/vamoxiqabu

Hi moses,

The log states:

Jan 26 13:49:32 (yarn)[179]: joplin.service: Failed to locate executable /opt/node_n/n/versions/node/20/bin/yarn: No such file or directory
Jan 26 13:49:32 (yarn)[179]: joplin.service: Failed at step EXEC spawning /opt/node_n/n/versions/node/20/bin/yarn: No such file or directory

Does that location exist? If you

$ sudo cd /opt/node_n/n/versions/node/20/bin/
$ sudo ls -al

does that return the expected output?

When pasting CLI output or logs, please use code blocks (between backticks ``` on the line above and below or by using the button </> for preformatted text in the formatting bar)

I’m having what appears to be the same problem with Joplin…502 bad gateway caused by missing yarn executable.

My server log is here:
https://paste.yunohost.org/xowocasula

Thanks, here is the output with admin and root user the same:

ls -al
total 52611
drwxr-xr-x 2 root root        6 Jan 21 06:49 .
drwxr-xr-x 6 root root        9 Jan 22 16:29 ..
lrwxrwxrwx 1 root root       45 Jan 21 06:49 corepack -> ../lib/node_modules/corepack/dist/corepack.js
-rwxr-xr-x 1 root root 98431576 Jan 21 06:49 node
lrwxrwxrwx 1 root root       38 Jan 21 06:49 npm -> ../lib/node_modules/npm/bin/npm-cli.js
lrwxrwxrwx 1 root root       38 Jan 21 06:49 npx -> ../lib/node_modules/npm/bin/npx-cli.js

As the Joplin server can be installed multiple times (keeping resource usage in mind), does installing another copy work?

You could then look up the yarn location, fix this installation and then remove the other one again.

Last week(ish?) I tried and installed Joplin server with no problem (although it takes a while), so if it does not work anymore it is a recent “development”.

Speaking of recent developments, Orhtej2 has been packing an optimized version that uses fewer resources.

Having both of you using this server, does it provide any benefits over using plain WebDAV or Nextcloud for syncing? When I had it installed, there did not seem to be any editing or viewing options (but I’m not a Joplin user, so I may not have recognized it).

Right now, maybe not, but I get the sense that there will be at some point.

This is weird.
I deleted Joplin, restored from the pre-upgrade backup from several days ago, and it seemed to work fine.

I synced all of the clients to it, then backed it up again and upgraded it via command line, fully expecting it to break again, but…it didn’t. Now it’s updated and working fine. Yarn is back in /opt/node_n/versions/node/20/bin where it should be.

I just did a full reboot of the server and all of the services/apps started normally.

Maybe something else broke Joplin the other day?

I’m going to shut the server down and do another full image backup overnight while everything is working, just in case.

Don’t look a gift horse in the mouth, I guess.

1 Like

Look at the logs list, may be installing, upgrading or removing another app broke it

Got through the logs of all updated programs - nothing in there. I did the same as @Paradroyd and it worked for me too uninstalling joplyn and restore it from pre-upgrade.

I looked at the yarn directory - its still not there but sync is working. Hope this helps somebody

/opt/node_n/n/versions/node/20/bin# ls -al
total 52611
drwxr-xr-x 2 root root        6 Jan 21 06:49 .
drwxr-xr-x 6 root root        9 Jan 22 16:29 ..
lrwxrwxrwx 1 root root       45 Jan 21 06:49 corepack -> ../lib/node_modules/corepack/dist/corepack.js
-rwxr-xr-x 1 root root 98431576 Jan 21 06:49 node
lrwxrwxrwx 1 root root       38 Jan 21 06:49 npm -> ../lib/node_modules/npm/bin/npm-cli.js
lrwxrwxrwx 1 root root       38 Jan 21 06:49 npx -> ../lib/node_modules/npm/bin/npx-cli.js
1 Like

I hope of user management and optimized synchronisation but just use it because i already have yunohost and want to have a new notes app…

I did not see anything that was obvious to me in the logs that would explain this.

I had a few dependency issues with Minetest after I upgraded from Yunohost 11 to 12. Since I wasn’t really using Minetest on the Yunohost server, I removed it. It’s possible that somehow that broke Yarn which in turn messed up Joplin. That seems like a reach though, and I couldn’t find any logs to confirm or refute that. I only mention it here because that’s the biggest change I made around the same time that Joplin stopped working.
Anyway, I guess it doesn’t matter now.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.