snf.wsring.net

Errormessage in admin-overview, and cannot add contact on own server

Hi there!
I have a new friendica installation, and i get this errormessage, when i call the overview in admin-page.

https://friendica.schuerz.at/.well-known/host-meta konnte von deinem System nicht aufgerufen werden. Dies deutet auf ein schwerwiegendes Problem deiner Konfiguration hin. Bitte konsultiere die Installations-Dokumentation zum Beheben des Problems.


But when i got to the link, i can see this host-meta.

What is the problem?

When i want to connect to another profile on my own friendica-server, i get the errormessage that the profile-url is not valid. I read, this is caused by the same problem as with .well-known meta...

Pleas help me.

Thank you
Jakob
Seems as if your server can't connect your server on your server. Means: A request directly on that machine to your machine fails.
hmmm i run friendica in docker (docker-compose)...
And this is my docker-compose.yml

maybe do you see a misconfiguration here...

version: '2'
# Testkommentar

services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql/
environment:
- MYSQL_ROOT_PASSWORD=xxxxxxxxxxxxx
env_file:
- db.env
- smtp.env
- friendica.env
networks:
- proxy-tier

app:
build: ./app
#image: friendica/server:fpm
restart: always
volumes:
- friendica:/var/www/html
- ./app/local.config.php:/var/www/html/config/local.config.php
environment:
- AUTOINSTALL=true
- MAILNAME=friendica.schuerz.at
- TZ=EUROPE/Vienna
- LANGUAGE=de
env_file:
- db.env
- smtp.env
- friendica.env
depends_on:
- db
networks:
- proxy-tier
- default
hostname: friendica.schuerz.at

web:
build: ./web
restart: always
volumes:
- friendica:/var/www/html:ro
- ./web/nginx.conf:/etc/nginx/nginx.conf:ro
environment:
- VIRTUAL_HOST=friendica.schuerz.at
- LETSENCRYPT_HOST=friendica.schuerz.at
- LETSENCRYPT_EMAIL=xxx@yyy.zz
depends_on:
- app
env_file:
- db.env
- smtp.env
- friendica.env
networks:
- proxy-tier
- default

cron:
build: ./app
restart: always
volumes:
- friendica:/var/www/html:ro
- ./app/local.config.php:/var/www/html/config/local.config.php:ro
entrypoint: /cron.sh
env_file:
- db.env
- friendica.env
depends_on:
- db
- app
networks:
- proxy-tier
hostname: friendica.schuerz.at

proxy:
build: ./proxy
restart: always
ports:
- 80:80
- 443:443
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier

letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
volumes:
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- proxy-tier
depends_on:
- proxy

volumes:
db:
friendica:
certs:
vhost.d:
html:

networks:
proxy-tier:
default:
utzer Friendica
@Jakbous Schürz try to use curl to connect to your url from the server, use some verbose output and see what happens.
utzer Friendica
@Jakbous Schürz also check DNS entries with dig and see what ping to your domain does.
On the server itself i can call the host-meta url successfully. Dig shows the correct ip.

Inside the container (web), there is no curl, wget, openssl, nc, ping or something other tool to check a connection... unfortunately.

Maybe it is a docker-problem...
The system does a curl to the own hostname. This is some problem in your setup, not in Friendica itself.
Oh, just now, i got it.
I removed all the lines "hostname: friendica.schuerz.at", and no the overview-page shows no error, and i can connect to the other profile on my host.
I have the config from here https://github.com/friendica/docker/blob/master/.examples/docker-compose/with-traefik-proxy/mariadb-cron-smtp/fpm/docker-compose.yml and modified it to use letsencrypt-companion, wich i use in other containersetups too.
But the hostname: line i've got from friendicas own docker-compose.yml. Maybe this lines are neccessary for traefik, but they are definitely wrong in a config with letsencrypt-companion.
The hostname is necessary as a domain in case of sending mails. I know that there's an issue with the curl-command and the meta-info check in the docker image.

Can you try if mails are still working without the hostname ? And plz open an issue at https://github.com/friendica/docker/issues with all Info's so far so we can track them :-)
This is my working docker-compose.yml

version: '2'
# Testkommentar

services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql/
environment:
- MYSQL_ROOT_PASSWORD=ASDFGJKLÖÄ
env_file:
- db.env
- smtp.env
- friendica.env
networks:
- proxy-tier

app:
image: friendica/server:fpm
restart: always
volumes:
- friendica:/var/www/html
- ./app/local.config.php:/var/www/html/config/local.config.php
environment:
- AUTOINSTALL=true
- MAILNAME=friendica.schuerz.at
- TZ=EUROPE/Vienna
- LANGUAGE=de
env_file:
- db.env
- smtp.env
- friendica.env
depends_on:
- db
networks:
- proxy-tier
- default

web:
image: nginx
restart: always
volumes:
- friendica:/var/www/html:ro
- ./web/nginx.conf:/etc/nginx/nginx.conf:ro
environment:
- VIRTUAL_HOST=friendica.schuerz.at
- LETSENCRYPT_HOST=friendica.schuerz.at
- LETSENCRYPT_EMAIL=XXX@YYY.ZZ
depends_on:
- app
env_file:
- db.env
- smtp.env
- friendica.env
networks:
- proxy-tier
- default

cron:
image: friendica/server:fpm
restart: always
volumes:
- friendica:/var/www/html:ro
- ./app/local.config.php:/var/www/html/config/local.config.php:ro
entrypoint: /cron.sh
env_file:
- db.env
- friendica.env
depends_on:
- db
- app
networks:
- proxy-tier

proxy:
build: ./proxy
restart: always
ports:
- 80:80
- 443:443
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier
- default

letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
volumes:
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- proxy-tier
depends_on:
- proxy

volumes:
db:
friendica:
certs:
vhost.d:
html:

networks:
proxy-tier:
default:



cat proxy/Dockerfile
FROM jwilder/nginx-proxy:alpine

COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf


cat proxy/uploadsize.conf
client_max_body_size 10G;


cat web/nginx.conf
##
# Friendica Nginx configuration
# by Olaf Conradi, modified by Philipp Holzer
#
worker_processes 4;

events {
worker_connections 1024;
}

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

http {
charset utf-8;

include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

# If behind reverse proxy, forwards the correct IP
set_real_ip_from 10.0.0.0/8;
set_real_ip_from 172.16.0.0/12;
set_real_ip_from 192.168.0.0/16;
set_real_ip_from fc00::/7;
real_ip_header X-Real-IP;

upstream php-handler {
server app:9000;
}

server {
listen 80;
#server name social.schuerz.at;
server_name friendica.schuerz.at;

index index.php;

root /var/www/html;
#Uncomment the following line to include a standard configuration file
#Note that the most specific rule wins and your standard configuration
#will therefore *add* to this file, but not override it.
#include standard.conf
# allow uploads up to 20MB in size
client_max_body_size 20m;
client_body_buffer_size 128k;

# rewrite to front controller as default rule
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?pagename=$1;
}
}
# make sure webfinger and other well known services aren't blocked
# by denying dot files and rewrite request to the front controller
location ^~ /.well-known/ {
allow all;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?pagename=$1;
}
}

# statically serve these file types when possible
# otherwise fall back to front controller
# allow browser to cache them
# added .htm for advanced source code editor library
#location ~* \.(jpg|jpeg|gif|png|ico|css|js|htm|html|ttf|woff|svg)$ {
# expires 30d;
# try_files $uri /index.php?pagename=$uri&$args;
#}

include mime.types;

# block these file types
location ~* \.(tpl|md|tgz|log|out)$ {
deny all;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
# or a unix socket
location ~* \.php$ {
# Zero-day exploit defense.
# http://forum.nginx.org/read.php?2,88845,page=3
# Won't work properly (404 error) if the file is not stored on this
# server, which is entirely possible with php-fpm/php-fcgi.
# Comment the 'try_files' line out if you set up php-fpm/php-fcgi on
# another machine. And then cross your fingers that you won't get hacked.
try_files $uri =404;

# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_split_path_info ^(.+\.php)(/.+)$;

fastcgi_pass php-handler;

include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

# deny access to all dot files
location ~ /\. {
deny all;
}
}
}
utzer Friendica
@Jakbous Schürz I don't know about docker, but if the hostname is set to a fqdn the host itself will not resolve the this domain anymore but directly connect to the localhost, which might not work. I found that it is better to use s hostname that is only one part, so maybe "friendica" in your case.

For the config, submit an issue on Github.
@utzer maybe it is neccessary for the traefik-proxy...
I sent me an email to invite another email-account from myself to friendica with the configuration without hostname in docker-compose.yml...

I got the email.

Seems to work now.

I will cleanup my directory for the friendica-docker-compose, and then i publish it to you. if you want, then you have an alterative with letsencrypt, if you want.
Yes! This would be fine! :-) Thanks for your contribution!
Here is my docker-compose-config on my git.

https://git.schuerz.at/?p=friendica.git;a=summary

To install it, follow the instructions in the README.md

It should work. Please report, if it doesn't