this post was submitted on 09 Jun 2023
10 points (100.0% liked)

Lemmy Support

157 readers
3 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

G'day, I just got Lemmy going on my site https://apollo.town and it doesn't appear to be federating. I ran through the Lemmy troubleshooting docs and I can return valid JSON from the site, but I can't look up anything on lemmy.ml from my site - although I can look up my site from lemmy.ml.

Caddy is my reverse proxy with the world's simplest config:

root@apollotown:~/lemmy# cat Caddyfile 
# apollo.town Lemmy instance
apollo.town {
	reverse_proxy :4040
}
top 21 comments
sorted by: hot top controversial new old
[–] lodion@aussie.zone 2 points 1 year ago (1 children)

During initial setup, did you specify to federate with yourself? Clicking the instances link at the bottom of your page, shows:

If you specify an instance to explicitly federate with, all other instances are disallowed.

[–] tekeous 1 points 1 year ago (1 children)

When I go look in the admin settings, both Allowed and Disallowed boxes are blank, but it's possible I put my host in somewhere I wasn't supposed to in the configs. Let me double check that, where in the configs files would I be looking?

[–] lodion@aussie.zone 1 points 1 year ago (3 children)

Sorry I have no idea. I've just never seen an instance "linked" to itself. Something is definitely wrong. Might be easier to blow away the database and start again.

[–] tekeous 1 points 1 year ago (1 children)

I did enable and disable federation debug mode, would that have bunged something up?

[–] lodion@aussie.zone 1 points 1 year ago

I've never tried it, but I wouldn't think so. I'd expect it to be more verbose in logging.

[–] tekeous 1 points 1 year ago

I just started this about 15 minutes ago, so this is as clean as it gets. I must have just missed something somewhere.

[–] tekeous 1 points 1 year ago (3 children)

Blew away the database and it's still there. Removed all references to apollo.town in the docker-compose, lemmy.hjson, and nginx, other than in the lemmy.json where it SPECIFICALLY says to put your domain name. I'll change that anyway to try it

[–] tekeous 1 points 1 year ago (1 children)

Ah HA! Whatever I add to lemmy.hjson is added as a federated instance.

  # the domain name of your instance (eg "lemmy.ml")
  hostname: "lemmy.ml"

And now lemmy.ml is listed as my only linked instance.

[–] lodion@aussie.zone 2 points 1 year ago (1 children)

yeah that should be your own hostname... "apollo.town".

[–] tekeous 1 points 1 year ago (1 children)

well that's what I'm saying - it was set to "apollo.town" and I federated with myself. I set it back to lemmy.ml and blew the database, and now I'm federated only with lemmy.ml. Whatever I put there is federated.

[–] tekeous 1 points 1 year ago (2 children)

I'm not sure that's not by design, because lemmy.ml lists itself on Instances here.

[–] lodion@aussie.zone 1 points 1 year ago

Sorry, not sure what is going on. I searched and added !announcements@apollo.town on my instance. But making a post never shows up on your side.

[–] lodion@aussie.zone 1 points 1 year ago

Ok, weird. I guess set it back to your own hostname and create a local community to play with and find from other instances.

[–] pe1uca@lemmy.pe1uca.dev 1 points 1 year ago (1 children)

Check the logs, if you see something about http error for lemmy.ml then the issue is the internal network.
Add a 3rd network just like the one for the proxy and add it to the lemmy container.
What happened to me was caused by this, the lemmy container couldn't connect to the internet so it wasn't able to find the other instances.

[–] tekeous 1 points 1 year ago* (last edited 1 year ago) (1 children)

I think you might be on to something. I looked up myself(@tekeous@beehaw.org from apollo.town and got the following:

2023-06-09T04:19:01.663684Z ERROR HTTP request{http.method=GET http.scheme="https" http.host=apollo.town http.target=/api/v3/ws otel.kind="server" request_id=a0092113-8277-47a7-9e73-d9bedd908228 http.status_code=101 otel.status_code="OK"}: lemmy_server::api_routes_websocket: couldnt_find_object: Request error: error sending request for url (https://beehaw.org/.well-known/webfinger?resource=acct:tekeous@beehaw.org): operation timed out
   0: lemmy_apub::fetcher::search::search_query_to_object_id
             at crates/apub/src/fetcher/search.rs:17
   1: lemmy_apub::api::resolve_object::perform
           with self=ResolveObject { q: "@tekeous@beehaw.org", auth: Some(Sensitive) }
             at crates/apub/src/api/resolve_object.rs:21
   2: lemmy_server::root_span_builder::HTTP request
           with http.method=GET http.scheme="https" http.host=apollo.town http.target=/api/v3/ws otel.kind="server" request_id=a0092113-8277-47a7-9e73-d9bedd908228 http.status_code=101 otel.status_code="OK"
             at src/root_span_builder.rs:16

I'm not too familiar with docker networks - how would I add a third one?

[–] pe1uca@lemmy.pe1uca.dev 1 points 1 year ago* (last edited 1 year ago) (1 children)

So you want to have this:

networks:
  # only ports facing any connection from outside
  lemmyexternalproxy:
  lemmybridge:
  # communication between lemmy services
  lemmyinternal:
    driver: bridge
    internal: true

And in the container this.

lemmy:
    image: dessalines/lemmy:0.17.3
    hostname: lemmy
    networks:
      - lemmyinternal
      - lemmybridge
    restart: always

(leave the rest as is, you can name the new network however you want)

[–] tekeous 2 points 1 year ago (1 children)

You're a bloody genius, thank you, that appears to have solved the problem.

[–] pe1uca@lemmy.pe1uca.dev 1 points 1 year ago

Nice! This confirms it, I'll check tomorrow to share this in the repo to update the documentation.

[–] lodion@aussie.zone 1 points 1 year ago (1 children)

As a logged in user have you tried searching for a remote community such as: !lemmy_support@lemmy.ml

[–] tekeous 1 points 1 year ago (1 children)

Nothing comes up on my server. Other servers can see me.

[–] lodion@aussie.zone 1 points 1 year ago

Create a community on your instance to test with.

load more comments
view more: next ›