Opened 8 months ago

Closed 7 months ago

Last modified 7 months ago

#3036 closed task (fixed)

Mastodon search for strk@video.osgeo.org yelds: 503 Remote data could not be fetched

Reported by: strk Owned by: sac@…
Priority: normal Milestone: Sysadmin Contract 2024-I
Component: SysAdmin/Peertube Keywords:
Cc:

Description

Searching for strk@… on a mastodon instance yeld no results but an error 503 Remote data could not be fetched

But you can find jsanz@… or foss4g@… just fine

Logs contain this:

2023/11/24 20:53:31 [error] 494#494: *69168 connect() failed (111: Connection refused) while connecting to upstream, client: 57.128.95.182, server: video.osgeo.org, request: "GET /.well-known/webfinger?resource=acct:strk@video.osgeo.org HTTP/1.0", upstream: "http://[::1]:9000/.well-known/webfinger?resource=acct:strk@video.osgeo.org", host: "video.osgeo.org"

But similar log entries exist for aryang257@… who can also be found just fine from Mastodon, so I don't know what's going on exactly.

Change History (15)

comment:1 by strk, 8 months ago

See also #3035

comment:2 by strk, 8 months ago

The change in https://trac.osgeo.org/osgeo/ticket/3035#comment:2 did not change my experience with the 503 Remote data could not be fetched issue.

The webfinger for strk@video.osgeo.org can be checked for example with this generic client: https://webfinger.net/lookup/?resource=strk%40video.osgeo.org

At this very moment the webfinger returned is:

{
  "subject": "acct:strk@video.osgeo.org",
  "aliases": [
    "https://videos.osgeo.org/accounts/strk"
  ],
  "links": [
    {
      "rel": "self",
      "type": "application/activity+json",
      "href": "https://videos.osgeo.org/accounts/strk"
    },
    {
      "rel": "http://ostatus.org/schema/1.0/subscribe",
      "template": "https://video.osgeo.org/remote-interaction?uri={uri}"
    }
  ]
}

The webfinger for jsanz is pretty much the same:

{
  "subject": "acct:jsanz@video.osgeo.org",
  "aliases": [
    "https://video.osgeo.org/accounts/jsanz"
  ],
  "links": [
    {
      "rel": "self",
      "type": "application/activity+json",
      "href": "https://video.osgeo.org/accounts/jsanz"
    },
    {
      "rel": "http://ostatus.org/schema/1.0/subscribe",
      "template": "https://video.osgeo.org/remote-interaction?uri={uri}"
    }
  ]
}

So I think that part (webfinger) works.

This then becomes a difference beween:

Unfortunately I don't get any result by searching the above URIs. Could be a Mastdon issue, will take a look

in reply to:  2 ; comment:3 by robe, 8 months ago

So I think that part (webfinger) works.

This then becomes a difference beween:

Unfortunately I don't get any result by searching the above URIs. Could be a Mastdon issue, will take a look

Just checking you know you've got a typo there, it's video.osgeo.org not videos.osgeo.org. Remember that was your idea :)

comment:4 by robe, 8 months ago

I did a compare of strk and jsanz account and noticed that

jsanz profile has a checkbox checked

[x] User bypasses video validation by moderators Enable this checkbox if this user doesn't need to have its videos reviewed by moderators.

Where as strk account did not have that box checked. strk I just ticked that box on your account. See if that fixes your issue.

comment:5 by strk, 8 months ago

A possible source of bugs with federation of the OSGeo PeerTube instance was suggested in this post: https://framapiaf.org/@Chocobozzz/111527409253398290

in reply to:  3 comment:6 by strk, 7 months ago

it's video.osgeo.org not videos.osgeo.org. Remember that was your idea :)

Note that I search for "strk@…" (with no final "s") but the webfinger service replies with an URI with the "s" in "videos", see:

https://webfinger.net/lookup/?resource=strk%40video.osgeo.org

I think that's one of the problems

comment:7 by strk, 7 months ago

A search for "​strk@…" on mapstodon.space still yelds no results. I suspect somehow mapstodon.space got to know jsanz@… in some other way because that account I do can find.

comment:8 by strk, 7 months ago

One difference between my peertube account and jsanz' is that he got a follower and I don't, maybe that's also related somehow

comment:9 by strk, 7 months ago

Ah but now I see the webfinger between jsanz and me is different: only mine points to videos.osgeo.org (with the s) while jsanz does not ! Why this happened I've no idea but looks like the probably source of trouble.

comment:10 by robe, 7 months ago

Mine seems to have the same issue https://webfinger.net/lookup/?resource=robe%40video.osgeo.org

Maybe we had logged in before I switched the domain to video.osgeo.org and that is now stuck now in space somewhere.

comment:11 by strk, 7 months ago

I've taken a look at the PostgreSQL backend database and found there are many references to videos.osgeo.org in the "actor" table which are very likely the source of this problem. Possible fixes are:

  1. Make videos.osgeo.org redirect to video.osgeo.org
  2. Update the database to replace videos.osgeo.org with video.osgeo.org

Option 1 will ALSO work for such references present on foreign databases (in case some ActivityPub actor from a foreign server ever "followed" the old names); unlikely BUT we probably have NO WAY to tell, other than re-add a DNS record for that name and log HTTP requests there.

comment:12 by robe, 7 months ago

Milestone: UnplannedSysadmin Contract 2024-I
Resolution: fixed
Status: newclosed

Okay I did this update in the db and seems to have fixed our webfingers

su postgres
psql -d peertube_prod

-- in psql
UPDATE actor SET "outboxUrl" = replace("outboxUrl", 'videos.osgeo.org', 'video.osgeo.org'), "inboxUrl" = replace("inboxUrl", 'videos.osgeo.org', 'video.osgeo.org') WHERE "outboxUrl" LIKE '%videos.osgeo.org%';

UPDATE actor SET "url" = replace("url", 'videos.osgeo.org', 'video.osgeo.org')
	, "sharedInboxUrl" = replace("sharedInboxUrl", 'videos.osgeo.org', 'video.osgeo.org') 
	, "followersUrl" = replace("followersUrl", 'videos.osgeo.org', 'video.osgeo.org') 
	, "followingUrl" = replace("followingUrl", 'videos.osgeo.org', 'video.osgeo.org') 
	WHERE "url" LIKE '%videos.osgeo.org%';


UPDATE "actorFollow" SET url = replace(url, 'videos.osgeo.org', 'video.osgeo.org') WHERE url LIKE '%videos.osgeo.org%';

It updated 9 records of which two were ours.

I confirm I can now follow robe@… on my mapstodon account where as I couldn't before.

comment:13 by strk, 7 months ago

I confirm I can now find my peertube account, but I'm having other problems with finding videos from mastodon, did you have a read at https://docs.joinpeertube.org/maintain/tools#update-peertube-instance-domain-name ?

in reply to:  3 comment:14 by neteler, 7 months ago

Replying to robe:

Just checking you know you've got a typo there, it's video.osgeo.org not videos.osgeo.org. Remember that was your idea :)

Silly proposal: have videos.osgeo.org as a DNS alias? This kind of typo-creeping-in will continue for sure... (IMHO video.osgeo.org is pretty counter-intuitive).

comment:15 by strk, 7 months ago

I don't think the idea is silly, but the SSL certificates will only be valid for one or the other so it cannot be an alias but can be a redirect, which is what I already proposed and was considered overkill for a service which honestly was just born when we switched names. What is it that you find counter-intuitive ? It matches with "trac" and "git" and "www" and "discourse" none of which is plural

Note: See TracTickets for help on using tickets.