Beta-testing phase for YunoHost 3.0 on Debian Stretch

Hi
I am facing 2 problems after the update to YunoHost 3.0.

  1. Fail2ban is failing. I have tried yunohost service regen-conf fail2ban ,but it still fail.
  2. I can not send the email form the email clients like Thnderbird,k-9 mail etc. But I can send emails form web clients like Roundcube. The incoming of emails messages is working fine.

I have backup of my system. How should I restore fail2ban and dovecot from the backup? And is there better way to make the service work again as normal?

@genma @Gildas

Les joies de l’informatique

J’ai le mĂȘme message que Genma dans les log, sauf que installer php7.0-apcu et redĂ©marrer nginx ne change rien.

php7.0-mbstring et php-xml sont bien installé chez moi.

EDIT : OK,c’est bon ça fonctionne. Il manquait juste un petit : systemctl reload php7.0-fpm.service
Donc

apt-get install php7.0-apcu -y
service nginx restart
systemctl reload php7.0-fpm.service

THX @Aleks @genma @Gildas

2 Likes

I installed Rainloop, and I have the same problem as you.
I can’t send mail with SMTP, but Rainloop works. I also tried the mail app of Nextcloud which needs SMTP and IMAP to connect, it didn’t work.

I think it would be better to understand why it’s failing rather than trying to restore your backup to just fix your particular setup, that’s the point of the beta :wink:

Can you provide logs of stuff like service fail2ban status ? Not sure about the whole email thing, but I expect if might be due to stuff we changed in the postfix conf 


I found where’s the problem: The SMTP server now listen to port 587 with STARTTLS instead of 993 and SSL/TLS

A priori, je ne suis pas le seul Ă  avoir le soucis : https://github.com/YunoHost-Apps/nextcloud_ynh/issues/110

J’ai Ă©galement dĂ©sinstallĂ© NextCloud puis rĂ©installĂ©, et je peux bien m’y connecter aussi.

Thanks a lot
This works, I remember I tried with STARTTLS but before it did not work(I think I might have changed the setting of other account,my mistake). But now it works.

Here is the log for fail2ban

fail2ban.service - Fail2Ban Service
   Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since XXXXXXXXXXXXXXX; 45s ago
     Docs: man:fail2ban(1)
  Process: 28723 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)
 Main PID: 2016 (code=killed, signal=TERM)

XXXXXX 00:37:58 domain.tld systemd[1]: fail2ban.service: Control process exited, code=exited status=255
XXXXXX 00:37:58 domain.tld systemd[1]: Failed to start Fail2Ban Service.
XXXXXX 00:37:58 domain.tld systemd[1]: fail2ban.service: Unit entered failed state.
XXXXXX 00:37:58 domain.tld systemd[1]: fail2ban.service: Failed with result 'exit-code'.
XXXXXX 00:37:58 domain.tld systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
XXXXXX 00:37:58 domain.tld systemd[1]: Stopped Fail2Ban Service.
XXXXXX 00:37:58 domain.tld systemd[1]: fail2ban.service: Start request repeated too quickly.
XXXXXX 00:37:58 domain.tld systemd[1]: Failed to start Fail2Ban Service.
XXXXXX 00:37:58 domain.tld systemd[1]: fail2ban.service: Unit entered failed state.
XXXXXX 00:37:58 domain.tld systemd[1]: fail2ban.service: Failed with result 'exit-code'.

Meh, unfortunately this output doesnt help too much (systemd likes to dump dozens of line which tells nothing about what the actual problem is)

Can you try tail -n 100 /var/log/fail2ban.log ?

Here if this logs help :stuck_out_tongue:

iptables -F fail2ban-ssh
iptables -X fail2ban-ssh returned 100
2018-05-09 18:15:49,556 fail2ban.jail   [18723]: INFO    Jail 'ssh' stopped
2018-05-09 18:15:49,799 fail2ban.server [18723]: INFO    Exiting Fail2ban
2018-05-09 18:15:54,218 fail2ban.server [7025]: INFO    Changed logging target to /var/log/fail2ban.log for Fail2ban v0.8.13
2018-05-09 18:15:54,219 fail2ban.jail   [7025]: INFO    Creating new jail 'ssh'
2018-05-09 18:15:55,565 fail2ban.jail   [7025]: INFO    Jail 'ssh' uses pyinotify
2018-05-09 18:15:56,927 fail2ban.jail   [7025]: INFO    Initiated 'pyinotify' backend
2018-05-09 18:15:56,928 fail2ban.filter [7025]: INFO    Added logfile = /var/log/auth.log
2018-05-09 18:15:56,929 fail2ban.filter [7025]: INFO    Set maxRetry = 6
2018-05-09 18:15:56,930 fail2ban.filter [7025]: INFO    Set findtime = 600
2018-05-09 18:15:56,931 fail2ban.actions[7025]: INFO    Set banTime = 600
2018-05-09 18:15:56,969 fail2ban.jail   [7025]: INFO    Creating new jail 'pam-generic'
2018-05-09 18:15:56,969 fail2ban.jail   [7025]: INFO    Jail 'pam-generic' uses pyinotify
2018-05-09 18:15:56,975 fail2ban.jail   [7025]: INFO    Initiated 'pyinotify' backend
2018-05-09 18:15:56,976 fail2ban.filter [7025]: INFO    Added logfile = /var/log/auth.log
2018-05-09 18:15:56,977 fail2ban.filter [7025]: INFO    Set maxRetry = 6
2018-05-09 18:15:56,978 fail2ban.filter [7025]: INFO    Set findtime = 600
2018-05-09 18:15:56,979 fail2ban.actions[7025]: INFO    Set banTime = 600
2018-05-09 18:15:56,985 fail2ban.jail   [7025]: INFO    Creating new jail 'postfix'
2018-05-09 18:15:56,985 fail2ban.jail   [7025]: INFO    Jail 'postfix' uses pyinotify
2018-05-09 18:15:56,991 fail2ban.jail   [7025]: INFO    Initiated 'pyinotify' backend
2018-05-09 18:15:56,992 fail2ban.filter [7025]: INFO    Added logfile = /var/log/mail.log
2018-05-09 18:15:56,993 fail2ban.filter [7025]: INFO    Set maxRetry = 3
2018-05-09 18:15:56,994 fail2ban.filter [7025]: INFO    Set findtime = 600
2018-05-09 18:15:56,994 fail2ban.actions[7025]: INFO    Set banTime = 600
2018-05-09 18:15:57,012 fail2ban.jail   [7025]: INFO    Creating new jail 'sasl'
2018-05-09 18:15:57,012 fail2ban.jail   [7025]: INFO    Jail 'sasl' uses pyinotify
2018-05-09 18:15:57,019 fail2ban.jail   [7025]: INFO    Initiated 'pyinotify' backend
2018-05-09 18:15:57,020 fail2ban.filter [7025]: INFO    Added logfile = /var/log/mail.log
2018-05-09 18:15:57,021 fail2ban.filter [7025]: INFO    Set maxRetry = 3
2018-05-09 18:15:57,022 fail2ban.filter [7025]: INFO    Set findtime = 600
2018-05-09 18:15:57,022 fail2ban.actions[7025]: INFO    Set banTime = 600
2018-05-09 18:15:57,029 fail2ban.jail   [7025]: INFO    Creating new jail 'dovecot'
2018-05-09 18:15:57,029 fail2ban.jail   [7025]: INFO    Jail 'dovecot' uses pyinotify
2018-05-09 18:15:57,035 fail2ban.jail   [7025]: INFO    Initiated 'pyinotify' backend
2018-05-09 18:15:57,036 fail2ban.filter [7025]: INFO    Added logfile = /var/log/mail.log
2018-05-09 18:15:57,037 fail2ban.filter [7025]: INFO    Set maxRetry = 3
2018-05-09 18:15:57,038 fail2ban.filter [7025]: INFO    Set findtime = 600
2018-05-09 18:15:57,039 fail2ban.actions[7025]: INFO    Set banTime = 600
2018-05-09 18:15:57,057 fail2ban.jail   [7025]: INFO    Creating new jail 'nginx'
2018-05-09 18:15:57,057 fail2ban.jail   [7025]: INFO    Jail 'nginx' uses pyinotify
2018-05-09 18:15:57,063 fail2ban.jail   [7025]: INFO    Initiated 'pyinotify' backend
2018-05-09 18:15:57,405 fail2ban.filter [7025]: INFO    Set maxRetry = 6
2018-05-09 18:15:57,407 fail2ban.filter [7025]: INFO    Set findtime = 600
2018-05-09 18:15:57,407 fail2ban.actions[7025]: INFO    Set banTime = 600
2018-05-09 18:15:57,439 fail2ban.jail   [7025]: INFO    Creating new jail 'yunohost'
2018-05-09 18:15:57,439 fail2ban.jail   [7025]: INFO    Jail 'yunohost' uses pyinotify
2018-05-09 18:15:57,445 fail2ban.jail   [7025]: INFO    Initiated 'pyinotify' backend
2018-05-09 18:15:57,534 fail2ban.filter [7025]: INFO    Set maxRetry = 6
2018-05-09 18:15:57,535 fail2ban.filter [7025]: INFO    Set findtime = 600
2018-05-09 18:15:57,536 fail2ban.actions[7025]: INFO    Set banTime = 600
2018-05-09 18:15:57,541 fail2ban.jail   [7025]: INFO    Jail 'ssh' started
2018-05-09 18:15:57,545 fail2ban.jail   [7025]: INFO    Jail 'pam-generic' started
2018-05-09 18:15:57,548 fail2ban.jail   [7025]: INFO    Jail 'postfix' started
2018-05-09 18:15:57,550 fail2ban.jail   [7025]: INFO    Jail 'sasl' started
2018-05-09 18:15:57,554 fail2ban.jail   [7025]: INFO    Jail 'dovecot' started
2018-05-09 18:15:57,558 fail2ban.jail   [7025]: INFO    Jail 'nginx' started
2018-05-09 18:15:57,560 fail2ban.jail   [7025]: INFO    Jail 'yunohost' started
2018-05-09 18:15:57,839 fail2ban.filter [7025]: ERROR   Error in FilterPyinotify callback: 'module' object has no attribute '_strptime_time'
2018-05-10 04:24:07,026 fail2ban.actions[7025]: WARNING [dovecot] Ban 37.24.153.115
2018-05-10 04:34:06,703 fail2ban.actions[7025]: WARNING [dovecot] Unban 37.24.153.115

After the last ban it never worked.

Sounds like it has to do with :

Is this “pyinotify” thing something you added manually ? (Never heard of this before)

No, I have never added it. But I have been using logwatch and maybe logwatch installs pyinotify for fail2ban?

Hi,

I’m using Yunohost on a Rapsberry Pi 3 B+, it’s rather new for me and I’m not sure where to look for logs. Here are a few questions. I hope they are in the correct topic.

  1. I have first started with the alpha version. Then I have updated to the beta version (using the interface). Is that okay or should I better restart from scratch with a full install ?

  2. I can’t get Tiny RSS working. The install looks fine but when the user connects it’s stuck on the [ loading please wait ] white page.

  3. I can’t receive any email from outside. Is the port 25 supposed to be open for receiving emails or just for sending them ?

Bonjour. Autre problĂšme, cette fois ci sur le portail SSO. Le bandeau bleu avec “Please log in to access to this content” reste affichĂ© en permanence sur le portail, que l’on soit connectĂ© ou non, depuis plusieurs jours (voire depuis que j’ai installĂ© la machine, probablement).
Je sais pas quel logs inclure
 dites moi

NB: mon installation de Yunohost est en anglais mais c’est normal

J’ai le mĂȘme problĂšme sur une install toute fraĂźche Ă  partir de l’iso.
Le SMTP ne fonctionne qu’en STARTTLS 587 au lieu du SSL/TLS 465 dĂ©crit dans la doc (https://yunohost.org/#/email_configure_client_fr)
Je ne sais pas si c’est voulu et donc normal
_j’imagine que non.

Pour info le port 587 est bon
 le 465 pas vraiment


La conclusion de l’article en question pour faire court mais j’ai peut ĂȘtre pas tout compris
Conclusion
a) Official submission port (for email client) is 587 and not 465
( RFC 6409 - https://tools.ietf.org/html/rfc6409)
b) Starting from 1998 the port 465 isn’t standard of SMTP :
465 is now dedicated to SSM protocol( http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt )
c) SSLv3 is deprecated and the advice is to use TLS
( RFC 7568 - https://tools.ietf.org/html/rfc7568 )
d) the propper way to use TLS with SMTP is using 587 (with STARTTLS)
( RFC 3207 - http://tools.ietf.org/html/rfc3207 http://www.iana.org/assignments/mail-parameters/mail-parameters.xhtml#mail-parameters-9 )

Salut,

j’ai plusieurs soucis depuis que j’ai installĂ© Yunohost sur Stretch (depuis l’alpha et maintenant en beta) :

  • certains boutons d’applications ne fonctionnent pas, ne produisent aucun effet. Par exemple, les boutons du menu Ampache, exceptĂ© celui de dĂ©connexion. Ou les “Save changes” de bas de page. En fouillant un peu, j’ai remarquĂ© que les boutons Ă©taient utilisĂ©s via du Javascript (et Ajax ?).

  • Jirafeau ne fonctionne pas et la page d’accueil, aprĂšs m’ĂȘtre identifiĂ©, est cassĂ©e :

Peut-ĂȘtre que les deux problĂšmes sont liĂ©s, qu’Ajax est cassĂ© sur ma machine ?
Je suis sur un VPS, avec Yunohost 3.0.0+201804241534.

Salut,

si ton serveur viens de la alpha alors je pense que ton sources.list ne pointe pas sur le bon repo.

Il faut que tu ouvres ton /etc/apt/sources.list.d/yunohost.list et vérifier que tu as bien :

deb http://forge.yunohost.org/debian stretch stable testing

Ensuite, il faut que tu force l’installation du paquet beta (il l’installera pas automatiquement parce que en terme de numĂ©ro debian, la version 3.0.0+2018
 est supĂ©rieur Ă  3.0.0~beta1.3)

Donc :

apt-get update
apt-get install yunohost=3.0.0~beta1.3 moulinette=3.0.0~beta1 ssowat=3.0.0~beta1 yunohost-admin=3.0.0~beta1
apt-get dist-upgrade    # ca peut pas faire de mal :P 

Edit: aprÚs, pas sur que ca résolve tes problÚmes, mais ça peut :wink:

Par - fait. Tout est reglé, merci !

J’ai migrĂ© depuis mon serveur debian 8 administrĂ© entiĂšrement en ligne de commande depuis 9 ans vers Yunohost donc.
Dans l’ensemble je suis agrĂ©ablement surpris, il m’aura fallu une journĂ©e de prise en main et tests, une journĂ©e d’installation et de remise en ligne de mes services, et enfin quelques jours de peaufinage


Voici les quelques difficultĂ©s que j’ai rencontrĂ© :

  • pydio fonctionne pas > DibiNotSupportedException: PHP extension ‘mysql’ is not loaded. [en attendant je teste Seafile]
  • RSS Bridge ne fonctionne pas > en fait sisi, ça marche ! Une erreur de ma part

  • Rouncube ne s’installe pas. [hop je suis passĂ© Ă  rainloop, et j’en suis satisfait]
  • mytinytodo ne fonctionne pas.
  • Matomo n’est pas proposĂ©.
    Pour les 3 premiers applicatifs je n’ai par recherchĂ© de solution.

Pour les suivantes, j’ai procĂ©dĂ© ainsi :
mytinytodo :

La derniùre version de mytinitodo reste assez ancienne et utilisait alors php5. De fait elle n’est plus compatible avec php7, mais il existe un fork en php7 ! https://github.com/ptrckkk/myTinyTodo

Installer l’application via yunohost (php5), ce qui crĂ©era toutes les entrĂ©es utiles Ă  yunohost ainsi que la bdd.
Renommer le dossier que yunohost a crée dans /var/www/

mv /var/www/mytinytodo /var/www/mytinytodo.ori

Télécharger le zip sur le github (php7), et le déziper dans le dossier /var/www/mytinytodo
RĂ©cupĂ©rer la configuration mytinitodo de yunohost depuis l’ancien dossier :

mv /var/www/mytinytodo.ori/db/config.php /var/www/mytinytodo/db/
mv /var/www/mytinytodo.ori/lang/fr.php /var/www/mytinytodo/db/

Donner les droits sur le dossier mytinytodo à l’utilisateur mytinytodo :

chown -R mytinytodo:mytinytodo mytinytodo

Si besoin, importer une ancienne base de donnée

mysql --user=root mytinytodo < mytinytodo.sql

Matomo : (anciennement Piwik)

Créer le domaine satistiques.mondomaine.org
Pour dĂ©sactiver ssowat, afin d’éviter que se rendre Ă  l’adresse du sous-domaine ne mĂšne directement au ssowat, Ă©diter :
nano /etc/nginx/conf.d/satistiques.mondomaine.org.conf

Commenter cette ligne qui apparaĂźt deux fois :

access_by_lua_file /usr/share/ssowat/access.lua;
access_by_lua_file /usr/share/ssowat/access.lua;

Pour configurer le site sur nginx, créer le fichier :

nano /etc/nginx/conf.d/satistiques.mondomaine.org.d/matomo.conf

Avec dedans :

location / {
alias /var/www/matomo/;
index index.php;
location ~ [^/].php(/|$) {
fastcgi_split_path_info ^(.+?.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
}

# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;

}

Télécharger le zip piwik et dézipper son contenu dans le dossier /var/www/matomo.
Donner les droits sur le dossier matomo l’utilisateur www-data:

chown -R www-data:www-data matomo

Maintenant on peut se rendre sur le sous-domaine et l’assistant dinstallation devrait se lancer


En root depuis la console, créer la base matomo, créer un utilisateur, lui adjoindre un mot de passe, et lui donner les droits sur la base :

mysql -u root
CREATE DATABASE matomo;
CREATE USER “statistique”@“localhost”;
SET PASSWORD FOR “statistique”@“localhost” = PASSWORD("******");
GRANT ALL ON matomo.
TO statistique@localhost;

Retourner sur l’installeur pour terminer le travail


Il me semble que lors de mes tests Mastodon ne fonctionnait pas, alors j’attendrais pour crĂ©er mon instance.
Ha, et peertube aussi, j’aimerais bien :wink:
Oui aprùs 9 ans d’admin manuelle de mon petit minitel, j’ai envie de glander ^^;

2 Likes