Développement : Trop de niveaux de liens symboliques - Échec de la surveillance

I get this error all the time when starting

I “fix” it by doing this:

find ~/src/discourse-repos/discourse/plugins/ -type l |xargs rm

Is it just me?

Starting CSS change watcher
/home/pfaffman/.asdf/installs/ruby/3.3.8/lib/ruby/gems/3.3.0/gems/rb-inotify-0.11.1/lib/rb-inotify/watcher.rb:74:in `initialize': Too many levels of symbolic links - Failed to watch "/h
ome/pfaffman/src/discourse-repos/discourse/plugins/chat/public/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840
f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e423
7ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca
50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3
c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1
b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/833426b67385a5876ca0e17e82fe3571/833426b67385a5876ca0e17e82fe3571/833426b67385a5876ca0e17e82fe3571/41a1b1e4237ade4d3c9b840f
2f23ca50/833426b67385a5876ca0e17e82fe3571/41a1b1e4237ade4d3c9b840f2f23ca50/833426b67385a5876ca0e17e82fe3571/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237ade4d3c9b840f2f23ca50/41a1b1e4237
ade4d3c9b840f2f23ca50/833426b67385a5876ca0e17e82fe3571/833426b67385a5876ca0e17e82fe3571" (Errno::ELOOP)

That subfolder in the chat plugin’s /public/ folder shouldn’t be there. You can remove it. (It’s not in the git repo.)

1 « J'aime »

I remove it every time using the find command above. It’s automatically created. I don’t know what’s creating it or why.

The problem with the find command above, is that it also removes the plugins that I’m trying to develop that are symlinked to other places in the filesystem.

After I run /home/pfaffman/src/discourse-repos/discourse/bin/rails s

I get

 pfaffman@noreno:~$ ls src/discourse-repos/discourse/plugins/*/public
src/discourse-repos/discourse/plugins/chat/public:
audio/  eff5d31d03426e7f2054139cb53042d4@  images/

src/discourse-repos/discourse/plugins/discourse-ai/public:
1cb246c16b035c9e463bf6fc8b6d4176@  ai-share/

src/discourse-repos/discourse/plugins/discourse-graphviz/public:
dc299010dcd0e5cf5f674c50d5f33593@  javascripts/

src/discourse-repos/discourse/plugins/discourse-lti/public:
6cbe534897806e90f51c3cff74d87e8d@  javascripts/

src/discourse-repos/discourse/plugins/discourse-math/public:
f3dc93c6d5ed9d6b254a390ac5b0ce37@  katex/  mathjax/

src/discourse-repos/discourse/plugins/discourse-narrative-bot/public:
f720bcf81288c472669dfb9740d34071@  fonts/  images/

src/discourse-repos/discourse/plugins/discourse-patreon/public:
2b3dbcc0f3712546cb1ae9e5f69199d8@  images/

src/discourse-repos/discourse/plugins/styleguide/public:
8f0aefa3699cbccf8652eb5d0aee4033@  images/
 pfaffman@noreno:~$

Hmm… I haven’t seen this locally. You run your local server as a dev environment, right, not as production?

Maybe there’s a specific gem/plugin that is responsible… one way to find out is to run your local Discourse instance with nothing but the core plugins and add other plugins one by one until you find which one causes this behaviour. (If it is a plugin… not sure it is, worth a try.)

Yes, this is a dev install on Linux.

The find command removes all plugins. I guess something is creating them for some reason and when I ^C to stop the server they get left behind.

EDIT: Here’s the find that doesn’t delete the plugins:

find plugins/ -type l | grep public | xargs rm -v

I don’t have anything like that in plugin public/ directories either.

Where do these strange symlinks point? Any clues as to what they could be for?

OMG. So again I have some bizarre ghost in the machine? :crying_cat:

They all point back up to their parent – public. I have no clue what they could be for. They just started showing up a few weeks ago.

 (main) pfaffman@noreno:~/src/discourse-repos/discourse/plugins$ find . -type l|xargs ls -dl
lrwxrwxrwx 1 pfaffman pfaffman 64 Nov 11 11:22 ./chat/public/1d52c770cd80e083a3718789d1605413 -> /home/pfaffman/src/discourse-repos/discourse/plugins/chat/public
lrwxrwxrwx 1 pfaffman pfaffman 72 Nov 11 11:22 ./discourse-ai/public/b40846a97cdbd0274c3dd7eb54988250 -> /home/pfaffman/src/discourse-repos/discourse/plugins/discourse-ai/public
lrwxrwxrwx 1 pfaffman pfaffman 78 Nov 11 11:22 ./discourse-graphviz/public/b8f3dbf1fd6ee55e3c23d77c83be2c05 -> /home/pfaffman/src/discourse-repos/discourse/plugins/discourse-graphviz/public
lrwxrwxrwx 1 pfaffman pfaffman 73 Nov 11 11:22 ./discourse-lti/public/84caf37dcddbb7cf6a217ab898027cfb -> /home/pfaffman/src/discourse-repos/discourse/plugins/discourse-lti/public
lrwxrwxrwx 1 pfaffman pfaffman 74 Nov 11 11:22 ./discourse-math/public/e38b84b0cb39c3d5b97724bc8b4b6f2f -> /home/pfaffman/src/discourse-repos/discourse/plugins/discourse-math/public
lrwxrwxrwx 1 pfaffman pfaffman 83 Nov 11 11:22 ./discourse-narrative-bot/public/32819192a75a2ed5cbca7f9ba15601cb -> /home/pfaffman/src/discourse-repos/discourse/plugins/discourse-narrative-bot/public
lrwxrwxrwx 1 pfaffman pfaffman 77 Nov 11 11:22 ./discourse-patreon/public/8de4d88071a4dddf83fff5390605465f -> /home/pfaffman/src/discourse-repos/discourse/plugins/discourse-patreon/public
lrwxrwxrwx 1 pfaffman pfaffman 51 Nov 11 11:22 ./discourse-pfaffmanager -> /home/pfaffman/src/pfaffman/discourse-pfaffmanager/
lrwxrwxrwx 1 pfaffman pfaffman 70 Nov 11 11:22 ./styleguide/public/a8a42b154ba5868280256ba6040a2119 -> /home/pfaffman/src/discourse-repos/discourse/plugins/styleguide/public

And now I have this:

find plugins/ -type l | grep public | xargs rm -v
#~/.kill_ember
# NOTE: you have to change the order, not comment them out!
UNICORN_WORKERS=1 \
UNICORN_SIDEKIQS=0 \
DISCOURSE_DEV_ALLOW_ANON_TO_IMPERSONATE=1 \
DISCOURSE_MAXMIND_LICENSE_KEY=zLjQgCjCmGeguCIy \
DISCOURSE_DISCOURSE_SUBSCRIPTIONS_SECRET_KEY=sk_test \
DISCOURSE_DISCOURSE_SUBSCRIPTIONS_PUBLIC_KEY=pk_test \
DISCOURSE_DISCOURSE_SUBSCRIPTIONS_SECRET_KEY=sk_live \
DISCOURSE_DISCOURSE_SUBSCRIPTIONS_PUBLIC_KEY=pk_live \
DISCOURSE_DISCOURSE_SUBSCRIPTIONS_ENABLED=true \
DISCOURSE_DISCOURSE_SUBSCRIPTIONS_EXTRA_NAV_SUBSCRIBE=true \
DISCOURSE_S3_ACCESS_KEY_ID=6ZA6XODWYCA3ALIZB2CA \
DISCOURSE_S3_SECRET_ACCESS_KEY="x" \
DISCOURSE_S3_BACKUP_BUCKET="buck" \
DISCOURSE_BACKUP_LOCATION="s3" \
DISCOURSE_S3_ENDPOINT="https://sfo3.digitaloceanspaces.com" \
DISCOURSE_S3_REGION=whatever \
DISCOURSE_FORCE_HTTPS=false \
DISCOURSE_TITLE="Staging/development" \
timeout --foreground -k 15s 60m $COMMAND $*

And somehow that’s no longer working. I get this:

Going to run: /home/pfaffman/src/discourse-repos/discourse/bin/rails s
removed 'plugins/chat/public/a5ae10937f40d49cff9c68ff76a72d99'
removed 'plugins/discourse-math/public/f25cafd9c7e5954c858294d80efdacb3'
removed 'plugins/discourse-graphviz/public/f7ab86524adec9500bf4dec9e95694cd'
removed 'plugins/discourse-lti/public/46a2de0d0a87b37acf83d5ee2143484e'
removed 'plugins/discourse-ai/public/e07e3c8844bc668fb0588b87e14d1e6f'
removed 'plugins/discourse-patreon/public/72ee56353e75ed5d55eb95397e84a355'
removed 'plugins/styleguide/public/1f55952c7d509e59355ec6b46cca8f6d'
removed 'plugins/discourse-narrative-bot/public/454d4eb93f5174651ee8ea306ed4be4c'
I, [2025-11-11T13:52:36.976738 #613360]  INFO -- : Refreshing Gem list
Starting CSS change watcher
<internal:dir>:184:in `open': Too many levels of symbolic links @ dir_initialize - /home/pfaffman/src/discourse-repos/discourse/plugins/discourse-math/public/89122751ccaa836c9ede2b5bb5b
917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa83
6c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/8
9122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2
b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751
ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b9
17df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836c9ede2b5bb5b917df/89122751ccaa836
c9ede2b5bb5b917df/mathjax/jax/output/SVG/fonts/Latin-Modern/NonUnicode/Regular (Errno::ELOOP)

So it’s deleting one of those files, but then creates another one?

ask.discourse.org says

I’m trying using bin/dev instead of both ember-cli and bin/rails s. That seems to have solved the latest problem, but quitting with ^c is still leaving those symlinks behind.

I don’t understand why no one else has this problem.