Trouble configuring YaCy in Linux

I’m looking forward to being able to thoroughly utilize YaCy; however, I keep running into issues. 2 days ago, I installed it (via Linux) for the first time, and it worked fine for a day before being unable to connect to localhost. After trying unsuccessfully to troubleshoot it, I uninstalled it and attempted to install it via Docker. Again, it worked fine- this time for a couple of hours- before I encountered the same issue: “localhost can’t be reached”… “connection refused”. So, I uninstalled it via Docker and attempted a reinstall via Linux, though nothing is working. From then to now, I’ve attempted every legitimate “quick fix” to make YaCy work- checking ports (in use/listening), making sure Apache2 is running, checking my network and firewall, flushing browser and DNS cache, router settings, browser settings, and different browsers- but nothing is working. I would appreciate any help that other users could offer so that I can fully be a part of this project.

For the record, through all of this (YaCy working and not), I’m using Linux Mint 22.3 - Cinnamon 64-bit, Brave and Mullvad browsers, and all software is fully updated.

Welcome

Have you increased the default memory of 600 mb?
I recommend 1500mb to start with.

http://localhost:8090/Performance_p.html

Thank you very much for your reply, roamn. While it was loading/working, yes, I did increase the default memory when it became an issue; however, the problem now is that, no matter how I attempt to troubleshoot the problem, I can no longer get into localhost at all.

What Java version are you running? (java -version)

If possible, could you share the last ~40 lines of DATA/LOG/yacy00.log

I’m running Java 17.0.18 (openjdk)

…and here are the last ~40 lines:

I 2026/02/03 04:55:01 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201092455498.blob.
I 2026/02/03 04:55:01 HeapReader * saturation of text.index.20260201193521407.blob.8ERXpwkoHfdH.idx: keylength = 4, vallength = 3, size = 36731, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:01 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201193521407.blob.
I 2026/02/03 04:55:01 HeapReader * saturation of text.index.20260201211548139.blob.tFzjwZR9O_vq.idx: keylength = 5, vallength = 3, size = 34328, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:01 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201211548139.blob.
I 2026/02/03 04:55:02 HeapReader * saturation of text.index.20260201225416171.blob.5lvoyKl0z28T.idx: keylength = 6, vallength = 4, size = 577437, maximum saving for index-compression = 3 MB, exact saving for value-compression = 2 MB
I 2026/02/03 04:55:02 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201225416171.blob.
I 2026/02/03 04:55:02 HeapReader * saturation of text.index.20260201083227076.blob.46vTMWa4AjF6.idx: keylength = 5, vallength = 3, size = 23169, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:02 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201083227076.blob.
I 2026/02/03 04:55:02 HeapReader * saturation of text.index.20260201165004244.blob.Al27acaQHr7X.idx: keylength = 5, vallength = 3, size = 45327, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:02 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201165004244.blob.
I 2026/02/03 04:55:03 HeapReader * saturation of text.index.20260201151900048.blob.uBPcCMNGnULB.idx: keylength = 5, vallength = 3, size = 62092, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:03 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201151900048.blob.
I 2026/02/03 04:55:03 HeapReader * saturation of text.index.20260201193217839.blob.icXmhVK_afhT.idx: keylength = 5, vallength = 3, size = 29817, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:03 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201193217839.blob.
I 2026/02/03 04:55:03 HeapReader * saturation of text.index.20260201092358413.blob.Bzv6ge6VD5jH.idx: keylength = 5, vallength = 3, size = 57106, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:03 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201092358413.blob.
I 2026/02/03 04:55:03 HeapReader * saturation of text.index.20260201111257528.blob.wy-uZcCbV0Ul.idx: keylength = 5, vallength = 3, size = 57373, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:03 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201111257528.blob.
I 2026/02/03 04:55:03 HeapReader * saturation of text.index.20260201000215241.blob.Iu3myOjzomoe.idx: keylength = 5, vallength = 3, size = 33983, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:03 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201000215241.blob.
I 2026/02/03 04:55:03 HeapReader * saturation of text.index.20260201223537799.blob.Mb-WfITixbvz.idx: keylength = 5, vallength = 3, size = 34934, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:03 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201223537799.blob.
I 2026/02/03 04:55:03 HeapReader * saturation of text.index.20260201213315023.blob.cAxhrDfkn3dN.idx: keylength = 5, vallength = 3, size = 27826, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:03 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201213315023.blob.
I 2026/02/03 04:55:03 HeapReader * saturation of text.index.20260201085559584.blob.tRI2o4qyS4DO.idx: keylength = 4, vallength = 3, size = 41816, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:03 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201085559584.blob.
I 2026/02/03 04:55:03 HeapReader * saturation of text.index.20260201213527430.blob.N5nyBiOCHGss.idx: keylength = 5, vallength = 3, size = 55088, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:03 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201213527430.blob.
I 2026/02/03 04:55:04 HeapReader * saturation of text.index.20260201211936640.blob.VRyltUmG75aN.idx: keylength = 5, vallength = 4, size = 332096, maximum saving for index-compression = 1 MB, exact saving for value-compression = 1 MB
I 2026/02/03 04:55:04 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201211936640.blob.
I 2026/02/03 04:55:04 HeapReader * saturation of text.index.20260201152249277.blob.wWL4m91OzEfR.idx: keylength = 5, vallength = 3, size = 30499, maximum saving for index-compression = 0 MB, exact saving for value-compression = 0 MB
I 2026/02/03 04:55:04 HeapReader * using a dump of the index of /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201152249277.blob.
W 2026/02/03 04:55:05 ConcurrentLog * net.yacy.cora.util.SpaceExceededException: 2451840 bytes needed for RowCollection grow after OutOfMemoryError Java heap space: 38373200 free at Tue Feb 03 04:55:05 EST 2026
net.yacy.cora.util.SpaceExceededException: 2451840 bytes needed for RowCollection grow after OutOfMemoryError Java heap space: 38373200 free at Tue Feb 03 04:55:05 EST 2026
at net.yacy.kelondro.index.RowCollection.ensureSize(RowCollection.java:276)
at net.yacy.kelondro.index.RowCollection.addUnique(RowCollection.java:425)
at net.yacy.kelondro.index.RowCollection.addUnique(RowCollection.java:403)
at net.yacy.kelondro.index.RAMIndex.addUnique(RAMIndex.java:216)
at net.yacy.kelondro.index.RAMIndexCluster.addUnique(RAMIndexCluster.java:133)
at net.yacy.kelondro.index.RowHandleMap.(RowHandleMap.java:114)
at net.yacy.kelondro.blob.HeapReader.initIndexReadDump(HeapReader.java:179)
at net.yacy.kelondro.blob.HeapReader.(HeapReader.java:91)
at net.yacy.kelondro.blob.HeapModifier.(HeapModifier.java:58)
at net.yacy.kelondro.blob.ArrayStack.(ArrayStack.java:209)
at net.yacy.kelondro.rwi.ReferenceContainerArray.(ReferenceContainerArray.java:68)
at net.yacy.kelondro.rwi.IndexCell.(IndexCell.java:99)
at net.yacy.search.index.Segment.connectRWI(Segment.java:162)
at net.yacy.search.Switchboard.(Switchboard.java:578)
at net.yacy.yacy.startup(yacy.java:215)
at net.yacy.yacy.main(yacy.java:832)
I 2026/02/03 04:55:05 HeapReader * generating index for /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default/text.index.20260201224925650.blob, 117 MB. Please wait.
I 2026/02/03 04:55:06 ConcurrentLog shutdown of ConcurrentLog.Worker void because it was not running.
E 2026/02/03 04:55:06 UNCAUGHT-EXCEPTION * Thread main: Java heap space
java.lang.OutOfMemoryError: Java heap space

java.lang.OutOfMemoryError: Java heap space
E 2026/02/03 04:55:06 ConcurrentLog Java heap space
java.lang.OutOfMemoryError: Java heap space

My apologies for the delay in replying to you, and thank you very much for any help that you can offer.

What is your total system memory size?

What is the approx age of peer?

Can you remember the approx number of Documents in index?

Total system memory size is: 24GB Ram, 500GB SSD

Approx age of peer: It was less than 2 days for the first Linux installation, and less than a day for the Docker installation. Since then, as mentioned before for the current Linux install, localhost refuses to connect.

Approx number of Docs in index: Other than crawling one review website, I was going through Project Gutenberg- I think the last count for the first Linux install was over 400K.

Try this
What to delete (safe)

Stop YaCy first, then:

cd /home/alex/yacy/DATA/INDEX/freeworld/SEGMENTS/default
rm -f text.index.*.blob*

This removes only:

  • Corrupted / oversized text index blobs

  • Rebuilt automatically on next start


:cross_mark: What NOT to delete

Do not delete these:

  • collection.*

  • citation.*

  • webgraph.*

  • hosts.*

Those are your core indexes.

1 Like

First, thank you again for your help. I did as suggested and included a full system restart; unfortunately, I’m still getting the same message (and blank screen):

localhost refused to connect.

ERR_CONNECTION_REFUSED

While YaCy is starting, check the log:

tail -f /home/alex/yacy/DATA/LOG/yacy00.log

If you see messages like:

HeapReader * generating index for text.index....

then YaCy is working and rebuilding — even if localhost:8090 still refuses for a bit.
If you still see OutOfMemoryError in the log, the heap is still too small.

When I check the log, here’s what I’m seeing:

~/yacy$ tail -f /home/alex/yacy/DATA/LOG/yacy00.log
… 7 more
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.ClassCastException: class org.apache.lucene.analysis.core.KeywordTokenizerFactory [in thread “coreLoadExecutor-13-thread-2”]
at java.base/java.lang.Class.asSubclass(Class.java:3927)
at org.apache.lucene.util.SPIClassIterator.next(SPIClassIterator.java:156)
at org.apache.lucene.analysis.util.AnalysisSPILoader.reload(AnalysisSPILoader.java:86)
at org.apache.lucene.analysis.util.AnalysisSPILoader.(AnalysisSPILoader.java:66)
at org.apache.lucene.analysis.util.AnalysisSPILoader.(AnalysisSPILoader.java:52)
at org.apache.lucene.analysis.util.AnalysisSPILoader.(AnalysisSPILoader.java:48)
at org.apache.lucene.analysis.util.TokenizerFactory.(TokenizerFactory.java:35)
… 24 more

Personally at this stage I’d go for Option C — Nuclear but guaranteed!

Ah yep — that stack trace is a classic Lucene SPI classpath mismatch, and it explains exactly why YaCy won’t come up cleanly.

What’s actually breaking

This line is the smoking gun:

ClassCastException: org.apache.lucene.analysis.core.KeywordTokenizerFactory

That means two incompatible Lucene versions are on the classpath at the same time.

Lucene loads analyzers using Java’s SPI (Service Provider Interface). If even one Lucene JAR is from a different version, SPI blows up during static initialization → ExceptionInInitializerError → Solr never starts → YaCy UI never binds to localhost.

Why this happens in YaCy

YaCy embeds Solr + Lucene very tightly. Common causes:

  • Leftover Lucene JARs from:
    • a failed upgrade
    • mixing Docker + native installs
    • copying lib/ from another YaCy build
  • DATA/ reused across installs built against different Lucene versions
  • Building from source without cleaning lib/ and build/

Quick confirm (worth doing)

From your YaCy root:

ls lib | grep lucene

If you see multiple lucene- versions* (e.g. 8.x + 9.x), that’s it.

Also check Solr:

ls lib | grep solr

Lucene + Solr must match exactly.


The Fix (safe + proven)

Option A — Clean rebuild (best)

If this is a test peer or you don’t care about the index yet:

cd ~/yacy
rm -rf lib/*
rm -rf build

Then re-extract or rebuild from a single YaCy release (not mixed).

If building from source:

ant clean
ant compile

This forces the correct Lucene set back in.


Option B — Preserve DATA, fix binaries

If you want to keep crawls/config:

  1. Stop YaCy
  2. Move old libs out of the way:
mv lib lib.broken
mkdir lib
  1. Re-extract the official YaCy release matching your version into the same directory
  2. Start YaCy again

DATA is fine — this error happens before index access.


Option C — Nuclear but guaranteed

If Alexios reused DATA from another machine/version:

mv DATA DATA.bad
mkdir DATA

If it starts instantly after this → index version mismatch confirmed.


Why localhost “connection refused” happens

YaCy dies during Solr core load:

coreLoadExecutor-13-thread-2

So:

  • Java process may still exist
  • Port never binds
  • Browser shows “connection refused”

This is not networking, firewall, or Apache. It’s JVM startup failure.


  • This is not a crawl issue
  • Not memory
  • Not Docker vs Linux
  • It is a Lucene JAR version conflict
  • Fix = clean lib + single YaCy build

If you want, paste:

ls lib | sort

and I’ll tell you exactly which JAR is poisoning it :eyes:?

2 Likes

first problem seems to be a Kelondro/RWI problem, see RWI Index distribution in YaCy in docs for details.

For the second problem, as @roamn suggests, libraries mismatch – did you built yourself or used some official package? Not that one would be better then the other, just for debugging.

1 Like

THANK YOU! THANK YOU! THANK YOU SO MUCH @roamn! That worked, I’m back running, and I greatly appreciate your help!

1 Like