Federation doesn't seem to be working
allywilson opened this issue · 6 comments
Did you check the FAQ & Troubleshooting section for answers to common questions and issues?
Yes
Describe the issue
Searching for communities/anything on other lemmy instances doesn't work. No other instances appear on the instance page.
Diagnostic Information
Run
./deploy.sh -d
and paste the output below:
==== Docker Information ====
Detected runtime: docker (Docker version 20.10.23, build 7155243)
Detected compose: docker compose (Docker Compose version v2.19.1)
Runtime state: OK
==== System Information ====
OS: Linux
KERNEL: 6.1.29-50.88.amzn2023.aarch64 (aarch64)
HOSTNAME: OK
SHELL: bash
MEMORY:
total used free shared buff/cache available
Mem: 1.8Gi 495Mi 112Mi 22Mi 1.2Gi 1.1Gi
Swap: 0B 0B 0B
DISTRO:
----------------------------
NAME="Amazon Linux"
PRETTY_NAME="Amazon Linux 2023"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
----------------------------
==== Lemmy-Easy-Deploy Information ====
Version: 1.2.8
IMAGE CREATED STATUS
caddy:latest 23 seconds ago Up 20 seconds
ghcr.io/ubergeek77/lemmy-ui:0.18.2 23 seconds ago Up 21 seconds
ghcr.io/ubergeek77/lemmy:0.18.1 23 seconds ago Up 11 seconds
postgres:15-alpine 24 seconds ago Up 22 seconds
asonix/pictrs:0.4.0 24 seconds ago Up 22 seconds
Integrity:
074ae41957936daac883c66bcac0ca12093343ef5e923752689b936b3c6b1b25 ./deploy.sh
1e9b0c0988998dcc33cb0fbfdb0e1679229424e724f898b797380adc7d102446 ./templates/Caddy-Dockerfile.template
c1202e70662dd2228da36a35a0f38ec8fc81bec8964d7315d02e8671a58dd7d7 ./templates/Caddyfile.template
2537678c7971df36c1ed95f4228d3cfcb15bb4a28a60d939eaf8dd75b5d64a36 ./templates/cloudflare.snip
c494a610bcb4cd1cfc0a4fe4fb0f6d437b2a84a0ad1625daee240e6dd6f1c910 ./templates/compose-email-volumes.snip
c9cb4c5fee12930e17798a02ae1bd12e2dc69e149a394c24511bc9d4e6b776d4 ./templates/compose-email.snip
f5325a9e26b29da51c6d3295aa278ff08ce71ffd2cd63dc4bebf00e54c468899 ./templates/docker-compose.yml.template
1c202b1b6e87c65b2fcda6035c9fe3f8631d76662907ffd38f24b14686e30647 ./templates/lemmy-email.snip
c834cdce9eaf77f38155b404724fdfe66845575386ee516987452aa715642a6f ./templates/lemmy.hjson.template
Custom Files:
*** No custom files ***
==== Settings ====
CLOUDFLARE: No
CADDY_DISABLE_TLS: false
CADDY_HTTP_PORT: 80
CADDY_HTTPS_PORT: 443
LEMMY_TLS_ENABLED: true
ENABLE_EMAIL: true
SMTP_PORT: 587
ENABLE_POSTFIX: false
POSTGRES_POOL_SIZE: 5
==== Generated Files ====
Deploy Version: 0.18.1;0.18.2
total 32K
drwxr-xr-x. 2 0 0 23 Jul 16 08:13 caddy
-rw-r--r--. 1 0 0 26 Jul 16 08:13 caddy.env
-rw-r--r--. 1 0 0 1.7K Jul 16 08:13 docker-compose.yml
-rw-r--r--. 1 0 0 50 Jul 16 08:13 lemmy.env
-rw-r--r--. 1 0 0 723 Jul 16 08:13 lemmy.hjson
-rw-r--r--. 1 0 0 49 Jul 16 08:13 pictrs.env
-rw-r--r--. 1 0 0 30 Jul 16 08:13 postfix.env
-rw-r--r--. 1 0 0 51 Jul 16 08:13 postgres.env
-rw-r--r--. 1 0 0 14 Jul 16 08:13 version```
monitoring logs when attempting to search results in this:
lemmy-easy-deploy-lemmy-1 | 2023-07-16T08:28:12.217457Z INFO actix_web::middleware::logger: 1.2.3.4 'GET /api/v3/community/list?type_=All&sort=TopAll&limit=20&auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imtlcm50LmNsdWIiLCJpYXQiOjE2ODk0OTUzMjd9.-EjYb2cgKfldmqy7UfSow6xxh2X1SOYD8o7julNGGPM HTTP/1.1' 200 18 'https://my.domain/search?q=meme&type=Communities&listingType=All&page=1&sort=TopAll' 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0' 0.004913
lemmy-easy-deploy-lemmy-1 | 2023-07-16T08:28:12.219720Z INFO actix_web::middleware::logger: 1.2.3.4 'GET /api/v3/search?q=meme&type_=Communities&sort=TopAll&listing_type=All&page=1&limit=20&auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imtlcm50LmNsdWIiLCJpYXQiOjE2ODk0OTUzMjd9.-EjYb2cgKfldmqy7UfSow6xxh2X1SOYD8o7julNGGPM HTTP/1.1' 200 76 'https://my.domain/search?q=meme&type=Communities&listingType=All&page=1&sort=TopAll' 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0' 0.006794
lemmy-easy-deploy-lemmy-1 | 2023-07-16T08:28:12.341582Z WARN Error encountered while processing the incoming HTTP request: lemmy_server::root_span_builder: couldnt_find_object: invalid query
lemmy-easy-deploy-lemmy-1 | 0: lemmy_apub::fetcher::search::search_query_to_object_id
lemmy-easy-deploy-lemmy-1 | at crates/apub/src/fetcher/search.rs:19
lemmy-easy-deploy-lemmy-1 | 1: lemmy_apub::api::resolve_object::resolve_object
lemmy-easy-deploy-lemmy-1 | with data=Query(ResolveObject { q: "meme", auth: Sensitive })
lemmy-easy-deploy-lemmy-1 | at crates/apub/src/api/resolve_object.rs:15
lemmy-easy-deploy-lemmy-1 | 2: lemmy_server::root_span_builder::HTTP request
lemmy-easy-deploy-lemmy-1 | with http.method=GET http.scheme="https" http.host=my.domain http.target=/api/v3/resolve_object otel.kind="server" request_id=4b314917-1038-4b03-b1ed-e793c4f3439a http.status_code=400 otel.status_code="OK"
lemmy-easy-deploy-lemmy-1 | at src/root_span_builder.rs:16
lemmy-easy-deploy-lemmy-1 | LemmyError { message: Some("couldnt_find_object"), inner: invalid query, context: SpanTrace [{ target: "lemmy_apub::fetcher::search", name: "search_query_to_object_id", file: "crates/apub/src/fetcher/search.rs", line: 19 }, { target: "lemmy_apub::api::resolve_object", name: "resolve_object", fields: "\u{1b}[3mdata\u{1b}[0m\u{1b}[2m=\u{1b}[0mQuery(ResolveObject { q: "meme", auth: Sensitive })", file: "crates/apub/src/api/resolve_object.rs", line: 15 }, { target: "lemmy_server::root_span_builder", name: "HTTP request", fields: "\u{1b}[3mhttp.method\u{1b}[0m\u{1b}[2m=\u{1b}[0mGET \u{1b}[3mhttp.scheme\u{1b}[0m\u{1b}[2m=\u{1b}[0m"https" \u{1b}[3mhttp.host\u{1b}[0m\u{1b}[2m=\u{1b}[0mmy.domain \u{1b}[3mhttp.target\u{1b}[0m\u{1b}[2m=\u{1b}[0m/api/v3/resolve_object \u{1b}[3motel.kind\u{1b}[0m\u{1b}[2m=\u{1b}[0m"server" \u{1b}[3mrequest_id\u{1b}[0m\u{1b}[2m=\u{1b}[0m4b314917-1038-4b03-b1ed-e793c4f3439a \u{1b}[3mhttp.status_code\u{1b}[0m\u{1b}[2m=\u{1b}[0m400 \u{1b}[3motel.status_code\u{1b}[0m\u{1b}[2m=\u{1b}[0m"OK"", file: "src/root_span_builder.rs", line: 16 }] }
lemmy-easy-deploy-lemmy-1 | 2023-07-16T08:28:12.341666Z INFO actix_web::middleware::logger: 1.2.3.4 'GET /api/v3/resolve_object?q=meme&auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imtlcm50LmNsdWIiLCJpYXQiOjE2ODk0OTUzMjd9.-EjYb2cgKfldmqy7UfSow6xxh2X1SOYD8o7julNGGPM HTTP/1.1' 400 31 'https://my.domain/search?q=meme&type=Communities&listingType=All&page=1&sort=TopAll' 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0' 0.001769
lemmy-easy-deploy-lemmy-1 | 2023-07-16T08:28:17.286527Z WARN Error encountered while processing the incoming HTTP request: lemmy_server::root_span_builder: not_logged_in: InvalidSignature
lemmy-easy-deploy-lemmy-1 | 0: lemmy_api_common::utils::local_user_view_from_jwt
lemmy-easy-deploy-lemmy-1 | at crates/api_common/src/utils.rs:136
lemmy-easy-deploy-lemmy-1 | 1: lemmy_api::local_user::notifications::unread_count::perform
lemmy-easy-deploy-lemmy-1 | with self=GetUnreadCount { auth: Sensitive }
lemmy-easy-deploy-lemmy-1 | at crates/api/src/local_user/notifications/unread_count.rs:16
lemmy-easy-deploy-lemmy-1 | 2: lemmy_server::root_span_builder::HTTP request
lemmy-easy-deploy-lemmy-1 | with http.method=GET http.scheme="https" http.host=my.domain http.target=/api/v3/user/unread_count otel.kind="server" request_id=f3e59612-cea3-4959-8bb1-faf5fe26aefa http.status_code=400 otel.status_code="OK"
lemmy-easy-deploy-lemmy-1 | at src/root_span_builder.rs:16
lemmy-easy-deploy-lemmy-1 | LemmyError { message: Some("not_logged_in"), inner: InvalidSignature, context: SpanTrace [{ target: "lemmy_api_common::utils", name: "local_user_view_from_jwt", file: "crates/api_common/src/utils.rs", line: 136 }, { target: "lemmy_api::local_user::notifications::unread_count", name: "perform", fields: "\u{1b}[3mself\u{1b}[0m\u{1b}[2m=\u{1b}[0mGetUnreadCount { auth: Sensitive }", file: "crates/api/src/local_user/notifications/unread_count.rs", line: 16 }, { target: "lemmy_server::root_span_builder", name: "HTTP request", fields: "\u{1b}[3mhttp.method\u{1b}[0m\u{1b}[2m=\u{1b}[0mGET \u{1b}[3mhttp.scheme\u{1b}[0m\u{1b}[2m=\u{1b}[0m"https" \u{1b}[3mhttp.host\u{1b}[0m\u{1b}[2m=\u{1b}[0mmy.domain \u{1b}[3mhttp.target\u{1b}[0m\u{1b}[2m=\u{1b}[0m/api/v3/user/unread_count \u{1b}[3motel.kind\u{1b}[0m\u{1b}[2m=\u{1b}[0m"server" \u{1b}[3mrequest_id\u{1b}[0m\u{1b}[2m=\u{1b}[0mf3e59612-cea3-4959-8bb1-faf5fe26aefa \u{1b}[3mhttp.status_code\u{1b}[0m\u{1b}[2m=\u{1b}[0m400 \u{1b}[3motel.status_code\u{1b}[0m\u{1b}[2m=\u{1b}[0m"OK"", file: "src/root_span_builder.rs", line: 16 }] }
lemmy-easy-deploy-lemmy-1 | 2023-07-16T08:28:17.286604Z INFO actix_web::middleware::logger: 1.2.3.4 'GET /api/v3/user/unread_count?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imtlcm50LmNsdWIiLCJpYXQiOjE2ODk0MTI1MzN9.Rb2DlHR6Q3GMTE-IMDj5nYiWlT-jeiVtnzN3-llCYcY HTTP/1.1' 400 25 'https://my.domain/search?q=memes&type=Communities&listingType=All&page=1&sort=TopAll' 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0' 0.000288
There must be an external reachability issue with your instance. Federation works fine out of the box with no configuration.
Remember that you must search for a community in your instance first before it will appear. You will not automatically see any content in the Lemmy network unless you have first searched for a community.
Hello @allywilson , do you have any additional details about this issue? There does not appear to be anything wrong with the Lemmy-Easy-Deploy side of things.
You can also try running ./deploy.sh -l 0.18.2
to explicitly deploy 0.18.2.
The Lemmy team has neglected to publish a formal release of 0.18.2, and since there is no other way to programmatically determine the latest stable release until they do so, 0.18.2 is not being deployed automatically.
Unfortunately I can't do much to assist in federation errors, as it is most likely due to network configuration or network issues above Lemmy Easy Deploy.
But keep in mind that when you put things in "Allowed Instances," ONLY those instances will be allowed to federate with you.
Federation in Lemmy is not very user friendly, so it's possible there is a misunderstanding in how it works.
First off, you can only federate on a per-community basis, not per instance basis. Second, Lemmy will not automatically retrieve posts from instances you have put in "allowed" instances, you must first search for the community you want.
Try putting https://lemdro.id/c/android
into your search bar and then click Search. You should see it appear like this:
And finally, you must subscribe to that community in order to start seeing posts. You can subscribe by first visiting the community, by clicking its link in the search result as shown above. Then, you will see a subscribe button (you may have to expand the sidebar if you are on mobile).
When you subscribe, you will only see a very small handful of posts offered by that instance, not the full history. In some cases you will not see anything at all. You will need to wait until new content is generated.
You can get your instance to download old content, but you will need to copy the direct link to that post/comment and put it in your search bar, then wait a bit.
Also keep in mind, you must have HTTPS enabled, and your site must work properly over HTTPS, or federation won't work.
Closing due to inactivity. Please comment if you have further issues!
Search in the default webui is rather unintuitive. It doesn't really search, it rather just connects to the server once you find it (via services like lemmyverse.net for example).
It's also very slow and it first reports "No result", but after third time clicking "search" button it finally finds the community.
Could it be perhaps added to the README? It would save new people some time. I know this isn't Leammy-Easy-Deploy issue, but I think that your repo is the only sensible deployment option for non-enterprise users right now.