Coder Social home page Coder Social logo

Comments (16)

MrPetovan avatar MrPetovan commented on August 18, 2024 1

"Service unavailable" means that your server load average has reached the limit Friendica uses to cut any call short. This limit can be configured in the admin panel or via command line.

from docker.

alyasirko avatar alyasirko commented on August 18, 2024

Same here. Docker, Traefik, and reverse proxy with Caddy.

image

But https://derpy.email/.well-known/host-meta is reachable.

from docker.

nupplaphil avatar nupplaphil commented on August 18, 2024

I found a solution for this issue with using extra_hosts:

app:
    image: friendica/server:rc-fpm-alpine
    command: "php-fpm -d date.timezone=${TZ} -d expose_php=0"
    depends_on:
      - db
      - redis
    volumes:
     - friendica-vol-1:/var/www/html
    environment:
      - MYSQL_USERNAME=${DBUSER}
      - MYSQL_PASSWORD=${DBPASS}
      - MYSQL_DATABASE=${DBDATA}
      - MYSQL_HOST=${DBHOST}
      - MYSQL_PORT=${DBPORT}
      - FRIENDICA_ADMIN_MAIL=${MAILNAME}
      - FRIENDICA_TZ=${TZ}
      - FRIENDICA_LANG=${LANGUAGE}
      - FRIENDICA_UPGRADE=true
      - REDIS_HOST=redis
      - FRIENDICA_DATA=true
      - FRIENDICA_DEBUGGING=true
      - SMTP=mail
      - SITENAME=${SITENAME}
    restart: always
    extra_hosts:
       - "friendica.philipp.info:172.18.0.2"
       - "opensocial.at:172.18.0.2"

172.18.0.2 is the local IP of the docker gateway. Now a ping of the own hostname will redirect to the gateway and answer inside the local vlan rather than trying to ping ourselfs from the outside.
=> The messages vanished and the Curls to the own hostname now works :)

@commagray can you check it, if this will solve your message too? And if #99 is now working? I've the fear that #99 is not caused by this issue

from docker.

alyasirko avatar alyasirko commented on August 18, 2024

Uhh. I tried these options (separatly and together):

    extra_hosts:
      - "derpy.email:192.168.96.3"
      - "derpy.email:172.18.0.3"
      - "derpy.email:172.18.0.2"
      - "derpy.email:172.18.0.13"

All of IPs I've seen in docker inspect.

Nope, I still have the message.

image

And I still affected by #99.

from docker.

alyasirko avatar alyasirko commented on August 18, 2024

Some logs?

2020-01-05 23:32:01 index [WARNING]: error: https://derpy.email/.well-known/host-meta: 0 - Failed to connect to derpy.email port 443: Connection refused [] - {"file":"CurlResult.php","line":150,"function":"checkSuccess","uid":"26e8ae","process_id":22956}
2020-01-05 23:32:53 index [WARNING]: error: https://derpy.email/.well-known/host-meta: 0 - Failed to connect to derpy.email port 443: Connection refused [] - {"file":"CurlResult.php","line":150,"function":"checkSuccess","uid":"84aa99","process_id":22882}
2020-01-05 23:34:18 index [WARNING]: error: https://derpy.email/.well-known/host-meta: 0 - Failed to connect to derpy.email port 443: Connection refused [] - {"file":"CurlResult.php","line":150,"function":"checkSuccess","uid":"80c32e","process_id":22952}
2020-01-05 23:35:40 index [WARNING]: API call - not implemented {"module":"api","action":"call","query":"api\/v1\/custom_emojis"} - {"file":"api.php","line":369,"function":"api_call","uid":"149226","process_id":22951}
2020-01-05 23:38:44 index [WARNING]: error: https://derpy.email/.well-known/host-meta: 0 - Failed to connect to derpy.email port 443: Connection refused [] - {"file":"CurlResult.php","line":150,"function":"checkSuccess","uid":"064762","process_id":22956}
2020-01-05 23:38:58 index [NOTICE]: Addon rendertime: install {"action":"install","addon":"rendertime"} - {"file":"Addon.php","line":175,"function":"install","uid":"bfd6a1","process_id":22951}
2020-01-05 23:41:17 worker [WARNING]: error: https://derpy.email/images/person-300.jpg: 0 - Failed to connect to derpy.email port 443: Connection refused {"worker_id":"86271e0","worker_cmd":"UpdateContact"} - {"file":"CurlResult.php","line":150,"function":"checkSuccess","uid":"3c7c6b","process_id":24233}
2020-01-05 23:41:34 index [NOTICE]: no data for session {"session_id":"49102274e35ba780041aedd6dd44da5a","uri":"\/robots.txt"} - {"file":"CacheSessionHandler.php","line":35,"function":"read","uid":"00e394","process_id":22956}
2020-01-05 23:49:01 index [WARNING]: error: https://mastodon.social/users/jacquespoilu: 410 -  [] - {"file":"CurlResult.php","line":150,"function":"checkSuccess","uid":"0851f5","process_id":22884}
2020-01-05 23:49:01 index [WARNING]: error: https://mastodon.social/users/jacquespoilu: 410 -  [] - {"file":"CurlResult.php","line":150,"function":"checkSuccess","uid":"0851f5","process_id":22884}
2020-01-05 23:49:01 index [WARNING]: Invalid HTTP signature, message will be discarded. [] - {"file":"Receiver.php","line":68,"function":"processInbox","uid":"0851f5","process_id":22884}
2020-01-05 23:49:31 index [WARNING]: error: https://derpy.email/.well-known/host-meta: 0 - Failed to connect to derpy.email port 443: Connection refused [] - {"file":"CurlResult.php","line":150,"function":"checkSuccess","uid":"639c36","process_id":22958}

Yup, I can't curl https://derpy.email inside the container, but can curl http://derpy.email.

from docker.

alyasirko avatar alyasirko commented on August 18, 2024

Okay, so my solution was absolutely vice versa, lol.

    environment:
      - MYSQL_HOST=db
      - MYSQL_USER=[REDACTED]
      - MYSQL_PASSWORD=[REDACTED]
      - MYSQL_DATABASE=[REDACTED]
      - FRIENDICA_ADMIN_MAIL=[REDACTED]
+     - FRIENDICA_UPGRADE=false
+     - FRIENDICA_SITENAME=derpy.email
+     - SITENAME=derpy.email
-   hostname: derpy.email
+   #hostname: derpy.email
    depends_on:
      - db
    networks:
      - internal
      - proxy
    labels:
      - traefik.enable=true
      - traefik.backend=derpapp
      - traefik.docker.network=proxy
      - traefik.port=80
      - traefik.frontend.rule=Host:derpy.email
      - com.centurylinklabs.watchtower.enable=true
-   extra_hosts:
-     - "derpy.email:192.168.96.3"
-     - "derpy.email:172.18.0.3"
-     - "derpy.email:172.18.0.2"
-     - "derpy.email:172.18.0.13"
+   #extra_hosts:
+   #  - "derpy.email:192.168.96.3"
+   #  - "derpy.email:172.18.0.3"
+   #  - "derpy.email:172.18.0.2"
+   #  - "derpy.email:172.18.0.13"

Seems fixed the message. Still, I need to test my federation with #99.

from docker.

nupplaphil avatar nupplaphil commented on August 18, 2024

Hmm... Are mails still working with this setup? I guess not.. Hostname is used for the smtp setup. So you deleted the Hostname parameter and now the instance doesn't know anymore that derpy.email is your local container and tries to ping it "again" from the outside..

But maybe that's a valid solution.. Maybe I "just" have to use another env for the mail host.. Thx for the tests!!

from docker.

alyasirko avatar alyasirko commented on August 18, 2024

I use the “PHP Mailer SMTP” addon, so no issues in my setup.

But, yeah, with turned off addon emails seem not working.

from docker.

nupplaphil avatar nupplaphil commented on August 18, 2024

Hmkay.. I think I'll remove the hostname usage, this should fix this issue

from docker.

alyasirko avatar alyasirko commented on August 18, 2024

Now it happens again.

image

root@f267927c8e73:/var/www/html# curl http://localhost/.well-known/host-meta
<html>
        <head>
                <title>Service Unavailable</title>
        </head>
        <body>
                <h1>Service Unavailable</h1>
                <p></p>
        </body>
</html>

But if you give it some time it'll be fine again. The worker seems not working?

from docker.

nupplaphil avatar nupplaphil commented on August 18, 2024

This didn't work as well .. I still have Timeouts when pinging my own node ..

2020-03-04T22:31:52Z index [WARNING]: error: https://friendica.philipp.info/.well-known/host-meta: 0 - Connection timed out after 20000 milliseconds [] - {"file":"CurlResult.php","line":169,"function":"checkSuccess","uid":"3d09f3","process_id":225}

from docker.

iannuzzelli avatar iannuzzelli commented on August 18, 2024

I was having the same issue, and it was solved by adding the extra_hosts section, mind that the gateway IP may change depending on your docker setup (in my case is 172.17.0.1)

from docker.

nupplaphil avatar nupplaphil commented on August 18, 2024

This is really not a good solution :-/

Maybe I can have a look for the root cause and fix it ..

from docker.

nupplaphil avatar nupplaphil commented on August 18, 2024

I think that this issue isn't "solvable" within the docker image code. It's a general problem with curl/fetching inside the docker network environment .. But I don't have any good idea for a better solution than mapping the gateway IP to the local node hostnames ... So if somebody has a better idea, I will add it to the ".examples" directory as best practice .. meanwhile this issue will stay open until found :-)

from docker.

elrido avatar elrido commented on August 18, 2024

Not a better idea, but a little extra information nugget: As the internal gateway IP can change, I've instead mapped the sites hostname to the external static IP of the gateway service. This adds a little latency, but won't change without my intervention.

I've got to be honest - I had noticed this message ever since I switched my former installation to this container image. Had ignored it, assuming it was just an internal check. Since the upgrade to 2021.07 I didn't get any ActivityPub updates any more - I suspect this setting is now necessary due to friendica/friendica#10257

from docker.

scifijunk avatar scifijunk commented on August 18, 2024

Well, I just hit this problem today. The only thing I changed was updating Nginx Proxy Manager to v2.10.3. It appears that my node still seems to see other nodes and I'm able to follow contacts. I'm also seeing the Message queues going up and down like normal. I'm not sure if people can follow me or see me on their nodes.

I'm kinda at a loss for what to do since on the one hand it looks like it's working as normal and on the other hand I have this error that says it's not.

Update: I think I fixed the problem on my end. It seems it did not like the SSL I set up in Nginx Proxy Manager so I redid it. When I did that the error went away. So maybe check your SSL and make sure it's set right.

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.