Skip to main content


!Friendica Admins

This is Joseph. I finally got my new friendica node up and running. Not for the faint of hear


It is running, as you can see my message.

While I know that I have a few things to set up, I was reading over the doc's and it talked about adding a relay. This way, get more traffic and will see posts outside of my ultra tiny circle of contacts(myself at the moment, and friendica admin and support forums!)

They say go to the command line and enter the add relay command with the relay domain question:
bin/console relay add https://relay.example.com/actor

But, the command line spits out the error:
-bash: bin/console: No such file or directory

What might I have missed during my install so that the bin/conssole command is not availabe?

How can I fix it?

Thanks for any help!

Joseph

Friendica Admins reshared this.

in reply to Joseph

Are you executing this command in the Friendica folder? Please also check that this script is set to "executable".
in reply to Joseph

finally got my new friendica node up and running


🎉🎉🎉

Sounds like you're not in the correct directory. You should be in the root of your installation. E.g. /var/www/friendica
@joseph

in reply to Joseph

@Andy H3 and @Michael Vogel

Thanks guys for the quick reply.

I forgot about being in the friendica folder. I'll do that.

@Michael Vogel you mention something about making sure that the script is executable. We are talking about what script?

Thanks again

Friendica Admins reshared this.

in reply to Joseph

Just see if it works without changing the file permissions first.

https://linuxize.com/post/understanding-linux-file-permissions/

@joseph

This entry was edited (2 months ago)
in reply to Joseph

@Andy H3
@Michael Vogel
Well, entered the command as I showed before, replacing the relay site:

bin/console relay add https://relay.mycrowd.ca/actor

It fails, shpowing this:
https://relay.mycrowd.ca/actor couldn't be added

The site is not accepting any? Or, there might be another issue?

You have any suggestions for other good relays?

Thanks

Friendica Admins reshared this.

in reply to Joseph

Choose here:
https://relaylist.com/

@joseph @Michael Vogel

in reply to Joseph

@Andy H3 @Michael Vogel

Thanks for the relay list. Lots to choose from:)

I tried one of them and the same error pops up again.

Why might the relay is not being added?

Thanks for any clues.

Joseph

Friendica Admins reshared this.

in reply to Joseph

Oh. Hard to say what's happening.

I had problems removing a relay some time ago.

Can you post the exact error message here? Hopefully someone else might be able figure out what's the cause of this.

@joseph

in reply to Andy H3

I noted the message:

https://relay.mycrowd.ca/actor couldn't be added

That is the error message.

Friendica Admins reshared this.

Unknown parent

Hypolite Petovan
@joseph @Michael Vogel @Andy H3 You can try increasing the verbosity of the command by adding the -v flag like this:
bin/console -v relay add https://relay.mycrowd.ca/actor

Let us know if it shows more.
in reply to Hypolite Petovan

@Michael Vogel
@Andy H3

I entered the command just as @Hypolite Petovan typed it in, and it does not like it. Here is the result:
root@social:/var/www/html# bin/console -v relay add https://relay.mycrowd.ca/actor
Executable: /var/www/html/bin/console.php
Arguments: array (
0 => 'add',
1 => 'https://relay.mycrowd.ca/actor',
)
Options: array (
'v' => 'relay',
)
Command: add
[Warning] Command add doesn't exist

Usage: bin/console [--version] [-h|--help|-?] <command> [<args>] [-v]

Commands:
addon Addon management
cache Manage node cache
config Edit site config
contact Contact management
createdoxygen Generate Doxygen headers
dbstructure Do database updates
docbloxerrorchecker Check the file tree for DocBlox errors
extract Generate translation string file for the Friendica project (deprecated)
globalcommunityblock Block remote profile from interacting with this node
globalcommunitysilence Silence a profile from the global community page
archivecontact Archive a contact when you know that it isn't existing anymore
help Show help about a command, e.g (bin/console help config)
autoinstall Starts automatic installation of friendica based on values from htconfig.php
lock Edit site locks
maintenance Set maintenance mode for this node
movetoavatarcache Move cached avatars to the file based avatar cache
mergecontacts Merge duplicated contact entries
user User management
php2po Generate a messages.po file from a strings.php file
po2php Generate a strings.php file from a messages.po file
typo Checks for parse errors in Friendica files
postupdate Execute pending post update scripts (can last days)
relocate Update node base URL
serverblock Manage blocked servers
storage Manage storage backend
relay Manage ActivityPub relay servers

Options:
-h|--help|-? Show help information
-v Show more debug information.
[Backtrace]:
#0 /var/www/html/src/Core/Console.php(157): Friendica\Core\Console->getSubConsole()
#1 /var/www/html/vendor/asika/simple-console/src/Console.php(108): Friendica\Core\Console->doExecute()
#2 /var/www/html/bin/console.php(45): Asika\SimpleConsole\Console->execute()
#3 {main}

Thanks for any ideas.

Friendica Admins reshared this.

in reply to Joseph

@joseph Sorry, it maybe the other way around:
bin/console relay add https://relay.mycrowd.ca/actor -v
in reply to Joseph

@Hypolite Petovan

Thanks for the change.

Here is the new output:
root@social:/var/www/html# bin/console relay add https://relay.mycrowd.ca/actor -v
Executable: /var/www/html/bin/console.php
Arguments: array (
0 => 'relay',
1 => 'add',
2 => 'https://relay.mycrowd.ca/actor',
)
Options: array (
'v' => 1,
)
Command: relay
Executable: /var/www/html/bin/console.php
Class: Friendica\Console\Relay
Arguments: array (
0 => 'add',
1 => 'https://relay.mycrowd.ca/actor',
)
Options: array (
'v' => 1,
)
https://relay.mycrowd.ca/actor couldn't be added

Friendica Admins reshared this.

in reply to Joseph

I tried, but no luck.

What does the error say?

I am still stuck with out the ability to add a relay. I am still open to other possible ideas on how to add them.

Anyone?

Thanks

Friendica Admins reshared this.

in reply to Joseph

@Andy H3 @Michael Vogel @Hypolite Petovan

I decided to look around and found no clues on the internet as to my issue. Only one conversation on github which did not lead to a solution.

Do I need to keep or remove the https://??

Examples show them being used.

Thanks

Friendica Admins reshared this.

in reply to Joseph

It is possible that the relay servers that you tried aren't open. I just tested successfully with this one:
bin/console relay add https://relay.kretschmann.social/actor
in reply to Michael Vogel

I thought of that too, so off the list at the website:
relaylist.com

I added about 12 of them that were noted as on and working.

none of them work.

In addition, you got one to work that failed for me.

Is there a way to log exactly what the command does to see where it errors, or says where/why the decision is made that it does not work?

Friendica Admins reshared this.

in reply to Michael Vogel

I'll check it out.

When searching, can I search for details using "relay add"?

Thanks

Friendica Admins reshared this.

in reply to Joseph

You have to check for the relay that you wanted to add. And then you have to check the following entries. But since I'm currently still at work, I don't have to time to explain further. I hope that I can do this in the evening.
in reply to Michael Vogel

Here are some of the extries relating to the adding ofthe same relay that you tried:


2024-02-29T11:43:54Z console [DEBUG]: Contact found {"url":"https://relay.mycrowd.ca/actor","uid":0,"update":null,"cid":8301} - {"file":"Contact.php","line":1330,"fun>
2024-02-29T11:43:54Z console [INFO]: Sending activity Follow to https://relay.mycrowd.ca/actor for user 0 [] - {"file":"Transmitter.php","line":2247,"function":"sendA>
2024-02-29T11:43:54Z console [DEBUG]: Request start. {"url":"https://relay.mycrowd.ca/inbox","method":"post"} - {"file":"HttpClient.php","line":69,"function":"request>
2024-02-29T11:43:54Z console [DEBUG]: http request config. {"url":"https://relay.mycrowd.ca/inbox","method":"post","options":{"headers":{"User-Agent":"Friendica 'Yell>

2024-02-29T11:44:02Z console [DEBUG]: Request stop. {"url":"https://relay.mycrowd.ca/inbox","method":"post"} - {"file":"HttpClient.php","line":186,"function":"request>
2024-02-29T11:44:02Z console [INFO]: Transmit to https://relay.mycrowd.ca/inbox returned 500 [] - {"file":"HTTPSignature.php","line":307,"function":"post","request-id>


2024-02-29T21:17:55Z worker [DEBUG]: Got ID for URL {"id":2094,"url":"https://mycrowd.ca","worker_id":"cd28d39","worker_cmd":"UpdateServerDirectories"} - {"file":"GSe>

2024-03-01T01:58:14Z console [DEBUG]: Contact found {"url":"https://relay.mycrowd.ca/actor","uid":0,"update":null,"cid":8301} - {"file":"Contact.php","line":1330,"fun>
2024-03-01T01:58:14Z console [INFO]: Sending activity Follow to https://relay.mycrowd.ca/actor for user 0 [] - {"file":"Transmitter.php","line":2247,"function":"sendA>
2024-03-01T01:58:14Z console [DEBUG]: Request start. {"url":"https://relay.mycrowd.ca/inbox","method":"post"} - {"file":"HttpClient.php","line":69,"function":"request>
2024-03-01T01:58:14Z console [DEBUG]: http request config. {"url":"https://relay.mycrowd.ca/inbox","method":"post","options":{"headers":{"User-Agent":"Friendica 'Yell>

2024-03-01T01:58:25Z console [DEBUG]: Request stop. {"url":"https://relay.mycrowd.ca/inbox","method":"post"} - {"file":"HttpClient.php","line":186,"function":"request>
2024-03-01T01:58:25Z console [INFO]: Transmit to https://relay.mycrowd.ca/inbox returned 500 [] - {"file":"HTTPSignature.php","line":307,"function":"post","request-id>


When looking in the log, I saw a number of entries that seems to say that other relays(I have yet to add one, so they came upon installation somehow)

2024-02-27T17:06:55Z worker [NOTICE]: Url not reachable {"host":"activityrelay.krbonne.net","url":"https://activityrelay.krbonne.net","worker_id":"b69ca32","worker_cm>


Does any of this conjure up any reasons as to why my relays can not be added?

Thanks

Joseph

Friendica Admins reshared this.

in reply to Joseph

"Transmit to https://... returned 500" tells that the remote site returned the error 500, which is an error on their side. When you had received an error in the 400, this would indicate for example permission issues.
in reply to Michael Vogel

I got the "500" error on the same relay that you added.

Why might this be?

Friendica Admins reshared this.

in reply to Joseph

Maybe the relay is unreliable. I guess the best way to check this is to visit the relay. Just add the relay link in your browser, omit the /actor in the end and have a look if the remote system looks healthy or if the page doesn't load at all or shows some weird error.
in reply to Michael Vogel

Hi there. I can do that.

I already tried adding about 12 relays off that site @Andy H3 gave me.

Do you know of any reliable ones?

I'll keep trying. Hopefully I can find 1 o 2 that stick.

Friendica Admins reshared this.

in reply to Joseph

I only subscribed to relay systems with mostly German servers on it. How good is your German? :-)
in reply to Michael Vogel

Besides 2-3 words, well, non existant:)

French and English is what I want:)

Friendica Admins reshared this.

in reply to Michael Vogel

On the relay site, it lists the contact person, so I can contact the admin to work with them, I suppose.


@Michael Vogel
@Andy H3

Friendica Admins reshared this.

in reply to Joseph

Some servers restrict who can subscribe. So in that case it is helpful to contact that person.
in reply to Joseph

Also that one worked out for me:
bin/console relay add https://relay.mycrowd.ca/actor
in reply to Joseph

Well, I have gone through about 1/3 fo the relays on the relaylist.com page. They either:
can not add relay
this site is not a relay

I will keep trying the rest of the ones on the list. I will also try and figure out how to contact the admin of the sites and try and work with them.

In the meantime, if any of you use or know of bonifide working English or French language relays, I'd be happy to hear from you:)

Thanks for any leads:)

Friendica Admins reshared this.

in reply to Joseph

Hi again,

I tried half of the relays on the relaylist.com page. Either they do not work, or it says that they are not a relay.

Frustrating!

Now, I wanto contact the admins on those sites.

How via friendica?

The contact person address is:
@admin@c.im

I tried via the friendica message system, but it will not send.

Do I have the right email message format?

Thanks for any help

Friendica Admins reshared this.

in reply to Joseph

@joseph @Friendica Admins

The relays come and go like the wind.

Some require registration. Some are completely open.

Remember to filter to block tags.

in reply to Fly Boy

nice o know that they come an dgo. I'll keep this in mind.

As for the filtering and blocking, what is this for(maybe to remove unwanted words? Tags can be added to remove messages with those tags?)

Thanks

Friendica Admins reshared this.

in reply to Joseph

@joseph @Friendica Admins

Use have to run the command from within the friendica install directory.

Also don't run as root but as the user that is running PHP.

I am running on debian 12 with apache. Therefore I run from the install directory:

sudo -u www-data -- php bin/console

Friendica Admins reshared this.

in reply to Fly Boy

@Fly Boy
@Andy H3
@Michael Vogel
@Hypolite Petovan

I checked my bin permissions:
4 drwxrwxr-x 3 www-data www-data 4096 Feb 20 13:39

Is this where I run the command you noted?

YOU noted that I cannot run as root. Well, I always did. I will stop running as admin.

When I did execute the command, I get this result:


PHP Warning: include(/var/www/html/config/local.config.php): Failed to open stream: Permission denied in /var/www/html/src/Core/Config/Util/ConfigFileManager.php on line 362
PHP Warning: include(): Failed opening '/var/www/html/config/local.config.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/src/Core/Config/Util/ConfigFileManager.php on line 362
PHP Fatal error: Uncaught Friendica\Core\Config\Exception\ConfigFileException: Error loading config file /var/www/html/config/local.config.php in /var/www/html/src/Core/Config/Util/ConfigFileManager.php:365
Stack trace:
#0 /var/www/html/src/Core/Config/Util/ConfigFileManager.php(162): Friendica\Core\Config\Util\ConfigFileManager->loadConfigFile()
#1 /var/www/html/src/Core/Config/Util/ConfigFileManager.php(112): Friendica\Core\Config\Util\ConfigFileManager->loadCoreConfig()


The first few were PHP warning. Is this why you said to change it to run as PHP?

Thanks

Friendica Admins reshared this.

in reply to Joseph

@Joseph @Michael Vogel @Hypolite Petovan @Andy H3 @Friendica Admins

There are instructions to set the owner of the files and directories to www-data

cd /var/www/html
chown -R www-data:www-data *

Aldo, the instructions cover the permissions for folders & files.

Friendica Admins reshared this.

in reply to Joseph

Hi @Fly Boy

I've not yet resolved my issue, but I was not able to sit down and play with friendica for a few days.

I went in and saw that my bin folder is:
4 drwxrwxr-x 3 www-data www-data 4096 Feb 20 13:39 bin

I went inside the bin flder and saw:
4 drwxrwxr-x 3 www-data www-data 4096 Feb 20 13:39 .
4 drwxrwxr-x 21 www-data www-data 4096 Feb 23 07:39 ..
4 -rwxrwxr-x 1 www-data www-data 3482 Feb 11 01:30 auth_ejabberd.php
1948 -rwxrwxr-x 1 www-data www-data 1993462 Feb 11 01:30 composer.phar
4 -rwxrwxr-x 1 www-data www-data 274 Feb 11 01:30 console
4 -rwxrwxr-x 1 www-data www-data 125 Feb 11 01:30 console.bat
4 -rwxrwxr-x 1 www-data www-data 1772 Feb 11 01:30 console.php
8 -rwxrwxr-x 1 www-data www-data 7059 Feb 11 01:30 daemon.php
4 drwxrwxr-x 3 www-data www-data 4096 Feb 11 01:30 dev
4 -rw-rw-r-- 1 www-data www-data 363 Feb 11 01:30 .htaccess
4 -rwxrwxr-x 1 www-data www-data 3592 Feb 11 01:30 run_xgettext.sh
4 -rw-rw-r-- 1 www-data www-data 1404 Feb 11 01:30 testargs.php
4 -rwxrwxr-x 1 www-data www-data 1964 Feb 11 01:30 wait-for-connection
4 -rwxrwxr-x 1 www-data www-data 2852 Feb 11 01:30 worker.php

all my files and folder all have the owners of www-data www-data
YOu can see the permissions are all 775 withthe exceotion of:
.htaccess
testargs.php

You asked me to run that command to change to www-data, but my foled and folders already have that.


What else might I look for to resolve the issue about what I can no successfully at the relays to my server?

Thanks

@Michael Vogel @Hypolite Petovan @Andy H3

Friendica Admins reshared this.

in reply to Joseph

Bumping the thread as I'm going through a similar issue. Setting my logger to debug mode when attempting to follow https://relay.toot.io/actor gives me the following:


Click to open/close
2024-03-13T14:57:31Z console [DEBUG]: Contact found {"url":"https://relay.toot.io/actor","uid":0,"update":null,"cid":697045} - {"file":"Contact.php","line":1330,"function":"getIdForURL","request-id":"65f1bedbc28d4","stack":"Contact::getIdForURL (333), Contact::getByURL (113), Transmitter::sendRelayFollow (118), Relay::doExecute (108), Console::execute (163), Console::doExecute (108), Console::execute (45)","uid":"5d54b5","process_id":872113}
2024-03-13T14:57:31Z console [INFO]: Sending activity Follow to https://relay.toot.io/actor for user 0 [] - {"file":"Transmitter.php","line":2236,"function":"sendActivity","request-id":"65f1bedbc28d4","stack":"Transmitter::sendActivity (119), Transmitter::sendRelayFollow (118), Relay::doExecute (108), Console::execute (163), Console::doExecute (108), Console::execute (45)","uid":"5d54b5","process_id":872113}
2024-03-13T14:57:31Z console [DEBUG]: Request start. {"url":"https://relay.toot.io/inbox","method":"post"} - {"file":"HttpClient.php","line":69,"function":"request","request-id":"65f1bedbc28d4","stack":"HttpClient::request (230), HttpClient::post (304), HTTPSignature::post (325), HTTPSignature::transmit (2239), Transmitter::sendActivity (119), Transmitter::sendRelayFollow (118), Relay::doExecute (108), Console::execute (163), Console::doExecute (108), Console::execute (45)","uid":"5d54b5","process_id":872113}
2024-03-13T14:57:31Z console [DEBUG]: http request config. {"url":"https://relay.toot.io/inbox","method":"post","options":{"headers":{"User-Agent":"Friendica 'Yellow Archangel' 2024.03-rc-1556; https://hub.azkware.net","Date":"Wed, 13 Mar 2024 14:57:31 GMT","Content-Length":1956,"Digest":"SHA-256=[REDACTED]=","Host":"relay.toot.io","Signature":"keyId=\"https://hub.azkware.net/friendica#main-key\",algorithm=\"rsa-sha256\",headers=\"(request-target) date content-length digest host\",signature=\"[REDACTED]\"","Content-Type":"application/activity+json"},"timeout":60,"body":"{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/v1\",{\"ostatus\":\"http://ostatus.org#\",\"vcard\":\"http://www.w3.org/2006/vcard/ns#\",\"dfrn\":\"http://purl.org/macgirvin/dfrn/1.0/\",\"diaspora\":\"https://diasporafoundation.org/ns/\",\"litepub\":\"http://litepub.social/ns#\",\"toot\":\"http://joinmastodon.org/ns#\",\"featured\":{\"@id\":\"toot:featured\",\"@type\":\"@id\"},\"schema\":\"http://schema.org#\",\"manuallyApprovesFollowers\":\"as:manuallyApprovesFollowers\",\"sensitive\":\"as:sensitive\",\"Hashtag\":\"as:Hashtag\",\"quoteUrl\":\"as:quoteUrl\",\"conversation\":\"ostatus:conversation\",\"directMessage\":\"litepub:directMessage\",\"discoverable\":\"toot:discoverable\",\"PropertyValue\":\"schema:PropertyValue\",\"value\":\"schema:value\"}],\"id\":\"https://hub.azkware.net/activity/39afe28c-7282-2516-8411-f31887056896\",\"type\":\"Follow\",\"actor\":\"https://hub.azkware.net/friendica\",\"object\":\"https://relay.toot.io/actor\",\"instrument\":{\"type\":\"Service\",\"name\":\"Friendica 'Yellow Archangel' 2024.03-rc-1556\",\"url\":\"https://hub.azkware.net\"},\"to\":[\"https://relay.toot.io/actor\"],\"signature\":{\"type\":\"RsaSignature2017\",\"nonce\":\"[REDACTED]\",\"creator\":\"https://hub.azkware.net/friendica#main-key\",\"created\":\"2024-03-13T14:57:31Z\",\"signatureValue\":\"[REDACTED]"}}","on_headers":{},"sink":"/tmp/hub.azkware.net/http-nWCFcj"}} - {"file":"HttpClient.php","line":170,"function":"request","request-id":"65f1bedbc28d4","stack":"HttpClient::request (230), HttpClient::post (304), HTTPSignature::post (325), HTTPSignature::transmit (2239), Transmitter::sendActivity (119), Transmitter::sendRelayFollow (118), Relay::doExecute (108), Console::execute (163), Console::doExecute (108), Console::execute (45)","uid":"5d54b5","process_id":872113}
2024-03-13T14:57:32Z console [DEBUG]: Request stop. {"url":"https://relay.toot.io/inbox","method":"post"} - {"file":"HttpClient.php","line":186,"function":"request","request-id":"65f1bedbc28d4","stack":"HttpClient::request (230), HttpClient::post (304), HTTPSignature::post (325), HTTPSignature::transmit (2239), Transmitter::sendActivity (119), Transmitter::sendRelayFollow (118), Relay::doExecute (108), Console::execute (163), Console::doExecute (108), Console::execute (45)","uid":"5d54b5","process_id":872113}
2024-03-13T14:57:32Z console [INFO]: Transmit to https://relay.toot.io/inbox returned 400 [] - {"file":"HTTPSignature.php","line":307,"function":"post","request-id":"65f1bedbc28d4","stack":"HTTPSignature::post (325), HTTPSignature::transmit (2239), Transmitter::sendActivity (119), Transmitter::sendRelayFollow (118), Relay::doExecute (108), Console::execute (163), Console::doExecute (108), Console::execute (45)","uid":"5d54b5","process_id":872113}


Notice that there's an error 400 - our client may be sending the wrong data, and furthermore trying to go directly to https://relay.toot.io/inbox in a browser, with no client headers set, returns the error 400 anyways.

@joseph