Git Product home page Git Product logo

synapse_ynh's Introduction

Synapse for YunoHost

Integration level Working status Maintenance status

Install Synapse with YunoHost

Lire ce readme en français.

This package allows you to install Synapse quickly and simply on a YunoHost server. If you don't have YunoHost, please consult the guide to learn how to install it.

Overview

Instant messaging server matrix network.

Yunohost chatroom with matrix : https://matrix.to/#/#yunohost:matrix.org

Shipped version: 1.98.0~ynh1

Disclaimers / important information

Configuration

Install for ARM arch (or slow arch)

For all slow or arm architecture it's recommended to build the dh file before the install to have a quicker install. You could build it by this cmd : openssl dhparam -out /etc/ssl/private/dh2048.pem 2048 > /dev/null After that you can install it without problem.

The package uses a prebuilt python virtual environnement. The binary are taken from this repository: https://github.com/Josue-T/synapse_python_build The script to build the binary is also available.

Web client

If you want a web client you can also install Element with this package: https://github.com/YunoHost-Apps/element_ynh .

Access by federation

If your server name is identical to the domain on which synapse is installed, and the default port 8448 is used, your server is normally already accessible by the federation.

If not, you can add the following line in the dns configuration but you normally don't need it as a .well-known file is edited during the install to declare your server name and port to the federation.

_matrix._tcp.<server_name.tld> <ttl> IN SRV 10 0 <port> <domain-or-subdomain-of-synapse.tld>

for example

_matrix._tcp.example.com. 3600    IN      SRV     10 0 SYNAPSE_PORT synapse.example.com.

You need to replace SYNAPSE_PORT by the real port. This port can be obtained by the command: yunohost app setting SYNAPSE_INSTANCE_NAME synapse_tls_port

For more details, see : https://github.com/matrix-org/synapse/blob/master/docs/federate.md

If it is not automatically done, you need to open this in your ISP box.

You also need a valid TLS certificate for the domain used by synapse. To do that you can refer to the documentation here : https://yunohost.org/#/certificate_en

https://federationtester.matrix.org/ can be used to easily debug federation issues

Turnserver

For Voip and video conferencing a turnserver is also installed (and configured). The turnserver listens on two UDP and TCP ports. You can get them with these commands:

yunohost app setting synapse turnserver_tls_port
yunohost app setting synapse turnserver_alt_tls_port

The turnserver will also choose a port dynamically when a new call starts. The range is between 49153 - 49193.

For some security reason the ports range (49153 - 49193) isn't automatically open by default. If you want to use the synapse server for voip or conferencing you will need to open this port range manually. To do this just run this command:

yunohost firewall allow Both 49153:49193

You might also need to open these ports (if it is not automatically done) on your ISP box.

To prevent the situation when the server is behind a NAT, the public IP is written in the turnserver config. By this the turnserver can send its real public IP to the client. For more information see the coturn example config file.So if your IP changes, you could run the script /opt/yunohost/__SYNAPSE_INSTANCE_NAME__/Coturn_config_rotate.sh to update your config.

If you have a dynamic IP address, you also might need to update this config automatically. To do that just edit a file named /etc/cron.d/coturn_config_rotate and add the following content (just adapt the SYNAPSE_INSTANCE_NAME which could be synapse or maybe synapse__2).

*/15 * * * * root bash /opt/yunohost/__SYNAPSE_INSTANCE_NAME__/Coturn_config_rotate.sh;

OpenVPN

In case of you have an OpenVPN server you might want than coturn-synapse restart when the VPN restart. To do this create a file named /usr/local/bin/openvpn_up_script.sh with this content:

#!/bin/bash

(
    sleep 5
    sudo systemctl restart coturn-synapse.service
) &
exit 0

Add this line in you sudo config file /etc/sudoers

openvpn    ALL=(ALL) NOPASSWD: /bin/systemctl restart coturn-synapse.service

And add this line in your OpenVPN config file

ipchange /usr/local/bin/openvpn_up_script.sh

Important Security Note

We do not recommend running Element from the same domain name as your Matrix homeserver (synapse). The reason is the risk of XSS (cross-site-scripting) vulnerabilities that could occur if someone caused Element to load and render malicious user generated content from a Matrix API which then had trusted access to Element (or other apps) due to sharing the same domain.

We have put some coarse mitigations into place to try to protect against this situation, but it's still not a good practice to do it in the first place. See element-hq/element-web#1977 for more details.

YunoHost specific features

Limitations

Synapse uses a lot of ressource. So on slow architecture (like small ARM board), this app could take a lot of CPU and RAM.

This app doesn't provide any real good web interface. So it's recommended to use Element client to connect to this app. This app is available here

Additional information

Administration

All documentation of this section is not warranted. A bad use of command could break the app and all the data. So use these commands at your own risk.

Before any manipulation it's recommended to do a backup by this following command :

sudo yunohost backup create --apps synapse

Set user as admin

Actually there are no functions in the client interface to set a user as admin. So it's possible to enable it manually in the database.

The following command will grant admin privilege to the specified user:

su --command="psql matrix_synapse" postgres <<< "UPDATE users SET admin = 1 WHERE name = '@user_to_be_admin:domain.tld'"

Administration API

Synapse's administration API endpoints are under /_synapse path and protected with the admin_api permission. By default, no one has access to this path.

If you wish to access it, for example to use Synapse Admin, you need to give this permission to visitors.

Then, to log in the API with your credentials, you need to set your user as admin (cf. precedent section).

Upgrade

By default a backup is made before the upgrade. If for some reason you want to upgrade without backup:

  • Call the command with the -b flag: yunohost app upgrade synapse -b
  • Disable the setting Backup before upgrade in the Config Panel. Or with command line:

yunohost app setting synapse backup_before_upgrade -v 0

After this settings will be applied for all next upgrade.

From command line:

yunohost app upgrade synapse

Backup

This app use now the core-only feature of the backup. To keep the integrity of the data and to have a better guarantee of the restoration is recommended to proceed like this:

  • Stop synapse service with theses following command:

systemctl stop synapse.service

  • Launch the backup of synapse with this following command:

yunohost backup create --app synapse

  • Do a backup of your data with your specific strategy (could be with rsync, borg backup or just cp). The data is generally stored in /home/yunohost.app/matrix-synapse.
  • Restart the synapse service with these command:

systemctl start synapse.service

Remove

Due of the backup core only feature the data directory in /home/yunohost.app/matrix-synapse is not removed.

Use the --purge flag with the command, or remove it manually to purge app user data.

Multi instance support

To give a possibility to have multiple domains you can use multiple instances of synapse. In this case all instances will run on different ports so it's really important to put a SRV record in your domain. You can get the port that you need to put in your SRV record with this following command:

yunohost app setting synapse__<instancenumber> synapse_tls_port

Before installing a second instance of the app it's really recommended to update all existing instances.

Documentation and resources

Developer info

Please send your pull request to the testing branch.

To try the testing branch, please proceed like that.

sudo yunohost app install https://github.com/YunoHost-Apps/synapse_ynh/tree/testing --debug
or
sudo yunohost app upgrade synapse -u https://github.com/YunoHost-Apps/synapse_ynh/tree/testing --debug

More info regarding app packaging: https://yunohost.org/packaging_apps

synapse_ynh's People

Contributors

alexaubin avatar chmac avatar csett86 avatar csolisr avatar cwiggs avatar ericgaspar avatar gnouts avatar gredin67 avatar jibec avatar jimbojoe avatar jocelyndelalande avatar jopasserat avatar josue-t avatar jvagnet avatar kay0u avatar linkid avatar maniackcrudelis avatar mayeulc avatar mikeinspace99 avatar nicofrand avatar pxbcpg avatar rosbeef avatar sim avatar tagadda avatar thatoo avatar yalh76 avatar yunohost-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

synapse_ynh's Issues

Restore failling

Here is the error log.

2019-05-06 14:30:59,003: DEBUG - + unset backup_file_checksum
2019-05-06 14:30:59,003: DEBUG - + yunohost firewall allow TCP 8448
2019-05-06 14:31:00,507: DEBUG - + yunohost firewall allow Both 5349
2019-05-06 14:31:02,332: DEBUG - + yunohost firewall allow Both 5350
2019-05-06 14:31:04,238: DEBUG - + python3 /opt/yunohost/matrix-synapse/add_sso_conf.py
2019-05-06 14:31:04,238: WARNING - python3: can't open file '/opt/yunohost/matrix-synapse/add_sso_conf.py': [Errno 2] No such file or directory
2019-05-06 14:31:04,238: DEBUG - + ynh_die 'Your file /etc/ssowat/conf.json.persistent don'\''t respect the json synaxe. Please fix the synaxe to install this app. For more information see here : https://github.com/YunoHost-Apps/synapse_ynh/issues/32'
2019-05-06 14:31:04,239: WARNING - Your file /etc/ssowat/conf.json.persistent don't respect the json synaxe. Please fix the synaxe to install this app. For more information see here : https://github.com/YunoHost-Apps/synapse_ynh/issues/32
2019-05-06 14:31:04,239: DEBUG - + local legacy_args=mc
2019-05-06 14:31:04,239: WARNING - !!
2019-05-06 14:31:04,239: DEBUG - + args_array=([m]=message= [c]=ret_code=)
2019-05-06 14:31:04,239: WARNING -   synapse's script has encountered an error. Its execution was cancelled.
2019-05-06 14:31:04,239: DEBUG - + declare -Ar args_array
2019-05-06 14:31:04,240: WARNING - !!
2019-05-06 14:31:04,240: DEBUG - + local message
2019-05-06 14:31:04,240: WARNING - 
2019-05-06 14:31:04,240: DEBUG - + local ret_code

Upgrade to 0.99.2 failed

Hi,

I just tried to upgrade my synapse server and the upgrade failed. The logs are quite long and I don't really know where to start looking at so I thought I'd share my logs here.

2019-03-21 10:50:57,438: DEBUG - Exécution de la commande « sh -c YNH_APP_INSTANCE_NUMBER=1 YNH_APP_ID=synapse YNH_CWD=/var/cache/yunohost/from_file/synapse_ynh-2482bf824cff36b0562bec31186f4b7e417e60dc/scripts YNH_APP_INSTANCE_NAME=synapse YNH_STDINFO=/tmp/tmpHQ0l30/stdinfo BASH_XTRACEFD=7 /bin/bash -x "./upgrade" synapse 7>&1 »...
2019-03-21 10:50:57,440: DEBUG - About to run the command '['sh', '-c', 'YNH_APP_INSTANCE_NUMBER=1 YNH_APP_ID=synapse YNH_CWD=/var/cache/yunohost/from_file/synapse_ynh-2482bf824cff36b0562bec31186f4b7e417e60dc/scripts YNH_APP_INSTANCE_NAME=synapse YNH_STDINFO=/tmp/tmpHQ0l30/stdinfo BASH_XTRACEFD=7 /bin/bash -x "./upgrade" synapse 7>&1']'
2019-03-21 10:50:57,804: DEBUG - + source /usr/share/yunohost/helpers
2019-03-21 10:50:57,806: DEBUG - +++ run-parts --list /usr/share/yunohost/helpers.d
2019-03-21 10:50:57,807: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,808: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/backend ']'
2019-03-21 10:50:57,809: DEBUG - ++ . /usr/share/yunohost/helpers.d/backend
2019-03-21 10:50:57,809: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,810: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/filesystem ']'
2019-03-21 10:50:57,811: DEBUG - ++ . /usr/share/yunohost/helpers.d/filesystem
2019-03-21 10:50:57,812: DEBUG - +++ CAN_BIND=1
2019-03-21 10:50:57,813: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,814: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/getopts ']'
2019-03-21 10:50:57,816: DEBUG - ++ . /usr/share/yunohost/helpers.d/getopts
2019-03-21 10:50:57,817: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,818: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/ip ']'
2019-03-21 10:50:57,818: DEBUG - ++ . /usr/share/yunohost/helpers.d/ip
2019-03-21 10:50:57,819: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,820: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/mysql ']'
2019-03-21 10:50:57,820: DEBUG - ++ . /usr/share/yunohost/helpers.d/mysql
2019-03-21 10:50:57,821: DEBUG - +++ MYSQL_ROOT_PWD_FILE=/etc/yunohost/mysql
2019-03-21 10:50:57,822: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,823: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/network ']'
2019-03-21 10:50:57,823: DEBUG - ++ . /usr/share/yunohost/helpers.d/network
2019-03-21 10:50:57,824: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,824: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/nodejs ']'
2019-03-21 10:50:57,825: DEBUG - ++ . /usr/share/yunohost/helpers.d/nodejs
2019-03-21 10:50:57,826: DEBUG - +++ n_install_dir=/opt/node_n
2019-03-21 10:50:57,827: DEBUG - +++ node_version_path=/opt/node_n/n/versions/node
2019-03-21 10:50:57,828: DEBUG - +++ export N_PREFIX=/opt/node_n
2019-03-21 10:50:57,828: DEBUG - +++ N_PREFIX=/opt/node_n
2019-03-21 10:50:57,829: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,830: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/package ']'
2019-03-21 10:50:57,831: DEBUG - ++ . /usr/share/yunohost/helpers.d/package
2019-03-21 10:50:57,831: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,832: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/print ']'
2019-03-21 10:50:57,833: DEBUG - ++ . /usr/share/yunohost/helpers.d/print
2019-03-21 10:50:57,833: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,834: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/psql ']'
2019-03-21 10:50:57,835: DEBUG - ++ . /usr/share/yunohost/helpers.d/psql
2019-03-21 10:50:57,835: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,836: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/setting ']'
2019-03-21 10:50:57,837: DEBUG - ++ . /usr/share/yunohost/helpers.d/setting
2019-03-21 10:50:57,838: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,838: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/string ']'
2019-03-21 10:50:57,839: DEBUG - ++ . /usr/share/yunohost/helpers.d/string
2019-03-21 10:50:57,840: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,840: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/system ']'
2019-03-21 10:50:57,841: DEBUG - ++ . /usr/share/yunohost/helpers.d/system
2019-03-21 10:50:57,842: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,843: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/user ']'
2019-03-21 10:50:57,843: DEBUG - ++ . /usr/share/yunohost/helpers.d/user
2019-03-21 10:50:57,844: DEBUG - ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:50:57,845: DEBUG - ++ '[' -r /usr/share/yunohost/helpers.d/utils ']'
2019-03-21 10:50:57,845: DEBUG - ++ . /usr/share/yunohost/helpers.d/utils
2019-03-21 10:50:57,846: DEBUG - + ynh_abort_if_errors
2019-03-21 10:50:57,847: DEBUG - + set -eu
2019-03-21 10:50:57,848: DEBUG - + trap ynh_exit_properly EXIT
2019-03-21 10:50:57,848: DEBUG - + source ./psql.sh
2019-03-21 10:50:57,849: DEBUG - + source ./experimental_helper.sh
2019-03-21 10:50:57,850: DEBUG - + source ./_common.sh
2019-03-21 10:50:57,850: DEBUG - ++ dependances='coturn build-essential python3-dev libffi-dev python3-pip python3-setuptools sqlite3 libssl-dev python3-venv libxml2-dev libxslt1-dev python3-lxml libjpeg-dev libpq-dev postgresql acl'
2019-03-21 10:50:57,851: DEBUG - + app=synapse
2019-03-21 10:50:57,852: DEBUG - + synapse_user=matrix-synapse
2019-03-21 10:50:57,852: DEBUG - + synapse_db_name=matrix_synapse
2019-03-21 10:50:57,853: DEBUG - + synapse_db_user=matrix_synapse
2019-03-21 10:50:57,854: DEBUG - ++ ynh_app_upstream_version
2019-03-21 10:50:57,854: DEBUG - ++ manifest_path=../manifest.json
2019-03-21 10:50:57,855: DEBUG - ++ '[' '!' -e ../manifest.json ']'
2019-03-21 10:50:57,856: DEBUG - +++ ynh_read_manifest ../manifest.json version
2019-03-21 10:50:57,856: DEBUG - +++ manifest=../manifest.json
2019-03-21 10:50:57,857: DEBUG - +++ key=version
2019-03-21 10:50:57,858: DEBUG - +++ python3 -c 'import sys, json;print(json.load(open('\''../manifest.json'\'', encoding='\''utf-8'\''))['\''version'\''])'
2019-03-21 10:50:58,560: DEBUG - ++ version_key=0.99.2~ynh1
2019-03-21 10:50:58,561: DEBUG - ++ echo 0.99.2
2019-03-21 10:50:58,563: DEBUG - + upstream_version=0.99.2
2019-03-21 10:50:58,564: DEBUG - ++ ynh_app_setting_get synapse special_domain
2019-03-21 10:50:58,565: DEBUG - ++ sudo yunohost app setting synapse special_domain --output-as plain --quiet
2019-03-21 10:51:03,779: DEBUG - + domain=matrix.nicofrand.eu
2019-03-21 10:51:03,780: DEBUG - ++ ynh_app_setting_get synapse special_path
2019-03-21 10:51:03,781: DEBUG - ++ sudo yunohost app setting synapse special_path --output-as plain --quiet
2019-03-21 10:51:06,790: DEBUG - + path_url=/_matrix
2019-03-21 10:51:06,792: DEBUG - ++ ynh_app_setting_get synapse final_path
2019-03-21 10:51:06,793: DEBUG - ++ sudo yunohost app setting synapse final_path --output-as plain --quiet
2019-03-21 10:51:09,802: DEBUG - + final_path=/opt/yunohost/matrix-synapse
2019-03-21 10:51:09,804: DEBUG - ++ ynh_app_setting_get synapse synapse_version
2019-03-21 10:51:09,805: DEBUG - ++ sudo yunohost app setting synapse synapse_version --output-as plain --quiet
2019-03-21 10:51:12,813: DEBUG - + synapse_old_version=0.34.0.1
2019-03-21 10:51:12,814: DEBUG - ++ ynh_app_setting_get synapse synapse_db_pwd
2019-03-21 10:51:12,816: DEBUG - ++ sudo yunohost app setting synapse synapse_db_pwd --output-as plain --quiet
2019-03-21 10:51:15,725: DEBUG - + synapse_db_pwd=WE0cGCkQAryRES07p9N2xEw8yqD8ob
2019-03-21 10:51:15,726: DEBUG - ++ ynh_app_setting_get synapse is_public
2019-03-21 10:51:15,726: DEBUG - ++ sudo yunohost app setting synapse is_public --output-as plain --quiet
2019-03-21 10:51:18,736: DEBUG - + is_public=0
2019-03-21 10:51:18,737: DEBUG - ++ ynh_app_setting_get synapse synapse_port
2019-03-21 10:51:18,738: DEBUG - ++ sudo yunohost app setting synapse synapse_port --output-as plain --quiet
2019-03-21 10:51:21,647: DEBUG - + port=8008
2019-03-21 10:51:21,648: DEBUG - ++ ynh_app_setting_get synapse synapse_tls_port
2019-03-21 10:51:21,649: DEBUG - ++ sudo yunohost app setting synapse synapse_tls_port --output-as plain --quiet
2019-03-21 10:51:24,658: DEBUG - + synapse_tls_port=8448
2019-03-21 10:51:24,659: DEBUG - ++ ynh_app_setting_get synapse turnserver_tls_port
2019-03-21 10:51:24,661: DEBUG - ++ sudo yunohost app setting synapse turnserver_tls_port --output-as plain --quiet
2019-03-21 10:51:27,570: DEBUG - + turnserver_tls_port=5349
2019-03-21 10:51:27,571: DEBUG - ++ ynh_app_setting_get synapse turnserver_alt_tls_port
2019-03-21 10:51:27,571: DEBUG - ++ sudo yunohost app setting synapse turnserver_alt_tls_port --output-as plain --quiet
2019-03-21 10:51:30,479: DEBUG - + turnserver_alt_tls_port=5350
2019-03-21 10:51:30,480: DEBUG - ++ ynh_app_setting_get synapse turnserver_pwd
2019-03-21 10:51:30,481: DEBUG - ++ sudo yunohost app setting synapse turnserver_pwd --output-as plain --quiet
2019-03-21 10:51:33,488: DEBUG - + turnserver_pwd=3zMcFqspiCxSzLqehrvuawSpLoftAH
2019-03-21 10:51:33,490: DEBUG - ++ ynh_app_setting_get synapse cli_port
2019-03-21 10:51:33,491: DEBUG - ++ sudo yunohost app setting synapse cli_port --output-as plain --quiet
2019-03-21 10:51:36,501: DEBUG - + cli_port=5766
2019-03-21 10:51:36,502: DEBUG - ++ ynh_app_setting_get synapse registration_shared_secret
2019-03-21 10:51:36,503: DEBUG - ++ sudo yunohost app setting synapse registration_shared_secret --output-as plain --quiet
2019-03-21 10:51:39,410: DEBUG - + registration_shared_secret='Wk4s2@6fgeH2oI@sBnPNAfLZqMk*3Xz*;cGr~kp^tO;9BCG7lb'
2019-03-21 10:51:39,411: DEBUG - ++ ynh_app_setting_get synapse form_secret
2019-03-21 10:51:39,412: DEBUG - ++ sudo yunohost app setting synapse form_secret --output-as plain --quiet
2019-03-21 10:51:42,420: DEBUG - + form_secret='form_secret: '
2019-03-21 10:51:42,422: DEBUG - ++ ynh_app_setting_get synapse report_stats
2019-03-21 10:51:42,423: DEBUG - ++ sudo yunohost app setting synapse report_stats --output-as plain --quiet
2019-03-21 10:51:45,331: DEBUG - + report_stats=
2019-03-21 10:51:45,332: DEBUG - + [[ -z 0.34.0.1 ]]
2019-03-21 10:51:45,334: DEBUG - + systemctl stop matrix-synapse.service
2019-03-21 10:51:54,758: DEBUG - ++ ynh_app_setting_get synapse disable_backup_before_upgrade
2019-03-21 10:51:54,759: DEBUG - ++ sudo yunohost app setting synapse disable_backup_before_upgrade --output-as plain --quiet
2019-03-21 10:51:57,769: DEBUG - + [[ '' != \1 ]]
2019-03-21 10:51:57,770: DEBUG - + ynh_backup_before_upgrade
2019-03-21 10:51:57,771: DEBUG - + '[' '!' -e /etc/yunohost/apps/synapse/scripts/backup ']'
2019-03-21 10:51:57,772: DEBUG - + backup_number=1
2019-03-21 10:51:57,773: DEBUG - + local old_backup_number=2
2019-03-21 10:51:57,774: DEBUG - + local app_bck=synapse
2019-03-21 10:51:57,775: DEBUG - + NO_BACKUP_UPGRADE=0
2019-03-21 10:51:57,776: DEBUG - + '[' 0 -eq 0 ']'
2019-03-21 10:51:57,778: DEBUG - + sudo yunohost backup list
2019-03-21 10:51:57,779: DEBUG - + grep -q synapse-pre-upgrade1
2019-03-21 10:52:01,289: DEBUG - + sudo BACKUP_CORE_ONLY=1 yunohost backup create --apps synapse --name synapse-pre-upgrade1 --debug
2019-03-21 10:52:03,696: DEBUG - 2267 loading actions map namespace 'yunohost'
2019-03-21 10:52:03,798: DEBUG - 2341 extra parameter classes loaded: ['comment', 'ask', 'password', 'required', 'pattern']
2019-03-21 10:52:03,799: DEBUG - 2341 initializing base actions map parser for cli
2019-03-21 10:52:03,800: DEBUG - 2346 registering new callback action 'yunohost.utils.packages.ynh_packages_version' to ['-v', '--version']
2019-03-21 10:52:04,303: DEBUG - 2853 loading python module yunohost.backup took 0.167s
2019-03-21 10:52:04,303: DEBUG - 2854 processing action [11945.1]: yunohost.backup.create with args={'description': None, 'apps': ['synapse'], 'system': None, 'output_directory': None, 'methods': None, 'no_compress': False, 'name': 'synapse-pre-upgrade1'}
2019-03-21 10:52:04,304: DEBUG - 2885 custom hook folder not found for action 'backup' in /etc/yunohost/hooks.d/
2019-03-21 10:52:04,405: DEBUG - 2893 Running backup script of app 'synapse'…
2019-03-21 10:52:04,406: DEBUG - 2988 Executing command 'sh -c YNH_APP_INSTANCE_NUMBER=1 YNH_CWD=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup YNH_STDINFO=/tmp/tmpOObbMz/stdinfo YNH_BACKUP_CSV=/tmp/backupcsv_jk3uzy YNH_BACKUP_DIR=/home/yunohost.backup/tmp/synapse-pre-upgrade1 YNH_APP_INSTANCE_NAME=synapse YNH_APP_ID=synapse YNH_APP_BACKUP_DIR=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup BASH_XTRACEFD=7 /bin/bash -x "/tmp/backup_nP1DBk" /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup synapse 7>&1'…
2019-03-21 10:52:04,508: DEBUG - 2990 About to run the command '['sh', '-c', 'YNH_APP_INSTANCE_NUMBER=1 YNH_CWD=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup YNH_STDINFO=/tmp/tmpOObbMz/stdinfo YNH_BACKUP_CSV=/tmp/backupcsv_jk3uzy YNH_BACKUP_DIR=/home/yunohost.backup/tmp/synapse-pre-upgrade1 YNH_APP_INSTANCE_NAME=synapse YNH_APP_ID=synapse YNH_APP_BACKUP_DIR=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup BASH_XTRACEFD=7 /bin/bash -x "/tmp/backup_nP1DBk" /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup synapse 7>&1']'
2019-03-21 10:52:04,509: DEBUG - 3027 + source /usr/share/yunohost/helpers
2019-03-21 10:52:04,510: DEBUG - 3029 +++ run-parts --list /usr/share/yunohost/helpers.d
2019-03-21 10:52:04,510: DEBUG - 3030 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,511: DEBUG - 3031 ++ '[' -r /usr/share/yunohost/helpers.d/backend ']'
2019-03-21 10:52:04,512: DEBUG - 3032 ++ . /usr/share/yunohost/helpers.d/backend
2019-03-21 10:52:04,512: DEBUG - 3033 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,513: DEBUG - 3034 ++ '[' -r /usr/share/yunohost/helpers.d/filesystem ']'
2019-03-21 10:52:04,514: DEBUG - 3034 ++ . /usr/share/yunohost/helpers.d/filesystem
2019-03-21 10:52:04,515: DEBUG - 3035 +++ CAN_BIND=1
2019-03-21 10:52:04,515: DEBUG - 3036 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,516: DEBUG - 3037 ++ '[' -r /usr/share/yunohost/helpers.d/getopts ']'
2019-03-21 10:52:04,516: DEBUG - 3037 ++ . /usr/share/yunohost/helpers.d/getopts
2019-03-21 10:52:04,517: DEBUG - 3038 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,518: DEBUG - 3039 ++ '[' -r /usr/share/yunohost/helpers.d/ip ']'
2019-03-21 10:52:04,519: DEBUG - 3039 ++ . /usr/share/yunohost/helpers.d/ip
2019-03-21 10:52:04,519: DEBUG - 3040 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,520: DEBUG - 3041 ++ '[' -r /usr/share/yunohost/helpers.d/mysql ']'
2019-03-21 10:52:04,521: DEBUG - 3042 ++ . /usr/share/yunohost/helpers.d/mysql
2019-03-21 10:52:04,521: DEBUG - 3042 +++ MYSQL_ROOT_PWD_FILE=/etc/yunohost/mysql
2019-03-21 10:52:04,522: DEBUG - 3043 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,523: DEBUG - 3044 ++ '[' -r /usr/share/yunohost/helpers.d/network ']'
2019-03-21 10:52:04,523: DEBUG - 3044 ++ . /usr/share/yunohost/helpers.d/network
2019-03-21 10:52:04,524: DEBUG - 3045 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,524: DEBUG - 3046 ++ '[' -r /usr/share/yunohost/helpers.d/nodejs ']'
2019-03-21 10:52:04,525: DEBUG - 3046 ++ . /usr/share/yunohost/helpers.d/nodejs
2019-03-21 10:52:04,526: DEBUG - 3047 +++ n_install_dir=/opt/node_n
2019-03-21 10:52:04,527: DEBUG - 3048 +++ node_version_path=/opt/node_n/n/versions/node
2019-03-21 10:52:04,527: DEBUG - 3049 +++ export N_PREFIX=/opt/node_n
2019-03-21 10:52:04,528: DEBUG - 3049 +++ N_PREFIX=/opt/node_n
2019-03-21 10:52:04,529: DEBUG - 3050 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,529: DEBUG - 3051 ++ '[' -r /usr/share/yunohost/helpers.d/package ']'
2019-03-21 10:52:04,530: DEBUG - 3051 ++ . /usr/share/yunohost/helpers.d/package
2019-03-21 10:52:04,531: DEBUG - 3052 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,531: DEBUG - 3053 ++ '[' -r /usr/share/yunohost/helpers.d/print ']'
2019-03-21 10:52:04,532: DEBUG - 3053 ++ . /usr/share/yunohost/helpers.d/print
2019-03-21 10:52:04,533: DEBUG - 3054 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,533: DEBUG - 3055 ++ '[' -r /usr/share/yunohost/helpers.d/psql ']'
2019-03-21 10:52:04,534: DEBUG - 3056 ++ . /usr/share/yunohost/helpers.d/psql
2019-03-21 10:52:04,535: DEBUG - 3056 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,536: DEBUG - 3057 ++ '[' -r /usr/share/yunohost/helpers.d/setting ']'
2019-03-21 10:52:04,537: DEBUG - 3058 ++ . /usr/share/yunohost/helpers.d/setting
2019-03-21 10:52:04,538: DEBUG - 3058 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,539: DEBUG - 3059 ++ '[' -r /usr/share/yunohost/helpers.d/string ']'
2019-03-21 10:52:04,539: DEBUG - 3060 ++ . /usr/share/yunohost/helpers.d/string
2019-03-21 10:52:04,540: DEBUG - 3061 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,541: DEBUG - 3062 ++ '[' -r /usr/share/yunohost/helpers.d/system ']'
2019-03-21 10:52:04,541: DEBUG - 3063 ++ . /usr/share/yunohost/helpers.d/system
2019-03-21 10:52:04,542: DEBUG - 3064 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,543: DEBUG - 3065 ++ '[' -r /usr/share/yunohost/helpers.d/user ']'
2019-03-21 10:52:04,543: DEBUG - 3066 ++ . /usr/share/yunohost/helpers.d/user
2019-03-21 10:52:04,544: DEBUG - 3066 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 10:52:04,545: DEBUG - 3067 ++ '[' -r /usr/share/yunohost/helpers.d/utils ']'
2019-03-21 10:52:04,545: DEBUG - 3068 ++ . /usr/share/yunohost/helpers.d/utils
2019-03-21 10:52:04,546: DEBUG - 3069 + ynh_abort_if_errors
2019-03-21 10:52:04,547: DEBUG - 3069 + set -eu
2019-03-21 10:52:04,548: DEBUG - 3070 + trap ynh_exit_properly EXIT
2019-03-21 10:52:04,548: DEBUG - 3071 + source ../settings/scripts/psql.sh
2019-03-21 10:52:04,549: DEBUG - 3071 + source ../settings/scripts/experimental_helper.sh
2019-03-21 10:52:04,550: DEBUG - 3072 + source ../settings/scripts/_common.sh
2019-03-21 10:52:04,550: DEBUG - 3073 ++ dependances='coturn build-essential python3-dev libffi-dev python3-pip python3-setuptools sqlite3 libssl-dev python3-venv libxml2-dev libxslt1-dev python3-lxml libjpeg-dev libpq-dev postgresql acl'
2019-03-21 10:52:04,551: DEBUG - 3073 + app=synapse
2019-03-21 10:52:04,552: DEBUG - 3074 + synapse_user=matrix-synapse
2019-03-21 10:52:04,552: DEBUG - 3075 + synapse_db_name=matrix_synapse
2019-03-21 10:52:04,553: DEBUG - 3076 + synapse_db_user=matrix_synapse
2019-03-21 10:52:04,554: DEBUG - 3076 ++ ynh_app_upstream_version
2019-03-21 10:52:04,554: DEBUG - 3077 ++ manifest_path=../manifest.json
2019-03-21 10:52:04,555: DEBUG - 3078 ++ '[' '!' -e ../manifest.json ']'
2019-03-21 10:52:04,556: DEBUG - 3078 ++ manifest_path=../settings/manifest.json
2019-03-21 10:52:04,556: DEBUG - 3079 +++ ynh_read_manifest ../settings/manifest.json version
2019-03-21 10:52:04,557: DEBUG - 3080 +++ manifest=../settings/manifest.json
2019-03-21 10:52:04,558: DEBUG - 3081 +++ key=version
2019-03-21 10:52:04,558: DEBUG - 3081 +++ python3 -c 'import sys, json;print(json.load(open('\''../settings/manifest.json'\'', encoding='\''utf-8'\''))['\''version'\''])'
2019-03-21 10:52:04,760: DEBUG - 3283 ++ version_key=0.34.0.1~ynh1
2019-03-21 10:52:04,761: DEBUG - 3284 ++ echo 0.34.0.1
2019-03-21 10:52:04,761: DEBUG - 3285 + upstream_version=0.34.0.1
2019-03-21 10:52:04,762: DEBUG - 3287 ++ ynh_app_setting_get synapse special_domain
2019-03-21 10:52:04,763: DEBUG - 3288 ++ sudo yunohost app setting synapse special_domain --output-as plain --quiet
2019-03-21 10:52:07,671: DEBUG - 6196 + domain=matrix.nicofrand.eu
2019-03-21 10:52:07,672: DEBUG - 6197 ++ ynh_app_setting_get synapse final_path
2019-03-21 10:52:07,673: DEBUG - 6198 ++ sudo yunohost app setting synapse final_path --output-as plain --quiet
2019-03-21 10:52:10,682: DEBUG - 9205 + final_path=/opt/yunohost/matrix-synapse
2019-03-21 10:52:10,683: DEBUG - 9207 + ynh_backup /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 10:52:10,683: DEBUG - 9208 + local SRC_PATH=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 10:52:10,684: DEBUG - 9209 + local DEST_PATH=
2019-03-21 10:52:10,685: DEBUG - 9210 + local IS_BIG=0
2019-03-21 10:52:10,686: DEBUG - 9211 + local NOT_MANDATORY=0
2019-03-21 10:52:10,687: DEBUG - 9212 + BACKUP_CORE_ONLY=1
2019-03-21 10:52:10,688: DEBUG - 9213 + '[' 0 == 1 ']'
2019-03-21 10:52:10,689: DEBUG - 9214 + [[ -e /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf ]]
2019-03-21 10:52:10,691: DEBUG - 9216 ++ realpath /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 10:52:10,692: DEBUG - 9217 + SRC_PATH=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 10:52:10,693: DEBUG - 9218 + [[ -z '' ]]
2019-03-21 10:52:10,694: DEBUG - 9220 + DEST_PATH=etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 10:52:10,695: DEBUG - 9221 + [[ ! -e etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf ]]
2019-03-21 10:52:10,696: DEBUG - 9222 + local REL_DIR=/apps/synapse/backup
2019-03-21 10:52:10,697: DEBUG - 9222 + REL_DIR=/apps/synapse/backup/
2019-03-21 10:52:10,699: DEBUG - 9223 + DEST_PATH=/apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 10:52:10,700: DEBUG - 9224 + DEST_PATH=apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 10:52:10,701: DEBUG - 9225 ++ echo /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 10:52:10,702: DEBUG - 9226 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,703: DEBUG - 9226 + local SRC=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 10:52:10,704: DEBUG - 9227 ++ echo apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 10:52:10,705: DEBUG - 9228 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,706: DEBUG - 9230 + local DEST=apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 10:52:10,708: DEBUG - 9231 + echo '"/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf","apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf"'
2019-03-21 10:52:10,709: DEBUG - 9232 ++ dirname /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 10:52:10,710: DEBUG - 9233 + mkdir -p /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d
2019-03-21 10:52:10,711: DEBUG - 9234 + ynh_backup /etc/matrix-synapse
2019-03-21 10:52:10,712: DEBUG - 9235 + local SRC_PATH=/etc/matrix-synapse
2019-03-21 10:52:10,713: DEBUG - 9236 + local DEST_PATH=
2019-03-21 10:52:10,715: DEBUG - 9237 + local IS_BIG=0
2019-03-21 10:52:10,716: DEBUG - 9238 + local NOT_MANDATORY=0
2019-03-21 10:52:10,717: DEBUG - 9238 + BACKUP_CORE_ONLY=1
2019-03-21 10:52:10,718: DEBUG - 9239 + '[' 0 == 1 ']'
2019-03-21 10:52:10,719: DEBUG - 9240 + [[ -e /etc/matrix-synapse ]]
2019-03-21 10:52:10,720: DEBUG - 9241 ++ realpath /etc/matrix-synapse
2019-03-21 10:52:10,721: DEBUG - 9241 + SRC_PATH=/etc/matrix-synapse
2019-03-21 10:52:10,723: DEBUG - 9242 + [[ -z '' ]]
2019-03-21 10:52:10,724: DEBUG - 9243 + DEST_PATH=etc/matrix-synapse
2019-03-21 10:52:10,725: DEBUG - 9244 + [[ ! -e etc/matrix-synapse ]]
2019-03-21 10:52:10,726: DEBUG - 9244 + local REL_DIR=/apps/synapse/backup
2019-03-21 10:52:10,727: DEBUG - 9245 + REL_DIR=/apps/synapse/backup/
2019-03-21 10:52:10,728: DEBUG - 9246 + DEST_PATH=/apps/synapse/backup/etc/matrix-synapse
2019-03-21 10:52:10,729: DEBUG - 9247 + DEST_PATH=apps/synapse/backup/etc/matrix-synapse
2019-03-21 10:52:10,731: DEBUG - 9248 ++ echo /etc/matrix-synapse
2019-03-21 10:52:10,732: DEBUG - 9249 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,733: DEBUG - 9249 + local SRC=/etc/matrix-synapse
2019-03-21 10:52:10,734: DEBUG - 9250 ++ echo apps/synapse/backup/etc/matrix-synapse
2019-03-21 10:52:10,735: DEBUG - 9251 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,736: DEBUG - 9252 + local DEST=apps/synapse/backup/etc/matrix-synapse
2019-03-21 10:52:10,737: DEBUG - 9252 + echo '"/etc/matrix-synapse","apps/synapse/backup/etc/matrix-synapse"'
2019-03-21 10:52:10,738: DEBUG - 9253 ++ dirname /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/matrix-synapse
2019-03-21 10:52:10,740: DEBUG - 9254 + mkdir -p /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc
2019-03-21 10:52:10,741: DEBUG - 9255 + ynh_backup /etc/default/matrix-synapse
2019-03-21 10:52:10,742: DEBUG - 9256 + local SRC_PATH=/etc/default/matrix-synapse
2019-03-21 10:52:10,743: DEBUG - 9257 + local DEST_PATH=
2019-03-21 10:52:10,744: DEBUG - 9258 + local IS_BIG=0
2019-03-21 10:52:10,745: DEBUG - 9259 + local NOT_MANDATORY=0
2019-03-21 10:52:10,746: DEBUG - 9259 + BACKUP_CORE_ONLY=1
2019-03-21 10:52:10,747: DEBUG - 9260 + '[' 0 == 1 ']'
2019-03-21 10:52:10,749: DEBUG - 9261 + [[ -e /etc/default/matrix-synapse ]]
2019-03-21 10:52:10,750: DEBUG - 9262 ++ realpath /etc/default/matrix-synapse
2019-03-21 10:52:10,751: DEBUG - 9262 + SRC_PATH=/etc/default/matrix-synapse
2019-03-21 10:52:10,752: DEBUG - 9263 + [[ -z '' ]]
2019-03-21 10:52:10,753: DEBUG - 9264 + DEST_PATH=etc/default/matrix-synapse
2019-03-21 10:52:10,754: DEBUG - 9265 + [[ ! -e etc/default/matrix-synapse ]]
2019-03-21 10:52:10,755: DEBUG - 9265 + local REL_DIR=/apps/synapse/backup
2019-03-21 10:52:10,757: DEBUG - 9266 + REL_DIR=/apps/synapse/backup/
2019-03-21 10:52:10,758: DEBUG - 9267 + DEST_PATH=/apps/synapse/backup/etc/default/matrix-synapse
2019-03-21 10:52:10,759: DEBUG - 9267 + DEST_PATH=apps/synapse/backup/etc/default/matrix-synapse
2019-03-21 10:52:10,760: DEBUG - 9268 ++ echo /etc/default/matrix-synapse
2019-03-21 10:52:10,761: DEBUG - 9273 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,762: DEBUG - 9274 + local SRC=/etc/default/matrix-synapse
2019-03-21 10:52:10,763: DEBUG - 9275 ++ echo apps/synapse/backup/etc/default/matrix-synapse
2019-03-21 10:52:10,764: DEBUG - 9277 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,766: DEBUG - 9278 + local DEST=apps/synapse/backup/etc/default/matrix-synapse
2019-03-21 10:52:10,767: DEBUG - 9279 + echo '"/etc/default/matrix-synapse","apps/synapse/backup/etc/default/matrix-synapse"'
2019-03-21 10:52:10,768: DEBUG - 9280 ++ dirname /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/default/matrix-synapse
2019-03-21 10:52:10,769: DEBUG - 9282 + mkdir -p /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/default
2019-03-21 10:52:10,770: DEBUG - 9283 + ynh_backup /etc/systemd/system/matrix-synapse.service
2019-03-21 10:52:10,771: DEBUG - 9284 + local SRC_PATH=/etc/systemd/system/matrix-synapse.service
2019-03-21 10:52:10,772: DEBUG - 9286 + local DEST_PATH=
2019-03-21 10:52:10,774: DEBUG - 9287 + local IS_BIG=0
2019-03-21 10:52:10,775: DEBUG - 9288 + local NOT_MANDATORY=0
2019-03-21 10:52:10,776: DEBUG - 9289 + BACKUP_CORE_ONLY=1
2019-03-21 10:52:10,777: DEBUG - 9291 + '[' 0 == 1 ']'
2019-03-21 10:52:10,778: DEBUG - 9292 + [[ -e /etc/systemd/system/matrix-synapse.service ]]
2019-03-21 10:52:10,779: DEBUG - 9293 ++ realpath /etc/systemd/system/matrix-synapse.service
2019-03-21 10:52:10,780: DEBUG - 9294 + SRC_PATH=/etc/systemd/system/matrix-synapse.service
2019-03-21 10:52:10,781: DEBUG - 9296 + [[ -z '' ]]
2019-03-21 10:52:10,783: DEBUG - 9297 + DEST_PATH=etc/systemd/system/matrix-synapse.service
2019-03-21 10:52:10,784: DEBUG - 9298 + [[ ! -e etc/systemd/system/matrix-synapse.service ]]
2019-03-21 10:52:10,789: DEBUG - 9299 + local REL_DIR=/apps/synapse/backup
2019-03-21 10:52:10,790: DEBUG - 9301 + REL_DIR=/apps/synapse/backup/
2019-03-21 10:52:10,791: DEBUG - 9302 + DEST_PATH=/apps/synapse/backup/etc/systemd/system/matrix-synapse.service
2019-03-21 10:52:10,793: DEBUG - 9303 + DEST_PATH=apps/synapse/backup/etc/systemd/system/matrix-synapse.service
2019-03-21 10:52:10,794: DEBUG - 9304 ++ echo /etc/systemd/system/matrix-synapse.service
2019-03-21 10:52:10,795: DEBUG - 9306 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,795: DEBUG - 9307 + local SRC=/etc/systemd/system/matrix-synapse.service
2019-03-21 10:52:10,796: DEBUG - 9308 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,798: DEBUG - 9309 ++ echo apps/synapse/backup/etc/systemd/system/matrix-synapse.service
2019-03-21 10:52:10,799: DEBUG - 9310 + local DEST=apps/synapse/backup/etc/systemd/system/matrix-synapse.service
2019-03-21 10:52:10,800: DEBUG - 9311 + echo '"/etc/systemd/system/matrix-synapse.service","apps/synapse/backup/etc/systemd/system/matrix-synapse.service"'
2019-03-21 10:52:10,802: DEBUG - 9313 ++ dirname /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/systemd/system/matrix-synapse.service
2019-03-21 10:52:10,803: DEBUG - 9314 + mkdir -p /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/systemd/system
2019-03-21 10:52:10,804: DEBUG - 9316 + ynh_backup /etc/default/coturn-synapse
2019-03-21 10:52:10,805: DEBUG - 9317 + local SRC_PATH=/etc/default/coturn-synapse
2019-03-21 10:52:10,806: WARNING - 9392 /var/lib/matrix-synapse will not be saved, because backup_core_only is set.
2019-03-21 10:52:10,809: DEBUG - 9318 + local DEST_PATH=
2019-03-21 10:52:10,810: DEBUG - 9319 + local IS_BIG=0
2019-03-21 10:52:10,811: DEBUG - 9321 + local NOT_MANDATORY=0
2019-03-21 10:52:10,812: DEBUG - 9322 + BACKUP_CORE_ONLY=1
2019-03-21 10:52:10,812: DEBUG - 9322 + '[' 0 == 1 ']'
2019-03-21 10:52:10,813: DEBUG - 9323 + [[ -e /etc/default/coturn-synapse ]]
2019-03-21 10:52:10,814: DEBUG - 9325 ++ realpath /etc/default/coturn-synapse
2019-03-21 10:52:10,815: DEBUG - 9326 + SRC_PATH=/etc/default/coturn-synapse
2019-03-21 10:52:10,815: DEBUG - 9327 + [[ -z '' ]]
2019-03-21 10:52:10,816: DEBUG - 9327 + DEST_PATH=etc/default/coturn-synapse
2019-03-21 10:52:10,817: DEBUG - 9328 + [[ ! -e etc/default/coturn-synapse ]]
2019-03-21 10:52:10,818: DEBUG - 9329 + local REL_DIR=/apps/synapse/backup
2019-03-21 10:52:10,818: DEBUG - 9330 + REL_DIR=/apps/synapse/backup/
2019-03-21 10:52:10,819: DEBUG - 9332 + DEST_PATH=/apps/synapse/backup/etc/default/coturn-synapse
2019-03-21 10:52:10,819: DEBUG - 9333 + DEST_PATH=apps/synapse/backup/etc/default/coturn-synapse
2019-03-21 10:52:10,820: DEBUG - 9334 ++ echo /etc/default/coturn-synapse
2019-03-21 10:52:10,821: DEBUG - 9334 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,821: DEBUG - 9335 + local SRC=/etc/default/coturn-synapse
2019-03-21 10:52:10,822: DEBUG - 9336 ++ echo apps/synapse/backup/etc/default/coturn-synapse
2019-03-21 10:52:10,823: DEBUG - 9337 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,823: DEBUG - 9338 + local DEST=apps/synapse/backup/etc/default/coturn-synapse
2019-03-21 10:52:10,824: DEBUG - 9339 + echo '"/etc/default/coturn-synapse","apps/synapse/backup/etc/default/coturn-synapse"'
2019-03-21 10:52:10,824: DEBUG - 9340 ++ dirname /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/default/coturn-synapse
2019-03-21 10:52:10,825: DEBUG - 9341 + mkdir -p /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/default
2019-03-21 10:52:10,826: DEBUG - 9342 + ynh_backup /etc/systemd/system/coturn-synapse.service
2019-03-21 10:52:10,827: DEBUG - 9344 + local SRC_PATH=/etc/systemd/system/coturn-synapse.service
2019-03-21 10:52:10,828: DEBUG - 9345 + local DEST_PATH=
2019-03-21 10:52:10,829: DEBUG - 9346 + local IS_BIG=0
2019-03-21 10:52:10,830: DEBUG - 9346 + local NOT_MANDATORY=0
2019-03-21 10:52:10,831: DEBUG - 9347 + BACKUP_CORE_ONLY=1
2019-03-21 10:52:10,832: DEBUG - 9348 + '[' 0 == 1 ']'
2019-03-21 10:52:10,832: DEBUG - 9349 + [[ -e /etc/systemd/system/coturn-synapse.service ]]
2019-03-21 10:52:10,833: DEBUG - 9350 ++ realpath /etc/systemd/system/coturn-synapse.service
2019-03-21 10:52:10,834: DEBUG - 9351 + SRC_PATH=/etc/systemd/system/coturn-synapse.service
2019-03-21 10:52:10,835: DEBUG - 9352 + [[ -z '' ]]
2019-03-21 10:52:10,836: DEBUG - 9353 + DEST_PATH=etc/systemd/system/coturn-synapse.service
2019-03-21 10:52:10,837: DEBUG - 9354 + [[ ! -e etc/systemd/system/coturn-synapse.service ]]
2019-03-21 10:52:10,838: DEBUG - 9355 + local REL_DIR=/apps/synapse/backup
2019-03-21 10:52:10,839: DEBUG - 9356 + REL_DIR=/apps/synapse/backup/
2019-03-21 10:52:10,839: DEBUG - 9357 + DEST_PATH=/apps/synapse/backup/etc/systemd/system/coturn-synapse.service
2019-03-21 10:52:10,840: DEBUG - 9358 + DEST_PATH=apps/synapse/backup/etc/systemd/system/coturn-synapse.service
2019-03-21 10:52:10,841: DEBUG - 9359 ++ echo /etc/systemd/system/coturn-synapse.service
2019-03-21 10:52:10,841: DEBUG - 9360 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,842: DEBUG - 9361 + local SRC=/etc/systemd/system/coturn-synapse.service
2019-03-21 10:52:10,843: DEBUG - 9362 ++ echo apps/synapse/backup/etc/systemd/system/coturn-synapse.service
2019-03-21 10:52:10,843: DEBUG - 9363 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,844: DEBUG - 9364 + local DEST=apps/synapse/backup/etc/systemd/system/coturn-synapse.service
2019-03-21 10:52:10,845: DEBUG - 9365 + echo '"/etc/systemd/system/coturn-synapse.service","apps/synapse/backup/etc/systemd/system/coturn-synapse.service"'
2019-03-21 10:52:10,845: DEBUG - 9366 ++ dirname /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/systemd/system/coturn-synapse.service
2019-03-21 10:52:10,846: DEBUG - 9367 + mkdir -p /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/systemd/system
2019-03-21 10:52:10,847: DEBUG - 9368 + ynh_backup /opt/yunohost/matrix-synapse bin
2019-03-21 10:52:10,847: DEBUG - 9369 + local SRC_PATH=/opt/yunohost/matrix-synapse
2019-03-21 10:52:10,848: DEBUG - 9370 + local DEST_PATH=bin
2019-03-21 10:52:10,848: DEBUG - 9371 + local IS_BIG=0
2019-03-21 10:52:10,849: DEBUG - 9372 + local NOT_MANDATORY=0
2019-03-21 10:52:10,850: DEBUG - 9373 + BACKUP_CORE_ONLY=1
2019-03-21 10:52:10,851: DEBUG - 9374 + '[' 0 == 1 ']'
2019-03-21 10:52:10,851: DEBUG - 9375 + [[ -e /opt/yunohost/matrix-synapse ]]
2019-03-21 10:52:10,852: DEBUG - 9376 ++ realpath /opt/yunohost/matrix-synapse
2019-03-21 10:52:10,853: DEBUG - 9377 + SRC_PATH=/opt/yunohost/matrix-synapse
2019-03-21 10:52:10,853: DEBUG - 9378 + [[ -z bin ]]
2019-03-21 10:52:10,854: DEBUG - 9379 + [[ b == \/ ]]
2019-03-21 10:52:10,855: DEBUG - 9380 + [[ n == \/ ]]
2019-03-21 10:52:10,855: DEBUG - 9381 + [[ ! -e bin ]]
2019-03-21 10:52:10,856: DEBUG - 9382 + local REL_DIR=/apps/synapse/backup
2019-03-21 10:52:10,857: DEBUG - 9383 + REL_DIR=/apps/synapse/backup/
2019-03-21 10:52:10,857: DEBUG - 9384 + DEST_PATH=/apps/synapse/backup/bin
2019-03-21 10:52:10,858: DEBUG - 9385 + DEST_PATH=apps/synapse/backup/bin
2019-03-21 10:52:10,859: DEBUG - 9386 ++ echo /opt/yunohost/matrix-synapse
2019-03-21 10:52:10,859: DEBUG - 9387 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,860: DEBUG - 9387 + local SRC=/opt/yunohost/matrix-synapse
2019-03-21 10:52:10,861: DEBUG - 9388 ++ echo apps/synapse/backup/bin
2019-03-21 10:52:10,861: DEBUG - 9389 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:10,862: DEBUG - 9390 + local DEST=apps/synapse/backup/bin
2019-03-21 10:52:10,863: DEBUG - 9390 + echo '"/opt/yunohost/matrix-synapse","apps/synapse/backup/bin"'
2019-03-21 10:52:10,863: DEBUG - 9391 ++ dirname /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/bin
2019-03-21 10:52:10,864: DEBUG - 9393 + mkdir -p /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup
2019-03-21 10:52:10,865: DEBUG - 9394 + ynh_backup /var/lib/matrix-synapse data 1
2019-03-21 10:52:10,866: DEBUG - 9395 + local SRC_PATH=/var/lib/matrix-synapse
2019-03-21 10:52:10,868: DEBUG - 9396 + local DEST_PATH=data
2019-03-21 10:52:10,869: DEBUG - 9397 + local IS_BIG=1
2019-03-21 10:52:10,870: DEBUG - 9397 + local NOT_MANDATORY=0
2019-03-21 10:52:10,871: DEBUG - 9398 + BACKUP_CORE_ONLY=1
2019-03-21 10:52:10,872: DEBUG - 9399 + '[' 1 == 1 ']'
2019-03-21 10:52:10,873: DEBUG - 9400 + '[' 1 == 1 ']'
2019-03-21 10:52:10,873: DEBUG - 9401 + echo '/var/lib/matrix-synapse will not be saved, because backup_core_only is set.'
2019-03-21 10:52:10,874: DEBUG - 9401 + return 0
2019-03-21 10:52:10,875: DEBUG - 9402 + ynh_psql_dump_db matrix_synapse
2019-03-21 10:52:10,875: DEBUG - 9403 + db=matrix_synapse
2019-03-21 10:52:10,876: DEBUG - 9403 + su '--command=pg_dump "matrix_synapse"' postgres
2019-03-21 10:52:11,980: WARNING - 10507 could not change directory to "/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup": Permission denied
2019-03-21 10:52:16,794: DEBUG - 15321 + ynh_backup /var/log/matrix-synapse
2019-03-21 10:52:16,794: DEBUG - 15323 + local SRC_PATH=/var/log/matrix-synapse
2019-03-21 10:52:16,795: DEBUG - 15323 + local DEST_PATH=
2019-03-21 10:52:16,796: DEBUG - 15325 + local IS_BIG=0
2019-03-21 10:52:16,796: DEBUG - 15325 + local NOT_MANDATORY=0
2019-03-21 10:52:16,797: DEBUG - 15326 + BACKUP_CORE_ONLY=1
2019-03-21 10:52:16,798: DEBUG - 15328 + '[' 0 == 1 ']'
2019-03-21 10:52:16,798: DEBUG - 15331 + [[ -e /var/log/matrix-synapse ]]
2019-03-21 10:52:16,799: DEBUG - 15332 ++ realpath /var/log/matrix-synapse
2019-03-21 10:52:16,800: DEBUG - 15334 + SRC_PATH=/var/log/matrix-synapse
2019-03-21 10:52:16,801: DEBUG - 15335 + [[ -z '' ]]
2019-03-21 10:52:16,801: DEBUG - 15336 + DEST_PATH=var/log/matrix-synapse
2019-03-21 10:52:16,802: DEBUG - 15340 + [[ ! -e var/log/matrix-synapse ]]
2019-03-21 10:52:16,803: DEBUG - 15341 + local REL_DIR=/apps/synapse/backup
2019-03-21 10:52:16,804: DEBUG - 15343 + REL_DIR=/apps/synapse/backup/
2019-03-21 10:52:16,805: DEBUG - 15345 + DEST_PATH=/apps/synapse/backup/var/log/matrix-synapse
2019-03-21 10:52:16,806: DEBUG - 15345 + DEST_PATH=apps/synapse/backup/var/log/matrix-synapse
2019-03-21 10:52:16,807: DEBUG - 15346 ++ echo /var/log/matrix-synapse
2019-03-21 10:52:16,807: DEBUG - 15347 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:16,808: DEBUG - 15347 + local SRC=/var/log/matrix-synapse
2019-03-21 10:52:16,809: DEBUG - 15348 ++ echo apps/synapse/backup/var/log/matrix-synapse
2019-03-21 10:52:16,809: DEBUG - 15349 ++ sed -r 's/"/\"\"/g'
2019-03-21 10:52:16,811: DEBUG - 15349 + local DEST=apps/synapse/backup/var/log/matrix-synapse
2019-03-21 10:52:16,812: DEBUG - 15350 + echo '"/var/log/matrix-synapse","apps/synapse/backup/var/log/matrix-synapse"'
2019-03-21 10:52:16,813: DEBUG - 15350 ++ dirname /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/var/log/matrix-synapse
2019-03-21 10:52:16,815: DEBUG - 15351 + mkdir -p /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/var/log
2019-03-21 10:52:16,815: DEBUG - 15352 + ynh_exit_properly
2019-03-21 10:52:16,816: DEBUG - 15352 + local exit_code=0
2019-03-21 10:52:16,817: DEBUG - 15353 + '[' 0 -eq 0 ']'
2019-03-21 10:52:16,823: DEBUG - 15354 + exit 0
2019-03-21 10:52:18,127: DEBUG - 16641 Creating the backup tar archive…
2019-03-21 10:55:02,052: DEBUG - 180629 Backup tar archive created
2019-03-21 10:55:02,088: DEBUG - 180630 Backup created
2019-03-21 10:55:02,089: DEBUG - 180630 action [11945.1] executed in 177.776s
2019-03-21 10:55:02,091: DEBUG - name: synapse-pre-upgrade1
2019-03-21 10:55:02,092: DEBUG - results:
2019-03-21 10:55:02,093: DEBUG -   apps:
2019-03-21 10:55:02,094: DEBUG -     synapse: Success
2019-03-21 10:55:02,095: DEBUG -   system:
2019-03-21 10:55:02,096: DEBUG - size: 604851068
2019-03-21 10:55:02,198: DEBUG - + '[' 0 -eq 0 ']'
2019-03-21 10:55:02,199: DEBUG - + sudo yunohost backup list
2019-03-21 10:55:02,200: DEBUG - + grep -q synapse-pre-upgrade2
2019-03-21 10:55:05,711: DEBUG - + sudo yunohost backup delete synapse-pre-upgrade2
2019-03-21 10:55:08,819: DEBUG - + ynh_install_app_dependencies coturn build-essential python3-dev libffi-dev python3-pip python3-setuptools sqlite3 libssl-dev python3-venv libxml2-dev libxslt1-dev python3-lxml libjpeg-dev libpq-dev postgresql acl
2019-03-21 10:55:08,822: DEBUG - + local 'dependencies=coturn build-essential python3-dev libffi-dev python3-pip python3-setuptools sqlite3 libssl-dev python3-venv libxml2-dev libxslt1-dev python3-lxml libjpeg-dev libpq-dev postgresql acl'
2019-03-21 10:55:08,824: DEBUG - + local 'dependencies=coturn, build-essential, python3-dev, libffi-dev, python3-pip, python3-setuptools, sqlite3, libssl-dev, python3-venv, libxml2-dev, libxslt1-dev, python3-lxml, libjpeg-dev, libpq-dev, postgresql, acl'
2019-03-21 10:55:08,827: DEBUG - + local 'dependencies=coturn, build-essential, python3-dev, libffi-dev, python3-pip, python3-setuptools, sqlite3, libssl-dev, python3-venv, libxml2-dev, libxslt1-dev, python3-lxml, libjpeg-dev, libpq-dev, postgresql, acl'
2019-03-21 10:55:08,828: DEBUG - + local manifest_path=../manifest.json
2019-03-21 10:55:08,830: DEBUG - + '[' '!' -e ../manifest.json ']'
2019-03-21 10:55:08,831: DEBUG - ++ grep '\"version\": ' ../manifest.json
2019-03-21 10:55:08,833: DEBUG - ++ cut -d '"' -f 4
2019-03-21 10:55:08,834: DEBUG - + local version=0.99.2~ynh1
2019-03-21 10:55:08,834: DEBUG - + '[' 11 -eq 0 ']'
2019-03-21 10:55:08,835: DEBUG - + local dep_app=synapse
2019-03-21 10:55:08,836: DEBUG - + cat
2019-03-21 10:55:08,836: DEBUG - + ynh_package_install_from_equivs /tmp/synapse-ynh-deps.control
2019-03-21 10:55:08,837: DEBUG - + local controlfile=/tmp/synapse-ynh-deps.control
2019-03-21 10:55:08,838: DEBUG - ++ grep '^Package: ' /tmp/synapse-ynh-deps.control
2019-03-21 10:55:08,838: DEBUG - ++ cut '-d ' -f 2
2019-03-21 10:55:08,839: DEBUG - + local pkgname=synapse-ynh-deps
2019-03-21 10:55:08,840: DEBUG - ++ grep '^Version: ' /tmp/synapse-ynh-deps.control
2019-03-21 10:55:08,840: DEBUG - ++ cut '-d ' -f 2
2019-03-21 10:55:08,841: DEBUG - + local pkgversion=0.99.2~ynh1
2019-03-21 10:55:08,842: DEBUG - + [[ -z synapse-ynh-deps ]]
2019-03-21 10:55:08,842: DEBUG - + [[ -z 0.99.2~ynh1 ]]
2019-03-21 10:55:08,843: DEBUG - + ynh_package_update
2019-03-21 10:55:08,844: DEBUG - + ynh_apt update
2019-03-21 10:55:08,844: DEBUG - + ynh_wait_dpkg_free
2019-03-21 10:55:08,845: DEBUG - + local try
2019-03-21 10:55:08,846: DEBUG - ++ seq 1 17
2019-03-21 10:55:08,847: DEBUG - + for try in `seq 1 17`
2019-03-21 10:55:08,847: DEBUG - + sudo lsof /var/lib/dpkg/lock
2019-03-21 10:55:09,650: DEBUG - + return 0
2019-03-21 10:55:09,651: DEBUG - + DEBIAN_FRONTEND=noninteractive
2019-03-21 10:55:09,652: DEBUG - + sudo apt-get -y update
2019-03-21 10:55:10,154: DEBUG - Get:1 http://debian.mirrors.ovh.net/debian stretch-updates InRelease [91.0 kB]
2019-03-21 10:55:10,155: DEBUG - Hit:2 http://security.debian.org stretch/updates InRelease
2019-03-21 10:55:10,156: DEBUG - Ign:3 http://debian.mirrors.ovh.net/debian stretch InRelease
2019-03-21 10:55:10,258: DEBUG - Hit:5 http://forge.yunohost.org/debian stretch InRelease
2019-03-21 10:55:10,259: DEBUG - Get:6 http://debian.mirrors.ovh.net/debian stretch Release [118 kB]
2019-03-21 10:55:10,360: DEBUG - Hit:4 http://cdn-fastly.deb.debian.org/debian stretch-backports InRelease
2019-03-21 10:55:10,662: DEBUG - Hit:7 https://apt.cozy.io/debian stretch InRelease
2019-03-21 10:55:10,663: DEBUG - Hit:8 https://download.docker.com/linux/debian stretch InRelease
2019-03-21 10:55:10,664: DEBUG - Hit:9 https://packages.sury.org/php stretch InRelease
2019-03-21 10:55:13,573: DEBUG - Fetched 209 kB in 3s (63.4 kB/s)
2019-03-21 10:55:17,884: DEBUG - Reading package lists...
2019-03-21 10:55:17,985: DEBUG - ++ mktemp -d
2019-03-21 10:55:18,086: DEBUG - + local TMPDIR=/tmp/tmp.YC40n8nYkM
2019-03-21 10:55:18,087: DEBUG - + echo 10
2019-03-21 10:55:18,288: DEBUG - + ynh_wait_dpkg_free
2019-03-21 10:55:18,289: DEBUG - + local try
2019-03-21 10:55:18,290: DEBUG - ++ seq 1 17
2019-03-21 10:55:18,291: DEBUG - + for try in `seq 1 17`
2019-03-21 10:55:18,292: DEBUG - + sudo lsof /var/lib/dpkg/lock
2019-03-21 10:55:18,994: DEBUG - + return 0
2019-03-21 10:55:18,995: DEBUG - + cp /tmp/synapse-ynh-deps.control /tmp/tmp.YC40n8nYkM/control
2019-03-21 10:55:18,995: DEBUG - + cd /tmp/tmp.YC40n8nYkM
2019-03-21 10:55:18,996: DEBUG - + equivs-build ./control
2019-03-21 10:55:22,808: DEBUG - + dpkg --force-depends -i ./synapse-ynh-deps_0.99.2~ynh1_all.deb
2019-03-21 10:55:27,521: DEBUG - (Reading database ... 121050 files and directories currently installed.)
2019-03-21 10:55:27,522: DEBUG - Preparing to unpack .../synapse-ynh-deps_0.99.2~ynh1_all.deb ...
2019-03-21 10:55:27,723: DEBUG - Unpacking synapse-ynh-deps (0.99.2~ynh1) over (0.34.0.1~ynh1) ...
2019-03-21 10:55:28,024: DEBUG - Setting up synapse-ynh-deps (0.99.2~ynh1) ...
2019-03-21 10:55:28,226: DEBUG - + ynh_package_install -f
2019-03-21 10:55:28,228: DEBUG - + ynh_apt --no-remove -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install -f
2019-03-21 10:55:28,229: DEBUG - + ynh_wait_dpkg_free
2019-03-21 10:55:28,231: DEBUG - + local try
2019-03-21 10:55:28,233: DEBUG - ++ seq 1 17
2019-03-21 10:55:28,234: DEBUG - + for try in `seq 1 17`
2019-03-21 10:55:28,236: DEBUG - + sudo lsof /var/lib/dpkg/lock
2019-03-21 10:55:28,939: DEBUG - + return 0
2019-03-21 10:55:28,940: DEBUG - + DEBIAN_FRONTEND=noninteractive
2019-03-21 10:55:28,941: DEBUG - + sudo apt-get -y --no-remove -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install -f
2019-03-21 10:55:29,744: DEBUG - Reading package lists...
2019-03-21 10:55:30,347: DEBUG - Building dependency tree...
2019-03-21 10:55:30,348: DEBUG - Reading state information...
2019-03-21 10:55:31,151: DEBUG - The following packages were automatically installed and are no longer required:
2019-03-21 10:55:31,152: DEBUG -   libstdc++-4.9-dev libzip5
2019-03-21 10:55:31,153: DEBUG - Use 'sudo apt autoremove' to remove them.
2019-03-21 10:55:31,354: DEBUG - 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2019-03-21 10:55:31,355: DEBUG - + [[ -n /tmp/tmp.YC40n8nYkM ]]
2019-03-21 10:55:31,356: DEBUG - + rm -rf /tmp/tmp.YC40n8nYkM
2019-03-21 10:55:31,357: DEBUG - + ynh_package_is_installed synapse-ynh-deps
2019-03-21 10:55:31,357: DEBUG - + ynh_wait_dpkg_free
2019-03-21 10:55:31,358: DEBUG - + local try
2019-03-21 10:55:31,359: DEBUG - ++ seq 1 17
2019-03-21 10:55:31,360: DEBUG - + for try in `seq 1 17`
2019-03-21 10:55:31,360: DEBUG - + sudo lsof /var/lib/dpkg/lock
2019-03-21 10:55:31,963: DEBUG - + return 0
2019-03-21 10:55:31,963: DEBUG - + dpkg-query -W -f '${Status}' synapse-ynh-deps
2019-03-21 10:55:31,964: DEBUG - + grep -c 'ok installed'
2019-03-21 10:55:32,165: DEBUG - + rm /tmp/synapse-ynh-deps.control
2019-03-21 10:55:32,166: DEBUG - + ynh_app_setting_set synapse apt_dependencies coturn, build-essential, python3-dev, libffi-dev, python3-pip, python3-setuptools, sqlite3, libssl-dev, python3-venv, libxml2-dev, libxslt1-dev, python3-lxml, libjpeg-dev, libpq-dev, postgresql, acl
2019-03-21 10:55:32,167: DEBUG - + sudo yunohost app setting synapse apt_dependencies --value=coturn, --quiet
2019-03-21 10:55:35,175: DEBUG - + test -e /opt/yunohost/matrix-synapse/bin/python3
2019-03-21 10:55:35,176: DEBUG - ++ grep arm
2019-03-21 10:55:35,177: DEBUG - ++ uname -m
2019-03-21 10:55:35,178: DEBUG - + '[' -n '' ']'
2019-03-21 10:55:35,179: DEBUG - + test -e /opt/yunohost/matrix-synapse/bin/python3
2019-03-21 10:55:35,180: DEBUG - + cp ../conf/virtualenv_activate /opt/yunohost/matrix-synapse/bin/activate
2019-03-21 10:55:35,181: DEBUG - + ynh_replace_string __FINAL_PATH__ /opt/yunohost/matrix-synapse /opt/yunohost/matrix-synapse/bin/activate
2019-03-21 10:55:35,182: DEBUG - + local delimit=@
2019-03-21 10:55:35,183: DEBUG - + local match_string=__FINAL_PATH__
2019-03-21 10:55:35,184: DEBUG - + local replace_string=/opt/yunohost/matrix-synapse
2019-03-21 10:55:35,185: DEBUG - + local workfile=/opt/yunohost/matrix-synapse/bin/activate
2019-03-21 10:55:35,186: DEBUG - + match_string=__FINAL_PATH__
2019-03-21 10:55:35,187: DEBUG - + replace_string=/opt/yunohost/matrix-synapse
2019-03-21 10:55:35,188: DEBUG - + sudo sed --in-place s@__FINAL_PATH__@/opt/yunohost/matrix-synapse@g /opt/yunohost/matrix-synapse/bin/activate
2019-03-21 10:55:35,189: DEBUG - + source /opt/yunohost/matrix-synapse/bin/activate
2019-03-21 10:55:35,190: DEBUG - ++ deactivate nondestructive
2019-03-21 10:55:35,191: DEBUG - ++ '[' -n '' ']'
2019-03-21 10:55:35,192: DEBUG - ++ '[' -n '' ']'
2019-03-21 10:55:35,193: DEBUG - ++ '[' -n /bin/bash -o -n '' ']'
2019-03-21 10:55:35,193: DEBUG - ++ hash -r
2019-03-21 10:55:35,194: DEBUG - ++ '[' -n '' ']'
2019-03-21 10:55:35,195: DEBUG - ++ unset VIRTUAL_ENV
2019-03-21 10:55:35,195: DEBUG - ++ '[' '!' nondestructive = nondestructive ']'
2019-03-21 10:55:35,196: DEBUG - ++ VIRTUAL_ENV=/opt/yunohost/matrix-synapse
2019-03-21 10:55:35,197: DEBUG - ++ export VIRTUAL_ENV
2019-03-21 10:55:35,198: DEBUG - ++ _OLD_VIRTUAL_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2019-03-21 10:55:35,198: DEBUG - ++ PATH=/opt/yunohost/matrix-synapse/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2019-03-21 10:55:35,199: DEBUG - ++ export PATH
2019-03-21 10:55:35,200: DEBUG - ++ '[' -n '' ']'
2019-03-21 10:55:35,200: DEBUG - ++ '[' -z '' ']'
2019-03-21 10:55:35,202: DEBUG - ++ _OLD_VIRTUAL_PS1=
2019-03-21 10:55:35,202: DEBUG - ++ '[' 'x(new) ' '!=' x ']'
2019-03-21 10:55:35,203: DEBUG - ++ PS1='(new) '
2019-03-21 10:55:35,204: DEBUG - ++ export PS1
2019-03-21 10:55:35,204: DEBUG - ++ '[' -n /bin/bash -o -n '' ']'
2019-03-21 10:55:35,206: DEBUG - ++ hash -r
2019-03-21 10:55:35,207: DEBUG - + pip3 install --upgrade setuptools wheel
2019-03-21 10:55:46,141: DEBUG - Requirement already up-to-date: setuptools in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages
2019-03-21 10:55:46,543: DEBUG - Collecting wheel
2019-03-21 10:55:46,945: DEBUG -   Downloading https://files.pythonhosted.org/packages/96/ba/a4702cbb6a3a485239fbe9525443446203f00771af9ac000fa3ef2788201/wheel-0.33.1-py2.py3-none-any.whl
2019-03-21 10:55:46,946: DEBUG - Installing collected packages: wheel
2019-03-21 10:55:46,947: DEBUG -   Found existing installation: wheel 0.33.0
2019-03-21 10:55:47,048: DEBUG -     Uninstalling wheel-0.33.0:
2019-03-21 10:55:47,049: DEBUG -       Successfully uninstalled wheel-0.33.0
2019-03-21 10:55:47,351: DEBUG - Successfully installed wheel-0.33.1
2019-03-21 10:55:47,753: DEBUG - + pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml
2019-03-21 10:55:55,374: DEBUG - Collecting cffi
2019-03-21 10:55:56,779: DEBUG -   Downloading https://files.pythonhosted.org/packages/5b/44/fdae2a8f66af426055f9b6fff0b155217081eddaf08a3df79ca11fe05bda/cffi-1.12.2-cp35-cp35m-manylinux1_x86_64.whl (428kB)
2019-03-21 10:55:57,080: DEBUG - Requirement already up-to-date: ndg-httpsclient in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages
2019-03-21 10:55:57,783: DEBUG - Requirement already up-to-date: psycopg2 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages
2019-03-21 10:55:59,790: DEBUG - Collecting lxml
2019-03-21 10:56:01,496: DEBUG -   Downloading https://files.pythonhosted.org/packages/a5/7d/b8a6d59c563a7b10ab97e0621af91badf892d0a3c5f3a68f5e3fa892c347/lxml-4.3.2-cp35-cp35m-manylinux1_x86_64.whl (5.6MB)
2019-03-21 10:56:04,304: DEBUG - Requirement already up-to-date: pycparser in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from cffi)
2019-03-21 10:56:04,807: DEBUG - Requirement already up-to-date: pyasn1>=0.1.1 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from ndg-httpsclient)
2019-03-21 10:56:05,009: DEBUG - Requirement already up-to-date: PyOpenSSL in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from ndg-httpsclient)
2019-03-21 10:56:07,015: DEBUG - Collecting cryptography>=2.3 (from PyOpenSSL->ndg-httpsclient)
2019-03-21 10:56:09,025: DEBUG -   Downloading https://files.pythonhosted.org/packages/5b/12/b0409a94dad366d98a8eee2a77678c7a73aafd8c0e4b835abea634ea3896/cryptography-2.6.1-cp34-abi3-manylinux1_x86_64.whl (2.3MB)
2019-03-21 10:56:10,630: DEBUG - Requirement already up-to-date: six>=1.5.2 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from PyOpenSSL->ndg-httpsclient)
2019-03-21 10:56:10,831: DEBUG - Requirement already up-to-date: asn1crypto>=0.21.0 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from cryptography>=2.3->PyOpenSSL->ndg-httpsclient)
2019-03-21 10:56:10,932: DEBUG - Installing collected packages: cffi, lxml, cryptography
2019-03-21 10:56:10,934: DEBUG -   Found existing installation: cffi 1.12.1
2019-03-21 10:56:10,935: DEBUG -     Uninstalling cffi-1.12.1:
2019-03-21 10:56:11,037: DEBUG -       Successfully uninstalled cffi-1.12.1
2019-03-21 10:56:11,339: DEBUG -   Found existing installation: lxml 4.3.1
2019-03-21 10:56:11,640: DEBUG -     Uninstalling lxml-4.3.1:
2019-03-21 10:56:11,641: DEBUG -       Successfully uninstalled lxml-4.3.1
2019-03-21 10:56:12,143: DEBUG -   Found existing installation: cryptography 2.5
2019-03-21 10:56:12,445: DEBUG -     Uninstalling cryptography-2.5:
2019-03-21 10:56:12,546: DEBUG -       Successfully uninstalled cryptography-2.5
2019-03-21 10:56:13,850: DEBUG - Successfully installed cffi-1.12.2 cryptography-2.6.1 lxml-4.3.2
2019-03-21 10:56:14,352: DEBUG - + pip3 install --upgrade matrix-synapse==0.99.2 matrix-synapse-ldap3
2019-03-21 10:56:20,066: DEBUG - Collecting matrix-synapse==0.99.2
2019-03-21 10:56:21,171: DEBUG -   Downloading https://files.pythonhosted.org/packages/ca/4d/2360cf333265c8991c63ad2e565ad39a01a8b0a25d6906fca25ee9fdff15/matrix-synapse-0.99.2.tar.gz (1.7MB)
2019-03-21 10:56:27,489: DEBUG - Requirement already up-to-date: matrix-synapse-ldap3 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages
2019-03-21 10:56:27,791: DEBUG - Collecting jsonschema>=2.5.1 (from matrix-synapse==0.99.2)
2019-03-21 10:56:27,892: DEBUG -   Downloading https://files.pythonhosted.org/packages/aa/69/df679dfbdd051568b53c38ec8152a3ab6bc533434fc7ed11ab034bf5e82f/jsonschema-3.0.1-py2.py3-none-any.whl (54kB)
2019-03-21 10:56:28,294: DEBUG - Requirement already up-to-date: frozendict>=1 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:28,396: DEBUG - Requirement already up-to-date: unpaddedbase64>=1.1.0 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:28,497: DEBUG - Requirement already up-to-date: canonicaljson>=1.1.3 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:28,598: DEBUG - Requirement already up-to-date: signedjson>=1.0.0 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:29,100: DEBUG - Requirement already up-to-date: pynacl>=1.2.1 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:29,201: DEBUG - Requirement already up-to-date: service_identity>=16.0.0 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:29,704: DEBUG - Requirement already up-to-date: Twisted>=18.7.0 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:30,105: DEBUG - Requirement already up-to-date: treq>=15.1 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:30,407: DEBUG - Requirement already up-to-date: pyopenssl>=16.0.0 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:30,709: DEBUG - Collecting pyyaml>=3.11 (from matrix-synapse==0.99.2)
2019-03-21 10:56:30,910: DEBUG -   Downloading https://files.pythonhosted.org/packages/9f/2c/9417b5c774792634834e730932745bc09a7d36754ca00acf1ccd1ac2594d/PyYAML-5.1.tar.gz (274kB)
2019-03-21 10:56:33,818: DEBUG - Requirement already up-to-date: pyasn1>=0.1.9 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:34,253: DEBUG - Requirement already up-to-date: pyasn1-modules>=0.0.7 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:34,454: DEBUG - Requirement already up-to-date: daemonize>=2.3.1 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:35,057: DEBUG - Requirement already up-to-date: bcrypt>=3.1.0 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:37,563: DEBUG - Requirement already up-to-date: pillow>=3.1.2 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:37,765: DEBUG - Requirement already up-to-date: sortedcontainers>=1.4.4 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:39,169: DEBUG - Collecting psutil>=2.0.0 (from matrix-synapse==0.99.2)
2019-03-21 10:56:40,473: DEBUG -   Downloading https://files.pythonhosted.org/packages/2f/b8/11ec5006d2ec2998cb68349b8d1317c24c284cf918ecd6729739388e4c56/psutil-5.6.1.tar.gz (427kB)
2019-03-21 10:56:44,184: DEBUG - Collecting pymacaroons>=0.13.0 (from matrix-synapse==0.99.2)
2019-03-21 10:56:44,490: DEBUG -   Downloading https://files.pythonhosted.org/packages/d8/87/fd9b54258216e3f19671f6e9dd76da1ebc49e93ea0107c986b1071dd3068/pymacaroons-0.13.0-py2.py3-none-any.whl
2019-03-21 10:56:44,993: DEBUG - Collecting msgpack>=0.5.0 (from matrix-synapse==0.99.2)
2019-03-21 10:56:45,395: DEBUG -   Downloading https://files.pythonhosted.org/packages/3d/44/4a8be4f56ab3c8fc58800c06b2d681d5622704746d094411f00e25300072/msgpack-0.6.1-cp35-cp35m-manylinux1_x86_64.whl (243kB)
2019-03-21 10:56:46,198: DEBUG - Collecting phonenumbers>=8.2.0 (from matrix-synapse==0.99.2)
2019-03-21 10:56:46,601: DEBUG -   Downloading https://files.pythonhosted.org/packages/c4/fc/6b203d9390ddf806e572f0de13c10c677b9b0f23a9710cf168df73c3a66e/phonenumbers-8.10.7-py2.py3-none-any.whl (3.1MB)
2019-03-21 10:56:48,709: DEBUG - Requirement already up-to-date: six>=1.10 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:48,810: DEBUG - Requirement already up-to-date: prometheus_client<0.4.0,>=0.0.18 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:49,012: DEBUG - Collecting attrs>=17.4.0 (from matrix-synapse==0.99.2)
2019-03-21 10:56:49,114: DEBUG -   Downloading https://files.pythonhosted.org/packages/23/96/d828354fa2dbdf216eaa7b7de0db692f12c234f7ef888cc14980ef40d1d2/attrs-19.1.0-py2.py3-none-any.whl
2019-03-21 10:56:49,516: DEBUG - Requirement already up-to-date: netaddr>=0.7.18 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse==0.99.2)
2019-03-21 10:56:49,919: DEBUG - Requirement already up-to-date: ldap3>=0.9.5 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from matrix-synapse-ldap3)
2019-03-21 10:56:50,121: DEBUG - Collecting pyrsistent>=0.14.0 (from jsonschema>=2.5.1->matrix-synapse==0.99.2)
2019-03-21 10:56:50,423: DEBUG -   Downloading https://files.pythonhosted.org/packages/8c/46/4e93ab8a379d7efe93f20a0fb8a27bdfe88942cc954ab0210c3164e783e0/pyrsistent-0.14.11.tar.gz (104kB)
2019-03-21 10:56:54,634: DEBUG - Requirement already up-to-date: setuptools in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from jsonschema>=2.5.1->matrix-synapse==0.99.2)
2019-03-21 10:56:55,237: DEBUG - Requirement already up-to-date: simplejson>=3.6.5 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from canonicaljson>=1.1.3->matrix-synapse==0.99.2)
2019-03-21 10:56:56,441: DEBUG - Requirement already up-to-date: cffi>=1.4.1 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from pynacl>=1.2.1->matrix-synapse==0.99.2)
2019-03-21 10:56:58,546: DEBUG - Requirement already up-to-date: cryptography in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from service_identity>=16.0.0->matrix-synapse==0.99.2)
2019-03-21 10:56:59,750: DEBUG - Requirement already up-to-date: zope.interface>=4.4.2 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from Twisted>=18.7.0->matrix-synapse==0.99.2)
2019-03-21 10:56:59,952: DEBUG - Requirement already up-to-date: constantly>=15.1 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from Twisted>=18.7.0->matrix-synapse==0.99.2)
2019-03-21 10:57:00,053: DEBUG - Requirement already up-to-date: incremental>=16.10.1 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from Twisted>=18.7.0->matrix-synapse==0.99.2)
2019-03-21 10:57:00,254: DEBUG - Requirement already up-to-date: Automat>=0.3.0 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from Twisted>=18.7.0->matrix-synapse==0.99.2)
2019-03-21 10:57:00,456: DEBUG - Requirement already up-to-date: hyperlink>=17.1.1 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from Twisted>=18.7.0->matrix-synapse==0.99.2)
2019-03-21 10:57:00,658: DEBUG - Requirement already up-to-date: PyHamcrest>=1.9.0 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from Twisted>=18.7.0->matrix-synapse==0.99.2)
2019-03-21 10:57:01,160: DEBUG - Requirement already up-to-date: requests>=2.1.0 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from treq>=15.1->matrix-synapse==0.99.2)
2019-03-21 10:57:01,361: DEBUG - Requirement already up-to-date: pycparser in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from cffi>=1.4.1->pynacl>=1.2.1->matrix-synapse==0.99.2)
2019-03-21 10:57:01,463: DEBUG - Requirement already up-to-date: asn1crypto>=0.21.0 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from cryptography->service_identity>=16.0.0->matrix-synapse==0.99.2)
2019-03-21 10:57:01,665: DEBUG - Requirement already up-to-date: idna>=2.5 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from hyperlink>=17.1.1->Twisted>=18.7.0->matrix-synapse==0.99.2)
2019-03-21 10:57:01,766: DEBUG - Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from requests>=2.1.0->treq>=15.1->matrix-synapse==0.99.2)
2019-03-21 10:57:02,069: DEBUG - Requirement already up-to-date: urllib3<1.25,>=1.21.1 in /opt/yunohost/matrix-synapse/lib/python3.5/site-packages (from requests>=2.1.0->treq>=15.1->matrix-synapse==0.99.2)
2019-03-21 10:57:02,371: DEBUG - Collecting certifi>=2017.4.17 (from requests>=2.1.0->treq>=15.1->matrix-synapse==0.99.2)
2019-03-21 10:57:02,472: DEBUG -   Downloading https://files.pythonhosted.org/packages/60/75/f692a584e85b7eaba0e03827b3d51f45f571c2e793dd731e598828d380aa/certifi-2019.3.9-py2.py3-none-any.whl (158kB)
2019-03-21 10:57:02,574: DEBUG - Building wheels for collected packages: matrix-synapse, pyyaml, psutil, pyrsistent
2019-03-21 10:57:02,575: DEBUG -   Running setup.py bdist_wheel for matrix-synapse: started
2019-03-21 10:57:08,392: DEBUG -   Running setup.py bdist_wheel for matrix-synapse: finished with status 'done'
2019-03-21 10:57:08,393: DEBUG -   Stored in directory: /root/.cache/pip/wheels/66/1d/4a/af1fcedcad0c57a733bbb2efdf4efd3d2d868938f9257f349b
2019-03-21 10:57:09,296: DEBUG -   Running setup.py bdist_wheel for pyyaml: started
2019-03-21 10:57:41,178: DEBUG -   Running setup.py bdist_wheel for pyyaml: finished with status 'done'
2019-03-21 10:57:41,189: DEBUG -   Stored in directory: /root/.cache/pip/wheels/ad/56/bc/1522f864feb2a358ea6f1a92b4798d69ac783a28e80567a18b
2019-03-21 10:57:41,290: DEBUG -   Running setup.py bdist_wheel for psutil: started
2019-03-21 10:57:48,109: DEBUG -   Running setup.py bdist_wheel for psutil: finished with status 'done'
2019-03-21 10:57:48,110: DEBUG -   Stored in directory: /root/.cache/pip/wheels/86/36/f4/e1fc49f198c623b8dc2156e80011a52f19a959d538f6b1a5db
2019-03-21 10:57:48,211: DEBUG -   Running setup.py bdist_wheel for pyrsistent: started
2019-03-21 10:57:52,425: DEBUG -   Running setup.py bdist_wheel for pyrsistent: finished with status 'done'
2019-03-21 10:57:52,425: DEBUG -   Stored in directory: /root/.cache/pip/wheels/83/59/9a/a037b9b3c3e93d9275ea0aff9d6064400f372879dfdab01afe
2019-03-21 10:57:52,426: DEBUG - Successfully built matrix-synapse pyyaml psutil pyrsistent
2019-03-21 10:57:52,427: DEBUG - Installing collected packages: pyrsistent, attrs, jsonschema, pyyaml, psutil, pymacaroons, msgpack, phonenumbers, matrix-synapse, certifi
2019-03-21 10:57:52,929: DEBUG -   Found existing installation: attrs 18.2.0
2019-03-21 10:57:53,030: DEBUG -     Uninstalling attrs-18.2.0:
2019-03-21 10:57:53,032: DEBUG -       Successfully uninstalled attrs-18.2.0
2019-03-21 10:57:53,133: DEBUG -   Found existing installation: jsonschema 2.6.0
2019-03-21 10:57:53,234: DEBUG -     Uninstalling jsonschema-2.6.0:
2019-03-21 10:57:53,236: DEBUG -       Successfully uninstalled jsonschema-2.6.0
2019-03-21 10:57:53,538: DEBUG -   Found existing installation: PyYAML 3.13
2019-03-21 10:57:53,539: DEBUG -     Uninstalling PyYAML-3.13:
2019-03-21 10:57:53,540: DEBUG -       Successfully uninstalled PyYAML-3.13
2019-03-21 10:57:53,842: DEBUG -   Found existing installation: psutil 5.5.1
2019-03-21 10:57:53,943: DEBUG -     Uninstalling psutil-5.5.1:
2019-03-21 10:57:53,944: DEBUG -       Successfully uninstalled psutil-5.5.1
2019-03-21 10:57:54,748: DEBUG -   Found existing installation: phonenumbers 8.10.5
2019-03-21 10:57:57,056: DEBUG -     Uninstalling phonenumbers-8.10.5:
2019-03-21 10:57:58,261: DEBUG -       Successfully uninstalled phonenumbers-8.10.5
2019-03-21 10:58:15,619: DEBUG -   Found existing installation: matrix-synapse 0.34.0.1
2019-03-21 10:58:17,123: DEBUG -     Uninstalling matrix-synapse-0.34.0.1:
2019-03-21 10:58:17,826: DEBUG -       Successfully uninstalled matrix-synapse-0.34.0.1
2019-03-21 10:58:21,435: DEBUG -   Found existing installation: certifi 2018.11.29
2019-03-21 10:58:21,436: DEBUG -     Uninstalling certifi-2018.11.29:
2019-03-21 10:58:21,437: DEBUG -       Successfully uninstalled certifi-2018.11.29
2019-03-21 10:58:23,142: DEBUG - Successfully installed attrs-19.1.0 certifi-2019.3.9 jsonschema-3.0.1 matrix-synapse-0.99.2 msgpack-0.6.1 phonenumbers-8.10.7 psutil-5.6.1 pymacaroons-0.13.0 pyrsistent-0.14.11 pyyaml-5.1
2019-03-21 10:58:23,945: DEBUG - + deactivate
2019-03-21 10:58:23,946: DEBUG - + '[' -n /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ']'
2019-03-21 10:58:23,947: DEBUG - + PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2019-03-21 10:58:23,948: DEBUG - + export PATH
2019-03-21 10:58:23,948: DEBUG - + unset _OLD_VIRTUAL_PATH
2019-03-21 10:58:23,950: DEBUG - + '[' -n '' ']'
2019-03-21 10:58:23,950: DEBUG - + '[' -n /bin/bash -o -n '' ']'
2019-03-21 10:58:23,951: DEBUG - + hash -r
2019-03-21 10:58:23,952: DEBUG - + '[' -n '' ']'
2019-03-21 10:58:23,953: DEBUG - + unset VIRTUAL_ENV
2019-03-21 10:58:23,954: DEBUG - + '[' '!' '' = nondestructive ']'
2019-03-21 10:58:23,954: DEBUG - + unset -f deactivate
2019-03-21 10:58:23,955: DEBUG - + [[ -z Wk4s2@6fgeH2oI@sBnPNAfLZqMk*3Xz*;cGr~kp^tO;9BCG7lb ]]
2019-03-21 10:58:23,956: DEBUG - + homeserver_config_path=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:23,957: DEBUG - + ynh_backup_if_checksum_is_different /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:23,958: DEBUG - + local file=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:23,959: DEBUG - + local checksum_setting_name=checksum__etc_matrix-synapse_homeserver.yaml
2019-03-21 10:58:23,961: DEBUG - ++ ynh_app_setting_get synapse checksum__etc_matrix-synapse_homeserver.yaml
2019-03-21 10:58:23,962: DEBUG - ++ sudo yunohost app setting synapse checksum__etc_matrix-synapse_homeserver.yaml --output-as plain --quiet
2019-03-21 10:58:27,172: DEBUG - + local checksum_value=de2aecddf60aef864bbfe5f1a0a8584f
2019-03-21 10:58:27,173: DEBUG - + '[' -n de2aecddf60aef864bbfe5f1a0a8584f ']'
2019-03-21 10:58:27,174: DEBUG - + echo 'de2aecddf60aef864bbfe5f1a0a8584f /etc/matrix-synapse/homeserver.yaml'
2019-03-21 10:58:27,175: DEBUG - + sudo md5sum -c --status
2019-03-21 10:58:27,276: DEBUG - + ynh_backup_if_checksum_is_different /etc/matrix-synapse/log.yaml
2019-03-21 10:58:27,277: DEBUG - + local file=/etc/matrix-synapse/log.yaml
2019-03-21 10:58:27,279: DEBUG - + local checksum_setting_name=checksum__etc_matrix-synapse_log.yaml
2019-03-21 10:58:27,280: DEBUG - ++ ynh_app_setting_get synapse checksum__etc_matrix-synapse_log.yaml
2019-03-21 10:58:27,281: DEBUG - ++ sudo yunohost app setting synapse checksum__etc_matrix-synapse_log.yaml --output-as plain --quiet
2019-03-21 10:58:30,189: DEBUG - + local checksum_value=5f6eff4c1341e4493dabd8f66ab4eb0c
2019-03-21 10:58:30,190: DEBUG - + '[' -n 5f6eff4c1341e4493dabd8f66ab4eb0c ']'
2019-03-21 10:58:30,192: DEBUG - + echo '5f6eff4c1341e4493dabd8f66ab4eb0c /etc/matrix-synapse/log.yaml'
2019-03-21 10:58:30,193: DEBUG - + sudo md5sum -c --status
2019-03-21 10:58:30,295: DEBUG - + cp ../conf/homeserver.yaml /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,295: DEBUG - + cp ../conf/log.yaml /etc/matrix-synapse/log.yaml
2019-03-21 10:58:30,296: DEBUG - + ynh_replace_string __APP__ synapse /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,297: DEBUG - + local delimit=@
2019-03-21 10:58:30,298: DEBUG - + local match_string=__APP__
2019-03-21 10:58:30,298: DEBUG - + local replace_string=synapse
2019-03-21 10:58:30,299: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,300: DEBUG - + match_string=__APP__
2019-03-21 10:58:30,301: DEBUG - + replace_string=synapse
2019-03-21 10:58:30,301: DEBUG - + sudo sed --in-place s@__APP__@synapse@g /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,403: DEBUG - + ynh_replace_string __DOMAIN__ matrix.nicofrand.eu /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,405: DEBUG - + local delimit=@
2019-03-21 10:58:30,407: DEBUG - + local match_string=__DOMAIN__
2019-03-21 10:58:30,409: DEBUG - + local replace_string=matrix.nicofrand.eu
2019-03-21 10:58:30,410: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,412: DEBUG - + match_string=__DOMAIN__
2019-03-21 10:58:30,413: DEBUG - + replace_string=matrix.nicofrand.eu
2019-03-21 10:58:30,415: DEBUG - + sudo sed --in-place s@[email protected]@g /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,517: DEBUG - + ynh_replace_string __SYNAPSE_DB_USER__ matrix_synapse /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,517: DEBUG - + local delimit=@
2019-03-21 10:58:30,518: DEBUG - + local match_string=__SYNAPSE_DB_USER__
2019-03-21 10:58:30,519: DEBUG - + local replace_string=matrix_synapse
2019-03-21 10:58:30,519: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,520: DEBUG - + match_string=__SYNAPSE_DB_USER__
2019-03-21 10:58:30,521: DEBUG - + replace_string=matrix_synapse
2019-03-21 10:58:30,521: DEBUG - + sudo sed --in-place s@__SYNAPSE_DB_USER__@matrix_synapse@g /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,522: DEBUG - + ynh_replace_string __SYNAPSE_DB_PWD__ WE0cGCkQAryRES07p9N2xEw8yqD8ob /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,523: DEBUG - + local delimit=@
2019-03-21 10:58:30,523: DEBUG - + local match_string=__SYNAPSE_DB_PWD__
2019-03-21 10:58:30,524: DEBUG - + local replace_string=WE0cGCkQAryRES07p9N2xEw8yqD8ob
2019-03-21 10:58:30,525: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,525: DEBUG - + match_string=__SYNAPSE_DB_PWD__
2019-03-21 10:58:30,526: DEBUG - + replace_string=WE0cGCkQAryRES07p9N2xEw8yqD8ob
2019-03-21 10:58:30,527: DEBUG - + sudo sed --in-place s@__SYNAPSE_DB_PWD__@WE0cGCkQAryRES07p9N2xEw8yqD8ob@g /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,628: DEBUG - + ynh_replace_string __PORT__ 8008 /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,629: DEBUG - + local delimit=@
2019-03-21 10:58:30,630: DEBUG - + local match_string=__PORT__
2019-03-21 10:58:30,631: DEBUG - + local replace_string=8008
2019-03-21 10:58:30,633: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,634: DEBUG - + match_string=__PORT__
2019-03-21 10:58:30,636: DEBUG - + replace_string=8008
2019-03-21 10:58:30,637: DEBUG - + sudo sed --in-place s@__PORT__@8008@g /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,739: DEBUG - + ynh_replace_string __TLS_PORT__ 8448 /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,740: DEBUG - + local delimit=@
2019-03-21 10:58:30,741: DEBUG - + local match_string=__TLS_PORT__
2019-03-21 10:58:30,742: DEBUG - + local replace_string=8448
2019-03-21 10:58:30,743: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,744: DEBUG - + match_string=__TLS_PORT__
2019-03-21 10:58:30,745: DEBUG - + replace_string=8448
2019-03-21 10:58:30,746: DEBUG - + sudo sed --in-place s@__TLS_PORT__@8448@g /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,747: DEBUG - + ynh_replace_string __TURNSERVER_TLS_PORT__ 5349 /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,748: DEBUG - + local delimit=@
2019-03-21 10:58:30,749: DEBUG - + local match_string=__TURNSERVER_TLS_PORT__
2019-03-21 10:58:30,750: DEBUG - + local replace_string=5349
2019-03-21 10:58:30,751: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,752: DEBUG - + match_string=__TURNSERVER_TLS_PORT__
2019-03-21 10:58:30,753: DEBUG - + replace_string=5349
2019-03-21 10:58:30,754: DEBUG - + sudo sed --in-place s@__TURNSERVER_TLS_PORT__@5349@g /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,856: DEBUG - + ynh_replace_special_string __TURNPWD__ 3zMcFqspiCxSzLqehrvuawSpLoftAH /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,857: DEBUG - + local match_string=__TURNPWD__
2019-03-21 10:58:30,858: DEBUG - + local replace_string=3zMcFqspiCxSzLqehrvuawSpLoftAH
2019-03-21 10:58:30,859: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,860: DEBUG - + match_string=__TURNPWD__
2019-03-21 10:58:30,862: DEBUG - + replace_string=3zMcFqspiCxSzLqehrvuawSpLoftAH
2019-03-21 10:58:30,863: DEBUG - + match_string=__TURNPWD__
2019-03-21 10:58:30,864: DEBUG - + replace_string=3zMcFqspiCxSzLqehrvuawSpLoftAH
2019-03-21 10:58:30,866: DEBUG - + ynh_replace_string __TURNPWD__ 3zMcFqspiCxSzLqehrvuawSpLoftAH /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,867: DEBUG - + local delimit=@
2019-03-21 10:58:30,867: DEBUG - + local match_string=__TURNPWD__
2019-03-21 10:58:30,868: DEBUG - + local replace_string=3zMcFqspiCxSzLqehrvuawSpLoftAH
2019-03-21 10:58:30,869: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,869: DEBUG - + match_string=__TURNPWD__
2019-03-21 10:58:30,870: DEBUG - + replace_string=3zMcFqspiCxSzLqehrvuawSpLoftAH
2019-03-21 10:58:30,871: DEBUG - + sudo sed --in-place s@__TURNPWD__@3zMcFqspiCxSzLqehrvuawSpLoftAH@g /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,871: DEBUG - + ynh_replace_special_string __REGISTRATION_SECRET__ 'Wk4s2@6fgeH2oI@sBnPNAfLZqMk*3Xz*;cGr~kp^tO;9BCG7lb' /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,872: DEBUG - + local match_string=__REGISTRATION_SECRET__
2019-03-21 10:58:30,873: DEBUG - + local 'replace_string=Wk4s2@6fgeH2oI@sBnPNAfLZqMk*3Xz*;cGr~kp^tO;9BCG7lb'
2019-03-21 10:58:30,874: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,875: DEBUG - + match_string=__REGISTRATION_SECRET__
2019-03-21 10:58:30,876: DEBUG - + replace_string='Wk4s2@6fgeH2oI@sBnPNAfLZqMk*3Xz*;cGr~kp^tO;9BCG7lb'
2019-03-21 10:58:30,877: DEBUG - + match_string=__REGISTRATION_SECRET__
2019-03-21 10:58:30,879: DEBUG - + replace_string='Wk4s2@6fgeH2oI@sBnPNAfLZqMk*3Xz*;cGr~kp^tO;9BCG7lb'
2019-03-21 10:58:30,880: DEBUG - + ynh_replace_string __REGISTRATION_SECRET__ 'Wk4s2@6fgeH2oI@sBnPNAfLZqMk*3Xz*;cGr~kp^tO;9BCG7lb' /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,881: DEBUG - + local delimit=@
2019-03-21 10:58:30,882: DEBUG - + local match_string=__REGISTRATION_SECRET__
2019-03-21 10:58:30,883: DEBUG - + local 'replace_string=Wk4s2@6fgeH2oI@sBnPNAfLZqMk*3Xz*;cGr~kp^tO;9BCG7lb'
2019-03-21 10:58:30,884: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,884: DEBUG - + match_string=__REGISTRATION_SECRET__
2019-03-21 10:58:30,885: DEBUG - + replace_string='Wk4s2\@6fgeH2oI\@sBnPNAfLZqMk*3Xz*;cGr~kp^tO;9BCG7lb'
2019-03-21 10:58:30,886: DEBUG - + sudo sed --in-place 's@__REGISTRATION_SECRET__@Wk4s2\@6fgeH2oI\@sBnPNAfLZqMk*3Xz*;cGr~kp^tO;9BCG7lb@g' /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,987: DEBUG - + ynh_replace_string __FORM_SECRET__ 'form_secret: ' /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,988: DEBUG - + local delimit=@
2019-03-21 10:58:30,988: DEBUG - + local match_string=__FORM_SECRET__
2019-03-21 10:58:30,990: DEBUG - + local 'replace_string=form_secret: '
2019-03-21 10:58:30,991: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:30,992: DEBUG - + match_string=__FORM_SECRET__
2019-03-21 10:58:30,994: DEBUG - + replace_string='form_secret: '
2019-03-21 10:58:30,995: DEBUG - + sudo sed --in-place 's@__FORM_SECRET__@form_secret: @g' /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:31,096: DEBUG - + ynh_replace_string __REPORT_STATS__ '' /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:31,098: DEBUG - + local delimit=@
2019-03-21 10:58:31,099: DEBUG - + local match_string=__REPORT_STATS__
2019-03-21 10:58:31,100: DEBUG - + local replace_string=
2019-03-21 10:58:31,101: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:31,102: DEBUG - + match_string=__REPORT_STATS__
2019-03-21 10:58:31,103: DEBUG - + replace_string=
2019-03-21 10:58:31,105: DEBUG - + sudo sed --in-place s@__REPORT_STATS__@@g /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:31,106: DEBUG - + ynh_replace_string __APP__ synapse /etc/matrix-synapse/log.yaml
2019-03-21 10:58:31,107: DEBUG - + local delimit=@
2019-03-21 10:58:31,108: DEBUG - + local match_string=__APP__
2019-03-21 10:58:31,109: DEBUG - + local replace_string=synapse
2019-03-21 10:58:31,110: DEBUG - + local workfile=/etc/matrix-synapse/log.yaml
2019-03-21 10:58:31,111: DEBUG - + match_string=__APP__
2019-03-21 10:58:31,112: DEBUG - + replace_string=synapse
2019-03-21 10:58:31,113: DEBUG - + sudo sed --in-place s@__APP__@synapse@g /etc/matrix-synapse/log.yaml
2019-03-21 10:58:31,214: DEBUG - + '[' 0 = 0 ']'
2019-03-21 10:58:31,216: DEBUG - + ynh_replace_string __ALLOWED_ACCESS__ False /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:31,217: DEBUG - + local delimit=@
2019-03-21 10:58:31,218: DEBUG - + local match_string=__ALLOWED_ACCESS__
2019-03-21 10:58:31,219: DEBUG - + local replace_string=False
2019-03-21 10:58:31,220: DEBUG - + local workfile=/etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:31,221: DEBUG - + match_string=__ALLOWED_ACCESS__
2019-03-21 10:58:31,222: DEBUG - + replace_string=False
2019-03-21 10:58:31,223: DEBUG - + sudo sed --in-place s@__ALLOWED_ACCESS__@False@g /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:31,325: DEBUG - + ynh_store_file_checksum /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:31,326: DEBUG - + local checksum_setting_name=checksum__etc_matrix-synapse_homeserver.yaml
2019-03-21 10:58:31,326: DEBUG - ++ sudo md5sum /etc/matrix-synapse/homeserver.yaml
2019-03-21 10:58:31,327: DEBUG - ++ cut '-d ' -f1
2019-03-21 10:58:31,328: DEBUG - + ynh_app_setting_set synapse checksum__etc_matrix-synapse_homeserver.yaml f6b38880211ce72543e2db965fe1f45e
2019-03-21 10:58:31,328: DEBUG - + sudo yunohost app setting synapse checksum__etc_matrix-synapse_homeserver.yaml --value=f6b38880211ce72543e2db965fe1f45e --quiet
2019-03-21 10:58:34,336: DEBUG - + ynh_store_file_checksum /etc/matrix-synapse/log.yaml
2019-03-21 10:58:34,337: DEBUG - + local checksum_setting_name=checksum__etc_matrix-synapse_log.yaml
2019-03-21 10:58:34,339: DEBUG - ++ sudo md5sum /etc/matrix-synapse/log.yaml
2019-03-21 10:58:34,340: DEBUG - ++ cut '-d ' -f1
2019-03-21 10:58:34,341: DEBUG - + ynh_app_setting_set synapse checksum__etc_matrix-synapse_log.yaml 5f6eff4c1341e4493dabd8f66ab4eb0c
2019-03-21 10:58:34,342: DEBUG - + sudo yunohost app setting synapse checksum__etc_matrix-synapse_log.yaml --value=5f6eff4c1341e4493dabd8f66ab4eb0c --quiet
2019-03-21 10:58:37,353: DEBUG - + [[ ! -e /etc/matrix-synapse/coturn.conf ]]
2019-03-21 10:58:37,354: DEBUG - ++ grep 'ssl-cert:x:[0-9]*:.*matrix-synapse' /etc/group
2019-03-21 10:58:37,355: DEBUG - + [[ ! -n ssl-cert:x:112:metronome,www-data,postgres,matrix-synapse,turnserver ]]
2019-03-21 10:58:37,357: DEBUG - + [[ ! -e /etc/ssl/private/dh2048.pem ]]
2019-03-21 10:58:37,358: DEBUG - + openssl dhparam -out /etc/ssl/private/dh2048.pem -outform PEM -2 2048 -dsaparam
2019-03-21 11:00:54,385: DEBUG - + chown root:ssl-cert /etc/ssl/private/dh2048.pem
2019-03-21 11:00:54,486: DEBUG - + chmod 640 /etc/ssl/private/dh2048.pem
2019-03-21 11:00:54,488: DEBUG - + ynh_add_nginx_config
2019-03-21 11:00:54,489: DEBUG - + finalnginxconf=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:54,490: DEBUG - + local others_var=
2019-03-21 11:00:54,491: DEBUG - + ynh_backup_if_checksum_is_different /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:54,492: DEBUG - + local file=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:54,493: DEBUG - + local checksum_setting_name=checksum__etc_nginx_conf.d_matrix.nicofrand.eu.d_synapse.conf
2019-03-21 11:00:54,494: DEBUG - ++ ynh_app_setting_get synapse checksum__etc_nginx_conf.d_matrix.nicofrand.eu.d_synapse.conf
2019-03-21 11:00:54,495: DEBUG - ++ sudo yunohost app setting synapse checksum__etc_nginx_conf.d_matrix.nicofrand.eu.d_synapse.conf --output-as plain --quiet
2019-03-21 11:00:57,405: DEBUG - + local checksum_value=ec82d2afbd7fb39719ce2b6f6617fd22
2019-03-21 11:00:57,406: DEBUG - + '[' -n ec82d2afbd7fb39719ce2b6f6617fd22 ']'
2019-03-21 11:00:57,407: DEBUG - + echo 'ec82d2afbd7fb39719ce2b6f6617fd22 /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf'
2019-03-21 11:00:57,407: DEBUG - + sudo md5sum -c --status
2019-03-21 11:00:57,508: DEBUG - + sudo cp ../conf/nginx.conf /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,610: DEBUG - + test -n /_matrix
2019-03-21 11:00:57,611: DEBUG - + local path_url_slash_less=/_matrix
2019-03-21 11:00:57,612: DEBUG - + ynh_replace_string __PATH__/ /_matrix/ /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,613: DEBUG - + local delimit=@
2019-03-21 11:00:57,614: DEBUG - + local match_string=__PATH__/
2019-03-21 11:00:57,615: DEBUG - + local replace_string=/_matrix/
2019-03-21 11:00:57,616: DEBUG - + local workfile=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,617: DEBUG - + match_string=__PATH__/
2019-03-21 11:00:57,618: DEBUG - + replace_string=/_matrix/
2019-03-21 11:00:57,619: DEBUG - + sudo sed --in-place s@__PATH__/@/_matrix/@g /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,620: DEBUG - + ynh_replace_string __PATH__ /_matrix /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,621: DEBUG - + local delimit=@
2019-03-21 11:00:57,622: DEBUG - + local match_string=__PATH__
2019-03-21 11:00:57,623: DEBUG - + local replace_string=/_matrix
2019-03-21 11:00:57,624: DEBUG - + local workfile=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,625: DEBUG - + match_string=__PATH__
2019-03-21 11:00:57,626: DEBUG - + replace_string=/_matrix
2019-03-21 11:00:57,627: DEBUG - + sudo sed --in-place s@__PATH__@/_matrix@g /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,729: DEBUG - + test -n matrix.nicofrand.eu
2019-03-21 11:00:57,730: DEBUG - + ynh_replace_string __DOMAIN__ matrix.nicofrand.eu /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,731: DEBUG - + local delimit=@
2019-03-21 11:00:57,733: DEBUG - + local match_string=__DOMAIN__
2019-03-21 11:00:57,734: DEBUG - + local replace_string=matrix.nicofrand.eu
2019-03-21 11:00:57,735: DEBUG - + local workfile=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,736: DEBUG - + match_string=__DOMAIN__
2019-03-21 11:00:57,737: DEBUG - + replace_string=matrix.nicofrand.eu
2019-03-21 11:00:57,738: DEBUG - + sudo sed --in-place s@[email protected]@g /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,739: DEBUG - + test -n 8008
2019-03-21 11:00:57,740: DEBUG - + ynh_replace_string __PORT__ 8008 /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,741: DEBUG - + local delimit=@
2019-03-21 11:00:57,742: DEBUG - + local match_string=__PORT__
2019-03-21 11:00:57,743: DEBUG - + local replace_string=8008
2019-03-21 11:00:57,744: DEBUG - + local workfile=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,745: DEBUG - + match_string=__PORT__
2019-03-21 11:00:57,746: DEBUG - + replace_string=8008
2019-03-21 11:00:57,746: DEBUG - + sudo sed --in-place s@__PORT__@8008@g /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,848: DEBUG - + test -n synapse
2019-03-21 11:00:57,849: DEBUG - + ynh_replace_string __NAME__ synapse /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,850: DEBUG - + local delimit=@
2019-03-21 11:00:57,853: DEBUG - + local match_string=__NAME__
2019-03-21 11:00:57,854: DEBUG - + local replace_string=synapse
2019-03-21 11:00:57,855: DEBUG - + local workfile=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,856: DEBUG - + match_string=__NAME__
2019-03-21 11:00:57,857: DEBUG - + replace_string=synapse
2019-03-21 11:00:57,858: DEBUG - + sudo sed --in-place s@__NAME__@synapse@g /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,859: DEBUG - + test -n /opt/yunohost/matrix-synapse
2019-03-21 11:00:57,860: DEBUG - + ynh_replace_string __FINALPATH__ /opt/yunohost/matrix-synapse /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,861: DEBUG - + local delimit=@
2019-03-21 11:00:57,861: DEBUG - + local match_string=__FINALPATH__
2019-03-21 11:00:57,862: DEBUG - + local replace_string=/opt/yunohost/matrix-synapse
2019-03-21 11:00:57,863: DEBUG - + local workfile=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,863: DEBUG - + match_string=__FINALPATH__
2019-03-21 11:00:57,864: DEBUG - + replace_string=/opt/yunohost/matrix-synapse
2019-03-21 11:00:57,865: DEBUG - + sudo sed --in-place s@__FINALPATH__@/opt/yunohost/matrix-synapse@g /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,966: DEBUG - + '[' /_matrix '!=' / ']'
2019-03-21 11:00:57,968: DEBUG - + ynh_replace_string '^#sub_path_only' '' /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,969: DEBUG - + local delimit=@
2019-03-21 11:00:57,971: DEBUG - + local 'match_string=^#sub_path_only'
2019-03-21 11:00:57,972: DEBUG - + local replace_string=
2019-03-21 11:00:57,973: DEBUG - + local workfile=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:57,974: DEBUG - + match_string='^#sub_path_only'
2019-03-21 11:00:57,975: DEBUG - + replace_string=
2019-03-21 11:00:57,976: DEBUG - + sudo sed --in-place 's@^#sub_path_only@@g' /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:58,077: DEBUG - + ynh_store_file_checksum /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:58,078: DEBUG - + local checksum_setting_name=checksum__etc_nginx_conf.d_matrix.nicofrand.eu.d_synapse.conf
2019-03-21 11:00:58,080: DEBUG - ++ sudo md5sum /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:00:58,080: DEBUG - ++ cut '-d ' -f1
2019-03-21 11:00:58,082: DEBUG - + ynh_app_setting_set synapse checksum__etc_nginx_conf.d_matrix.nicofrand.eu.d_synapse.conf ec82d2afbd7fb39719ce2b6f6617fd22
2019-03-21 11:00:58,083: DEBUG - + sudo yunohost app setting synapse checksum__etc_nginx_conf.d_matrix.nicofrand.eu.d_synapse.conf --value=ec82d2afbd7fb39719ce2b6f6617fd22 --quiet
2019-03-21 11:01:01,091: DEBUG - + sudo systemctl reload nginx
2019-03-21 11:01:03,097: DEBUG - + coturn_config_path=/etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,098: DEBUG - + cp ../conf/turnserver.conf /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,100: DEBUG - + ynh_replace_string __APP__ synapse /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,101: DEBUG - + local delimit=@
2019-03-21 11:01:03,102: DEBUG - + local match_string=__APP__
2019-03-21 11:01:03,103: DEBUG - + local replace_string=synapse
2019-03-21 11:01:03,105: DEBUG - + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,106: DEBUG - + match_string=__APP__
2019-03-21 11:01:03,107: DEBUG - + replace_string=synapse
2019-03-21 11:01:03,109: DEBUG - + sudo sed --in-place s@__APP__@synapse@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,210: DEBUG - + ynh_replace_string __TURNPWD__ 3zMcFqspiCxSzLqehrvuawSpLoftAH /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,211: DEBUG - + local delimit=@
2019-03-21 11:01:03,212: DEBUG - + local match_string=__TURNPWD__
2019-03-21 11:01:03,213: DEBUG - + local replace_string=3zMcFqspiCxSzLqehrvuawSpLoftAH
2019-03-21 11:01:03,214: DEBUG - + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,215: DEBUG - + match_string=__TURNPWD__
2019-03-21 11:01:03,216: DEBUG - + replace_string=3zMcFqspiCxSzLqehrvuawSpLoftAH
2019-03-21 11:01:03,217: DEBUG - + sudo sed --in-place s@__TURNPWD__@3zMcFqspiCxSzLqehrvuawSpLoftAH@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,319: DEBUG - + ynh_replace_string __DOMAIN__ matrix.nicofrand.eu /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,320: DEBUG - + local delimit=@
2019-03-21 11:01:03,321: DEBUG - + local match_string=__DOMAIN__
2019-03-21 11:01:03,322: DEBUG - + local replace_string=matrix.nicofrand.eu
2019-03-21 11:01:03,323: DEBUG - + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,324: DEBUG - + match_string=__DOMAIN__
2019-03-21 11:01:03,325: DEBUG - + replace_string=matrix.nicofrand.eu
2019-03-21 11:01:03,326: DEBUG - + sudo sed --in-place s@[email protected]@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,427: DEBUG - + ynh_replace_string __TLS_PORT__ 5349 /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,428: DEBUG - + local delimit=@
2019-03-21 11:01:03,429: DEBUG - + local match_string=__TLS_PORT__
2019-03-21 11:01:03,430: DEBUG - + local replace_string=5349
2019-03-21 11:01:03,430: DEBUG - + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,431: DEBUG - + match_string=__TLS_PORT__
2019-03-21 11:01:03,432: DEBUG - + replace_string=5349
2019-03-21 11:01:03,432: DEBUG - + sudo sed --in-place s@__TLS_PORT__@5349@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,433: DEBUG - + ynh_replace_string __TLS_ALT_PORT__ 5350 /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,434: DEBUG - + local delimit=@
2019-03-21 11:01:03,435: DEBUG - + local match_string=__TLS_ALT_PORT__
2019-03-21 11:01:03,435: DEBUG - + local replace_string=5350
2019-03-21 11:01:03,436: DEBUG - + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,437: DEBUG - + match_string=__TLS_ALT_PORT__
2019-03-21 11:01:03,438: DEBUG - + replace_string=5350
2019-03-21 11:01:03,439: DEBUG - + sudo sed --in-place s@__TLS_ALT_PORT__@5350@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,540: DEBUG - + ynh_replace_string __CLI_PORT__ 5766 /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,540: DEBUG - + local delimit=@
2019-03-21 11:01:03,541: DEBUG - + local match_string=__CLI_PORT__
2019-03-21 11:01:03,542: DEBUG - + local replace_string=5766
2019-03-21 11:01:03,543: DEBUG - + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,543: DEBUG - + match_string=__CLI_PORT__
2019-03-21 11:01:03,544: DEBUG - + replace_string=5766
2019-03-21 11:01:03,545: DEBUG - + sudo sed --in-place s@__CLI_PORT__@5766@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,546: DEBUG - ++ curl ip.yunohost.org
2019-03-21 11:01:03,747: DEBUG - + public_ip4=37.187.23.142
2019-03-21 11:01:03,748: WARNING -   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2019-03-21 11:01:03,750: DEBUG - ++ curl ipv6.yunohost.org
2019-03-21 11:01:03,751: WARNING -                                  Dload  Upload   Total   Spent    Left  Speed
2019-03-21 11:01:03,754: WARNING - 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    13  100    13    0     0    251      0 --:--:-- --:--:-- --:--:--   295
2019-03-21 11:01:03,756: WARNING -   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2019-03-21 11:01:03,758: WARNING -                                  Dload  Upload   Total   Spent    Left  Speed
2019-03-21 11:01:03,859: DEBUG - + public_ip6=2001:41d0:a:178e::1
2019-03-21 11:01:03,860: WARNING - 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    19  100    19    0     0    284      0 --:--:-- --:--:-- --:--:--   287
2019-03-21 11:01:03,863: DEBUG - + [[ -n 37.187.23.142 ]]
2019-03-21 11:01:03,864: DEBUG - + ynh_validate_ip4 37.187.23.142
2019-03-21 11:01:03,865: DEBUG - + ynh_validate_ip 4 37.187.23.142
2019-03-21 11:01:03,866: DEBUG - + local IP_ADDRESS_FAMILY=4
2019-03-21 11:01:03,867: DEBUG - + local IP_ADDRESS=37.187.23.142
2019-03-21 11:01:03,868: DEBUG - + '[' 4 == 4 ']'
2019-03-21 11:01:03,869: DEBUG - + python /dev/stdin
2019-03-21 11:01:03,970: DEBUG - + ynh_replace_string __IPV4__ 37.187.23.142 /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,971: DEBUG - + local delimit=@
2019-03-21 11:01:03,972: DEBUG - + local match_string=__IPV4__
2019-03-21 11:01:03,973: DEBUG - + local replace_string=37.187.23.142
2019-03-21 11:01:03,973: DEBUG - + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:01:03,974: DEBUG - + match_string=__IPV4__
2019-03-21 11:01:03,975: DEBUG - + replace_string=37.187.23.142
2019-03-21 11:01:03,976: DEBUG - + sudo sed --in-place s@[email protected]@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:04,078: DEBUG - + [[ -n 2001:41d0:a:178e::1 ]]
2019-03-21 11:01:04,079: DEBUG - + ynh_validate_ip6 2001:41d0:a:178e::1
2019-03-21 11:01:04,079: DEBUG - + ynh_validate_ip 6 2001:41d0:a:178e::1
2019-03-21 11:01:04,080: DEBUG - + local IP_ADDRESS_FAMILY=6
2019-03-21 11:01:04,081: DEBUG - + local IP_ADDRESS=2001:41d0:a:178e::1
2019-03-21 11:01:04,082: DEBUG - + '[' 6 == 4 ']'
2019-03-21 11:01:04,082: DEBUG - + '[' 6 == 6 ']'
2019-03-21 11:01:04,083: DEBUG - + python /dev/stdin
2019-03-21 11:01:04,084: DEBUG - + ynh_replace_string __IPV6__ 2001:41d0:a:178e::1 /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:04,084: DEBUG - + local delimit=@
2019-03-21 11:01:04,085: DEBUG - + local match_string=__IPV6__
2019-03-21 11:01:04,086: DEBUG - + local replace_string=2001:41d0:a:178e::1
2019-03-21 11:01:04,087: DEBUG - + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:01:04,088: DEBUG - + match_string=__IPV6__
2019-03-21 11:01:04,088: DEBUG - + replace_string=2001:41d0:a:178e::1
2019-03-21 11:01:04,089: DEBUG - + sudo sed --in-place s@__IPV6__@2001:41d0:a:178e::1@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:04,190: DEBUG - + ynh_store_file_checksum /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:04,191: DEBUG - + local checksum_setting_name=checksum__etc_matrix-synapse_coturn.conf
2019-03-21 11:01:04,192: DEBUG - ++ sudo md5sum /etc/matrix-synapse/coturn.conf
2019-03-21 11:01:04,193: DEBUG - ++ cut '-d ' -f1
2019-03-21 11:01:04,294: DEBUG - + ynh_app_setting_set synapse checksum__etc_matrix-synapse_coturn.conf 89eec0de9032d55864f333a364598f59
2019-03-21 11:01:04,296: DEBUG - + sudo yunohost app setting synapse checksum__etc_matrix-synapse_coturn.conf --value=89eec0de9032d55864f333a364598f59 --quiet
2019-03-21 11:01:07,205: DEBUG - + cp ../sources/Coturn_config_rotate.sh /opt/yunohost/matrix-synapse/
2019-03-21 11:01:07,206: DEBUG - + ynh_replace_string __APP__ synapse /opt/yunohost/matrix-synapse/Coturn_config_rotate.sh
2019-03-21 11:01:07,206: DEBUG - + local delimit=@
2019-03-21 11:01:07,207: DEBUG - + local match_string=__APP__
2019-03-21 11:01:07,208: DEBUG - + local replace_string=synapse
2019-03-21 11:01:07,208: DEBUG - + local workfile=/opt/yunohost/matrix-synapse/Coturn_config_rotate.sh
2019-03-21 11:01:07,209: DEBUG - + match_string=__APP__
2019-03-21 11:01:07,210: DEBUG - + replace_string=synapse
2019-03-21 11:01:07,211: DEBUG - + sudo sed --in-place s@__APP__@synapse@g /opt/yunohost/matrix-synapse/Coturn_config_rotate.sh
2019-03-21 11:01:07,312: DEBUG - + cp ../conf/default_matrix-synapse /etc/default/matrix-synapse
2019-03-21 11:01:07,313: DEBUG - + ynh_add_systemd_config matrix-synapse matrix-synapse.service
2019-03-21 11:01:07,314: DEBUG - + local service_name=matrix-synapse
2019-03-21 11:01:07,315: DEBUG - + finalsystemdconf=/etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:07,316: DEBUG - + ynh_backup_if_checksum_is_different /etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:07,317: DEBUG - + local file=/etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:07,318: DEBUG - + local checksum_setting_name=checksum__etc_systemd_system_matrix-synapse.service
2019-03-21 11:01:07,319: DEBUG - ++ ynh_app_setting_get synapse checksum__etc_systemd_system_matrix-synapse.service
2019-03-21 11:01:07,320: DEBUG - ++ sudo yunohost app setting synapse checksum__etc_systemd_system_matrix-synapse.service --output-as plain --quiet
2019-03-21 11:01:10,330: DEBUG - + local checksum_value=89f028ab48733184d56e1387184f8556
2019-03-21 11:01:10,331: DEBUG - + '[' -n 89f028ab48733184d56e1387184f8556 ']'
2019-03-21 11:01:10,332: DEBUG - + echo '89f028ab48733184d56e1387184f8556 /etc/systemd/system/matrix-synapse.service'
2019-03-21 11:01:10,333: DEBUG - + sudo md5sum -c --status
2019-03-21 11:01:10,334: DEBUG - + sudo cp ../conf/matrix-synapse.service /etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:10,436: DEBUG - + test -n /opt/yunohost/matrix-synapse
2019-03-21 11:01:10,437: DEBUG - + ynh_replace_string __FINALPATH__ /opt/yunohost/matrix-synapse /etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:10,438: DEBUG - + local delimit=@
2019-03-21 11:01:10,439: DEBUG - + local match_string=__FINALPATH__
2019-03-21 11:01:10,440: DEBUG - + local replace_string=/opt/yunohost/matrix-synapse
2019-03-21 11:01:10,441: DEBUG - + local workfile=/etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:10,442: DEBUG - + match_string=__FINALPATH__
2019-03-21 11:01:10,443: DEBUG - + replace_string=/opt/yunohost/matrix-synapse
2019-03-21 11:01:10,444: DEBUG - + sudo sed --in-place s@__FINALPATH__@/opt/yunohost/matrix-synapse@g /etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:10,545: DEBUG - + test -n synapse
2019-03-21 11:01:10,546: DEBUG - + ynh_replace_string __APP__ synapse /etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:10,547: DEBUG - + local delimit=@
2019-03-21 11:01:10,548: DEBUG - + local match_string=__APP__
2019-03-21 11:01:10,548: DEBUG - + local replace_string=synapse
2019-03-21 11:01:10,549: DEBUG - + local workfile=/etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:10,550: DEBUG - + match_string=__APP__
2019-03-21 11:01:10,551: DEBUG - + replace_string=synapse
2019-03-21 11:01:10,551: DEBUG - + sudo sed --in-place s@__APP__@synapse@g /etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:10,552: DEBUG - + ynh_store_file_checksum /etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:10,553: DEBUG - + local checksum_setting_name=checksum__etc_systemd_system_matrix-synapse.service
2019-03-21 11:01:10,554: DEBUG - ++ sudo md5sum /etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:10,555: DEBUG - ++ cut '-d ' -f1
2019-03-21 11:01:10,656: DEBUG - + ynh_app_setting_set synapse checksum__etc_systemd_system_matrix-synapse.service 89f028ab48733184d56e1387184f8556
2019-03-21 11:01:10,656: DEBUG - + sudo yunohost app setting synapse checksum__etc_systemd_system_matrix-synapse.service --value=89f028ab48733184d56e1387184f8556 --quiet
2019-03-21 11:01:13,664: DEBUG - + sudo chown root: /etc/systemd/system/matrix-synapse.service
2019-03-21 11:01:13,665: DEBUG - + sudo systemctl enable matrix-synapse
2019-03-21 11:01:15,273: DEBUG - + sudo systemctl daemon-reload
2019-03-21 11:01:15,675: DEBUG - + cp ../conf/default_coturn /etc/default/coturn-synapse
2019-03-21 11:01:15,676: DEBUG - + ynh_add_systemd_config coturn-synapse coturn-synapse.service
2019-03-21 11:01:15,677: DEBUG - + local service_name=coturn-synapse
2019-03-21 11:01:15,679: DEBUG - + finalsystemdconf=/etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:15,680: DEBUG - + ynh_backup_if_checksum_is_different /etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:15,681: DEBUG - + local file=/etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:15,682: DEBUG - + local checksum_setting_name=checksum__etc_systemd_system_coturn-synapse.service
2019-03-21 11:01:15,683: DEBUG - ++ ynh_app_setting_get synapse checksum__etc_systemd_system_coturn-synapse.service
2019-03-21 11:01:15,685: DEBUG - ++ sudo yunohost app setting synapse checksum__etc_systemd_system_coturn-synapse.service --output-as plain --quiet
2019-03-21 11:01:18,594: DEBUG - + local checksum_value=d16e5e1875a3ae29e76666fed2ea3f61
2019-03-21 11:01:18,595: DEBUG - + '[' -n d16e5e1875a3ae29e76666fed2ea3f61 ']'
2019-03-21 11:01:18,596: DEBUG - + echo 'd16e5e1875a3ae29e76666fed2ea3f61 /etc/systemd/system/coturn-synapse.service'
2019-03-21 11:01:18,597: DEBUG - + sudo md5sum -c --status
2019-03-21 11:01:18,698: DEBUG - + sudo cp ../conf/coturn-synapse.service /etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:18,800: DEBUG - + test -n /opt/yunohost/matrix-synapse
2019-03-21 11:01:18,801: DEBUG - + ynh_replace_string __FINALPATH__ /opt/yunohost/matrix-synapse /etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:18,802: DEBUG - + local delimit=@
2019-03-21 11:01:18,803: DEBUG - + local match_string=__FINALPATH__
2019-03-21 11:01:18,804: DEBUG - + local replace_string=/opt/yunohost/matrix-synapse
2019-03-21 11:01:18,805: DEBUG - + local workfile=/etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:18,806: DEBUG - + match_string=__FINALPATH__
2019-03-21 11:01:18,807: DEBUG - + replace_string=/opt/yunohost/matrix-synapse
2019-03-21 11:01:18,808: DEBUG - + sudo sed --in-place s@__FINALPATH__@/opt/yunohost/matrix-synapse@g /etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:18,809: DEBUG - + test -n synapse
2019-03-21 11:01:18,810: DEBUG - + ynh_replace_string __APP__ synapse /etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:18,811: DEBUG - + local delimit=@
2019-03-21 11:01:18,812: DEBUG - + local match_string=__APP__
2019-03-21 11:01:18,813: DEBUG - + local replace_string=synapse
2019-03-21 11:01:18,814: DEBUG - + local workfile=/etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:18,815: DEBUG - + match_string=__APP__
2019-03-21 11:01:18,816: DEBUG - + replace_string=synapse
2019-03-21 11:01:18,817: DEBUG - + sudo sed --in-place s@__APP__@synapse@g /etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:18,919: DEBUG - + ynh_store_file_checksum /etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:18,920: DEBUG - + local checksum_setting_name=checksum__etc_systemd_system_coturn-synapse.service
2019-03-21 11:01:18,922: DEBUG - ++ sudo md5sum /etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:18,923: DEBUG - ++ cut '-d ' -f1
2019-03-21 11:01:18,924: DEBUG - + ynh_app_setting_set synapse checksum__etc_systemd_system_coturn-synapse.service d16e5e1875a3ae29e76666fed2ea3f61
2019-03-21 11:01:18,925: DEBUG - + sudo yunohost app setting synapse checksum__etc_systemd_system_coturn-synapse.service --value=d16e5e1875a3ae29e76666fed2ea3f61 --quiet
2019-03-21 11:01:21,934: DEBUG - + sudo chown root: /etc/systemd/system/coturn-synapse.service
2019-03-21 11:01:22,036: DEBUG - + sudo systemctl enable coturn-synapse
2019-03-21 11:01:22,438: DEBUG - + sudo systemctl daemon-reload
2019-03-21 11:01:22,740: DEBUG - + ynh_add_fail2ban_config -t
2019-03-21 11:01:22,741: DEBUG - + local legacy_args=lrmptv
2019-03-21 11:01:22,742: DEBUG - + args_array=([l]=logpath= [r]=failregex= [m]=max_retry= [p]=ports= [t]=use_template [v]=others_var=)
2019-03-21 11:01:22,743: DEBUG - + declare -Ar args_array
2019-03-21 11:01:22,744: DEBUG - + local logpath
2019-03-21 11:01:22,745: DEBUG - + local failregex
2019-03-21 11:01:22,746: DEBUG - + local max_retry
2019-03-21 11:01:22,748: DEBUG - + local ports
2019-03-21 11:01:22,748: DEBUG - + local others_var
2019-03-21 11:01:22,750: DEBUG - + local use_template
2019-03-21 11:01:22,753: DEBUG - + ynh_handle_getopts_args -t
2019-03-21 11:01:22,754: DEBUG - + set +x
2019-03-21 11:01:22,855: DEBUG - + use_template=1
2019-03-21 11:01:22,856: DEBUG - + max_retry=3
2019-03-21 11:01:22,858: DEBUG - + ports=http,https
2019-03-21 11:01:22,859: DEBUG - + finalfail2banjailconf=/etc/fail2ban/jail.d/synapse.conf
2019-03-21 11:01:22,860: DEBUG - + finalfail2banfilterconf=/etc/fail2ban/filter.d/synapse.conf
2019-03-21 11:01:22,861: DEBUG - + ynh_backup_if_checksum_is_different /etc/fail2ban/jail.d/synapse.conf
2019-03-21 11:01:22,862: DEBUG - + local file=/etc/fail2ban/jail.d/synapse.conf
2019-03-21 11:01:22,863: DEBUG - + local checksum_setting_name=checksum__etc_fail2ban_jail.d_synapse.conf
2019-03-21 11:01:22,864: DEBUG - ++ ynh_app_setting_get synapse checksum__etc_fail2ban_jail.d_synapse.conf
2019-03-21 11:01:22,865: DEBUG - ++ sudo yunohost app setting synapse checksum__etc_fail2ban_jail.d_synapse.conf --output-as plain --quiet
2019-03-21 11:01:25,774: DEBUG - + local checksum_value=
2019-03-21 11:01:25,776: DEBUG - + '[' -n '' ']'
2019-03-21 11:01:25,777: DEBUG - + ynh_backup_if_checksum_is_different /etc/fail2ban/filter.d/synapse.conf
2019-03-21 11:01:25,778: DEBUG - + local file=/etc/fail2ban/filter.d/synapse.conf
2019-03-21 11:01:25,779: DEBUG - + local checksum_setting_name=checksum__etc_fail2ban_filter.d_synapse.conf
2019-03-21 11:01:25,780: DEBUG - ++ ynh_app_setting_get synapse checksum__etc_fail2ban_filter.d_synapse.conf
2019-03-21 11:01:25,780: DEBUG - ++ sudo yunohost app setting synapse checksum__etc_fail2ban_filter.d_synapse.conf --output-as plain --quiet
2019-03-21 11:01:28,690: DEBUG - + local checksum_value=
2019-03-21 11:01:28,691: DEBUG - + '[' -n '' ']'
2019-03-21 11:01:28,691: DEBUG - + '[' 1 -eq 1 ']'
2019-03-21 11:01:28,692: DEBUG - + cp ../conf/f2b_jail.conf /etc/fail2ban/jail.d/synapse.conf
2019-03-21 11:01:28,893: DEBUG - + cp ../conf/f2b_filter.conf /etc/fail2ban/filter.d/synapse.conf
2019-03-21 11:01:28,894: DEBUG - + '[' -n synapse ']'
2019-03-21 11:01:28,895: DEBUG - + ynh_replace_string __APP__ synapse /etc/fail2ban/jail.d/synapse.conf
2019-03-21 11:01:28,896: DEBUG - + local delimit=@
2019-03-21 11:01:28,896: DEBUG - + local match_string=__APP__
2019-03-21 11:01:28,897: DEBUG - + local replace_string=synapse
2019-03-21 11:01:28,898: DEBUG - + local workfile=/etc/fail2ban/jail.d/synapse.conf
2019-03-21 11:01:28,899: DEBUG - + match_string=__APP__
2019-03-21 11:01:28,901: DEBUG - + replace_string=synapse
2019-03-21 11:01:28,903: DEBUG - + sudo sed --in-place s@__APP__@synapse@g /etc/fail2ban/jail.d/synapse.conf
2019-03-21 11:01:29,004: DEBUG - + ynh_replace_string __APP__ synapse /etc/fail2ban/filter.d/synapse.conf
2019-03-21 11:01:29,006: DEBUG - + local delimit=@
2019-03-21 11:01:29,008: DEBUG - + local match_string=__APP__
2019-03-21 11:01:29,009: DEBUG - + local replace_string=synapse
2019-03-21 11:01:29,010: DEBUG - + local workfile=/etc/fail2ban/filter.d/synapse.conf
2019-03-21 11:01:29,011: DEBUG - + match_string=__APP__
2019-03-21 11:01:29,011: DEBUG - + replace_string=synapse
2019-03-21 11:01:29,012: DEBUG - + sudo sed --in-place s@__APP__@synapse@g /etc/fail2ban/filter.d/synapse.conf
2019-03-21 11:01:29,013: DEBUG - + ynh_store_file_checksum /etc/fail2ban/jail.d/synapse.conf
2019-03-21 11:01:29,013: DEBUG - + local checksum_setting_name=checksum__etc_fail2ban_jail.d_synapse.conf
2019-03-21 11:01:29,014: DEBUG - ++ sudo md5sum /etc/fail2ban/jail.d/synapse.conf
2019-03-21 11:01:29,015: DEBUG - ++ cut '-d ' -f1
2019-03-21 11:01:29,116: DEBUG - + ynh_app_setting_set synapse checksum__etc_fail2ban_jail.d_synapse.conf 02ae324ceb193ab34e131e1a3b38cb86
2019-03-21 11:01:29,117: DEBUG - + sudo yunohost app setting synapse checksum__etc_fail2ban_jail.d_synapse.conf --value=02ae324ceb193ab34e131e1a3b38cb86 --quiet
2019-03-21 11:01:32,027: DEBUG - + ynh_store_file_checksum /etc/fail2ban/filter.d/synapse.conf
2019-03-21 11:01:32,028: DEBUG - + local checksum_setting_name=checksum__etc_fail2ban_filter.d_synapse.conf
2019-03-21 11:01:32,030: DEBUG - ++ sudo md5sum /etc/fail2ban/filter.d/synapse.conf
2019-03-21 11:01:32,031: DEBUG - ++ cut '-d ' -f1
2019-03-21 11:01:32,132: DEBUG - + ynh_app_setting_set synapse checksum__etc_fail2ban_filter.d_synapse.conf 1c55d648327a502ddddaa64c4430feba
2019-03-21 11:01:32,134: DEBUG - + sudo yunohost app setting synapse checksum__etc_fail2ban_filter.d_synapse.conf --value=1c55d648327a502ddddaa64c4430feba --quiet
2019-03-21 11:01:35,145: DEBUG - + systemctl try-reload-or-restart fail2ban
2019-03-21 11:01:51,993: DEBUG - + ynh_exit_properly
2019-03-21 11:01:51,994: WARNING - Job for fail2ban.service failed because the control process exited with error code.
2019-03-21 11:01:51,996: DEBUG - + local exit_code=1
2019-03-21 11:01:51,998: WARNING - See "systemctl status fail2ban.service" and "journalctl -xe" for details.
2019-03-21 11:01:52,000: DEBUG - + '[' 1 -eq 0 ']'
2019-03-21 11:01:52,001: WARNING - !!
2019-03-21 11:01:52,003: DEBUG - + trap '' EXIT
2019-03-21 11:01:52,004: WARNING -   synapse's script has encountered an error. Its execution was cancelled.
2019-03-21 11:01:52,006: DEBUG - + set +eu
2019-03-21 11:01:52,007: WARNING - !!
2019-03-21 11:01:52,009: DEBUG - + echo -e '!!\n  synapse'\''s script has encountered an error. Its execution was cancelled.\n!!'
2019-03-21 11:01:52,010: WARNING - Upgrade failed.
2019-03-21 11:01:52,012: DEBUG - + type -t ynh_clean_setup
2019-03-21 11:01:52,013: DEBUG - + ynh_clean_setup
2019-03-21 11:01:52,014: DEBUG - + ynh_restore_upgradebackup
2019-03-21 11:01:52,015: DEBUG - + echo 'Upgrade failed.'
2019-03-21 11:01:52,016: DEBUG - + local app_bck=synapse
2019-03-21 11:01:52,017: DEBUG - + NO_BACKUP_UPGRADE=0
2019-03-21 11:01:52,018: DEBUG - + '[' 0 -eq 0 ']'
2019-03-21 11:01:52,019: DEBUG - + sudo yunohost backup list
2019-03-21 11:01:52,021: DEBUG - + grep -q synapse-pre-upgrade1
2019-03-21 11:01:55,131: DEBUG - + sudo yunohost app remove synapse
2019-03-21 11:02:14,484: WARNING - Removed /etc/systemd/system/multi-user.target.wants/matrix-synapse.service.
2019-03-21 11:02:15,489: WARNING - Removed /etc/systemd/system/multi-user.target.wants/coturn-synapse.service.
2019-03-21 11:02:21,910: WARNING - Port 8448 is already closed for IPv4 connections
2019-03-21 11:02:21,912: WARNING - Port 8448 is already closed for IPv6 connections
2019-03-21 11:03:54,101: WARNING - python3: can't open file '/opt/yunohost/matrix-synapse/remove_sso_conf.py': [Errno 2] No such file or directory
2019-03-21 11:04:28,101: WARNING - could not change directory to "/tmp/yunohost_remove/scripts": Permission denied
2019-03-21 11:04:29,105: WARNING - could not change directory to "/tmp/yunohost_remove/scripts": Permission denied
2019-03-21 11:04:29,308: WARNING - Remove the user matrix-synapse
2019-03-21 11:04:36,227: DEBUG - synapse has been removed
2019-03-21 11:04:38,937: DEBUG - The SSOwat configuration has been generated
2019-03-21 11:04:39,038: DEBUG - + sudo yunohost backup restore synapse-pre-upgrade1 --apps synapse --force --debug
2019-03-21 11:04:41,446: DEBUG - 2235 loading actions map namespace 'yunohost'
2019-03-21 11:04:41,547: DEBUG - 2308 extra parameter classes loaded: ['comment', 'ask', 'password', 'required', 'pattern']
2019-03-21 11:04:41,548: DEBUG - 2308 initializing base actions map parser for cli
2019-03-21 11:04:41,549: DEBUG - 2313 registering new callback action 'yunohost.utils.packages.ynh_packages_version' to ['-v', '--version']
2019-03-21 11:04:41,952: DEBUG - 2736 initialize authenticator 'ldap-anonymous' with: uri='ldap://localhost:389', base_dn='dc=yunohost,dc=org', user_rdn='None'
2019-03-21 11:04:42,254: DEBUG - 2957 loading python module yunohost.backup took 0.209s
2019-03-21 11:04:42,255: DEBUG - 2958 processing action [17269.1]: yunohost.backup.restore with args={'force': True, 'name': 'synapse-pre-upgrade1', 'apps': ['synapse'], 'system': None, 'auth': <moulinette.authenticators.ldap.Authenticator object at 0x7f36f2d0da10>}
2019-03-21 11:04:42,256: DEBUG - 2992 custom hook folder not found for action 'restore' in /etc/yunohost/hooks.d/
2019-03-21 11:04:42,257: DEBUG - 3019 Extracting needed files from the archive…
2019-03-21 11:05:45,017: DEBUG - 65813 restoring from backup 'synapse-pre-upgrade1' created on 2019-03-21 09:52:04
2019-03-21 11:05:45,519: DEBUG - 66224 Running restore script of app 'synapse'…
2019-03-21 11:05:45,520: DEBUG - 66316 Executing command 'sh -c YNH_APP_INSTANCE_NUMBER=1 YNH_CWD=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup YNH_STDINFO=/tmp/tmpDGEzgT/stdinfo YNH_BACKUP_CSV=/home/yunohost.backup/tmp/synapse-pre-upgrade1/backup.csv YNH_BACKUP_DIR=/home/yunohost.backup/tmp/synapse-pre-upgrade1 YNH_APP_INSTANCE_NAME=synapse YNH_APP_ID=synapse YNH_APP_BACKUP_DIR=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup BASH_XTRACEFD=7 /bin/bash -x "/tmp/restoreSVuydC/restore" /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup synapse 7>&1'…
2019-03-21 11:05:45,621: DEBUG - 66323 About to run the command '['sh', '-c', 'YNH_APP_INSTANCE_NUMBER=1 YNH_CWD=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup YNH_STDINFO=/tmp/tmpDGEzgT/stdinfo YNH_BACKUP_CSV=/home/yunohost.backup/tmp/synapse-pre-upgrade1/backup.csv YNH_BACKUP_DIR=/home/yunohost.backup/tmp/synapse-pre-upgrade1 YNH_APP_INSTANCE_NAME=synapse YNH_APP_ID=synapse YNH_APP_BACKUP_DIR=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup BASH_XTRACEFD=7 /bin/bash -x "/tmp/restoreSVuydC/restore" /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup synapse 7>&1']'
2019-03-21 11:05:45,737: DEBUG - 66469 + source /usr/share/yunohost/helpers
2019-03-21 11:05:45,738: DEBUG - 66471 +++ run-parts --list /usr/share/yunohost/helpers.d
2019-03-21 11:05:45,738: DEBUG - 66471 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,739: DEBUG - 66472 ++ '[' -r /usr/share/yunohost/helpers.d/backend ']'
2019-03-21 11:05:45,740: DEBUG - 66473 ++ . /usr/share/yunohost/helpers.d/backend
2019-03-21 11:05:45,741: DEBUG - 66474 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,742: DEBUG - 66476 ++ '[' -r /usr/share/yunohost/helpers.d/filesystem ']'
2019-03-21 11:05:45,743: DEBUG - 66477 ++ . /usr/share/yunohost/helpers.d/filesystem
2019-03-21 11:05:45,743: DEBUG - 66478 +++ CAN_BIND=1
2019-03-21 11:05:45,744: DEBUG - 66479 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,745: DEBUG - 66480 ++ '[' -r /usr/share/yunohost/helpers.d/getopts ']'
2019-03-21 11:05:45,746: DEBUG - 66481 ++ . /usr/share/yunohost/helpers.d/getopts
2019-03-21 11:05:45,746: DEBUG - 66482 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,747: DEBUG - 66483 ++ '[' -r /usr/share/yunohost/helpers.d/ip ']'
2019-03-21 11:05:45,748: DEBUG - 66484 ++ . /usr/share/yunohost/helpers.d/ip
2019-03-21 11:05:45,749: DEBUG - 66484 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,750: DEBUG - 66486 ++ '[' -r /usr/share/yunohost/helpers.d/mysql ']'
2019-03-21 11:05:45,750: DEBUG - 66487 ++ . /usr/share/yunohost/helpers.d/mysql
2019-03-21 11:05:45,751: DEBUG - 66488 +++ MYSQL_ROOT_PWD_FILE=/etc/yunohost/mysql
2019-03-21 11:05:45,752: DEBUG - 66489 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,753: DEBUG - 66490 ++ '[' -r /usr/share/yunohost/helpers.d/network ']'
2019-03-21 11:05:45,753: DEBUG - 66491 ++ . /usr/share/yunohost/helpers.d/network
2019-03-21 11:05:45,754: DEBUG - 66491 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,755: DEBUG - 66493 ++ '[' -r /usr/share/yunohost/helpers.d/nodejs ']'
2019-03-21 11:05:45,756: DEBUG - 66493 ++ . /usr/share/yunohost/helpers.d/nodejs
2019-03-21 11:05:45,756: DEBUG - 66494 +++ n_install_dir=/opt/node_n
2019-03-21 11:05:45,757: DEBUG - 66495 +++ node_version_path=/opt/node_n/n/versions/node
2019-03-21 11:05:45,758: DEBUG - 66496 +++ export N_PREFIX=/opt/node_n
2019-03-21 11:05:45,758: DEBUG - 66497 +++ N_PREFIX=/opt/node_n
2019-03-21 11:05:45,759: DEBUG - 66498 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,760: DEBUG - 66499 ++ '[' -r /usr/share/yunohost/helpers.d/package ']'
2019-03-21 11:05:45,760: DEBUG - 66501 ++ . /usr/share/yunohost/helpers.d/package
2019-03-21 11:05:45,761: DEBUG - 66502 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,762: DEBUG - 66503 ++ '[' -r /usr/share/yunohost/helpers.d/print ']'
2019-03-21 11:05:45,762: DEBUG - 66504 ++ . /usr/share/yunohost/helpers.d/print
2019-03-21 11:05:45,763: DEBUG - 66505 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,763: DEBUG - 66507 ++ '[' -r /usr/share/yunohost/helpers.d/psql ']'
2019-03-21 11:05:45,764: DEBUG - 66508 ++ . /usr/share/yunohost/helpers.d/psql
2019-03-21 11:05:45,765: DEBUG - 66509 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,765: DEBUG - 66511 ++ '[' -r /usr/share/yunohost/helpers.d/setting ']'
2019-03-21 11:05:45,766: DEBUG - 66512 ++ . /usr/share/yunohost/helpers.d/setting
2019-03-21 11:05:45,767: DEBUG - 66513 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,767: DEBUG - 66515 ++ '[' -r /usr/share/yunohost/helpers.d/string ']'
2019-03-21 11:05:45,768: DEBUG - 66516 ++ . /usr/share/yunohost/helpers.d/string
2019-03-21 11:05:45,769: DEBUG - 66517 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,769: DEBUG - 66518 ++ '[' -r /usr/share/yunohost/helpers.d/system ']'
2019-03-21 11:05:45,770: DEBUG - 66520 ++ . /usr/share/yunohost/helpers.d/system
2019-03-21 11:05:45,771: DEBUG - 66521 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,771: DEBUG - 66522 ++ '[' -r /usr/share/yunohost/helpers.d/user ']'
2019-03-21 11:05:45,772: DEBUG - 66524 ++ . /usr/share/yunohost/helpers.d/user
2019-03-21 11:05:45,773: DEBUG - 66525 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:05:45,773: DEBUG - 66526 ++ '[' -r /usr/share/yunohost/helpers.d/utils ']'
2019-03-21 11:05:45,774: DEBUG - 66528 ++ . /usr/share/yunohost/helpers.d/utils
2019-03-21 11:05:45,775: DEBUG - 66529 + ynh_abort_if_errors
2019-03-21 11:05:45,775: DEBUG - 66530 + set -eu
2019-03-21 11:05:45,776: DEBUG - 66532 + trap ynh_exit_properly EXIT
2019-03-21 11:05:45,777: DEBUG - 66533 + source ../settings/scripts/psql.sh
2019-03-21 11:05:45,777: DEBUG - 66534 + source ../settings/scripts/experimental_helper.sh
2019-03-21 11:05:45,778: DEBUG - 66536 + source ../settings/scripts/_common.sh
2019-03-21 11:05:45,779: DEBUG - 66537 ++ dependances='coturn build-essential python3-dev libffi-dev python3-pip python3-setuptools sqlite3 libssl-dev python3-venv libxml2-dev libxslt1-dev python3-lxml libjpeg-dev libpq-dev postgresql acl'
2019-03-21 11:05:45,779: DEBUG - 66538 + app=synapse
2019-03-21 11:05:45,780: DEBUG - 66540 + synapse_user=matrix-synapse
2019-03-21 11:05:45,781: DEBUG - 66541 + synapse_db_name=matrix_synapse
2019-03-21 11:05:45,781: DEBUG - 66542 + synapse_db_user=matrix_synapse
2019-03-21 11:05:45,782: DEBUG - 66543 ++ ynh_app_upstream_version
2019-03-21 11:05:45,783: DEBUG - 66544 ++ manifest_path=../manifest.json
2019-03-21 11:05:45,783: DEBUG - 66545 ++ '[' '!' -e ../manifest.json ']'
2019-03-21 11:05:45,784: DEBUG - 66546 ++ manifest_path=../settings/manifest.json
2019-03-21 11:05:45,785: DEBUG - 66547 +++ ynh_read_manifest ../settings/manifest.json version
2019-03-21 11:05:45,785: DEBUG - 66548 +++ manifest=../settings/manifest.json
2019-03-21 11:05:45,786: DEBUG - 66549 +++ key=version
2019-03-21 11:05:45,787: DEBUG - 66549 +++ python3 -c 'import sys, json;print(json.load(open('\''../settings/manifest.json'\'', encoding='\''utf-8'\''))['\''version'\''])'
2019-03-21 11:05:46,188: DEBUG - 66952 ++ version_key=0.34.0.1~ynh1
2019-03-21 11:05:46,189: DEBUG - 66952 ++ echo 0.34.0.1
2019-03-21 11:05:46,190: DEBUG - 66953 + upstream_version=0.34.0.1
2019-03-21 11:05:46,191: DEBUG - 66954 ++ ynh_app_setting_get synapse special_domain
2019-03-21 11:05:46,192: DEBUG - 66955 ++ sudo yunohost app setting synapse special_domain --output-as plain --quiet
2019-03-21 11:05:51,505: DEBUG - 72270 + domain=matrix.nicofrand.eu
2019-03-21 11:05:51,506: DEBUG - 72271 ++ ynh_app_setting_get synapse special_path
2019-03-21 11:05:51,507: DEBUG - 72271 ++ sudo yunohost app setting synapse special_path --output-as plain --quiet
2019-03-21 11:05:54,423: DEBUG - 75179 + path_url=/_matrix
2019-03-21 11:05:54,424: DEBUG - 75180 ++ ynh_app_setting_get synapse final_path
2019-03-21 11:05:54,425: DEBUG - 75181 ++ sudo yunohost app setting synapse final_path --output-as plain --quiet
2019-03-21 11:05:57,434: DEBUG - 78191 + final_path=/opt/yunohost/matrix-synapse
2019-03-21 11:05:57,435: DEBUG - 78192 ++ ynh_app_setting_get synapse synapse_db_pwd
2019-03-21 11:05:57,436: DEBUG - 78193 ++ sudo yunohost app setting synapse synapse_db_pwd --output-as plain --quiet
2019-03-21 11:06:00,344: DEBUG - 81101 + synapse_db_pwd=WE0cGCkQAryRES07p9N2xEw8yqD8ob
2019-03-21 11:06:00,345: DEBUG - 81103 ++ ynh_app_setting_get synapse synapse_tls_port
2019-03-21 11:06:00,346: DEBUG - 81105 ++ sudo yunohost app setting synapse synapse_tls_port --output-as plain --quiet
2019-03-21 11:06:03,356: DEBUG - 84114 + synapse_tls_port=8448
2019-03-21 11:06:03,357: DEBUG - 84115 ++ ynh_app_setting_get synapse turnserver_tls_port
2019-03-21 11:06:03,358: DEBUG - 84116 ++ sudo yunohost app setting synapse turnserver_tls_port --output-as plain --quiet
2019-03-21 11:06:06,367: DEBUG - 87126 + turnserver_tls_port=5349
2019-03-21 11:06:06,368: DEBUG - 87127 ++ ynh_app_setting_get synapse turnserver_alt_tls_port
2019-03-21 11:06:06,369: DEBUG - 87128 ++ sudo yunohost app setting synapse turnserver_alt_tls_port --output-as plain --quiet
2019-03-21 11:06:09,278: DEBUG - 90037 + turnserver_alt_tls_port=5350
2019-03-21 11:06:09,279: DEBUG - 90038 + ynh_webpath_available matrix.nicofrand.eu /_matrix
2019-03-21 11:06:09,280: DEBUG - 90040 + local domain=matrix.nicofrand.eu
2019-03-21 11:06:09,281: DEBUG - 90042 + local path=/_matrix
2019-03-21 11:06:09,283: DEBUG - 90044 + sudo yunohost domain url-available matrix.nicofrand.eu /_matrix
2019-03-21 11:06:12,893: DEBUG - 93654 True
2019-03-21 11:06:12,995: DEBUG - 93755 + ynh_restore
2019-03-21 11:06:12,995: DEBUG - 93756 + local REL_DIR=apps/synapse/backup
2019-03-21 11:06:12,996: DEBUG - 93757 + REL_DIR=apps/synapse/backup/
2019-03-21 11:06:12,997: DEBUG - 93758 + cat /home/yunohost.backup/tmp/synapse-pre-upgrade1/backup.csv
2019-03-21 11:06:12,997: DEBUG - 93759 + tr -d $'\r'
2019-03-21 11:06:12,998: DEBUG - 93760 + read line
2019-03-21 11:06:12,999: DEBUG - 93761 + grep -ohP '^".*","apps/synapse/backup/.*"$'
2019-03-21 11:06:13,100: DEBUG - 93863 ++ echo '"/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf","apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf"'
2019-03-21 11:06:13,100: DEBUG - 93864 ++ grep -ohP '^"\K.*(?=",".*"$)'
2019-03-21 11:06:13,101: DEBUG - 93864 + local ORIGIN_PATH=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:06:13,102: DEBUG - 93865 ++ echo '"/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf","apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf"'
2019-03-21 11:06:13,103: DEBUG - 93866 ++ grep -ohP '^".*","apps/synapse/backup/\K.*(?="$)'
2019-03-21 11:06:13,104: DEBUG - 93867 + local ARCHIVE_PATH=etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:06:13,104: DEBUG - 93868 + ynh_restore_file etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:06:13,105: DEBUG - 93869 + local ORIGIN_PATH=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:06:13,106: DEBUG - 93870 + local ARCHIVE_PATH=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:06:13,107: DEBUG - 93872 + local DEST_PATH=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:06:13,107: DEBUG - 93873 + local NOT_MANDATORY=0
2019-03-21 11:06:13,108: DEBUG - 93874 + '[' '!' -d /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf ']'
2019-03-21 11:06:13,108: DEBUG - 93875 + '[' '!' -f /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf ']'
2019-03-21 11:06:13,109: DEBUG - 93877 + [[ -e /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf ]]
2019-03-21 11:06:13,110: DEBUG - 93878 ++ dirname /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:06:13,110: DEBUG - 93879 + mkdir -p /etc/nginx/conf.d/matrix.nicofrand.eu.d
2019-03-21 11:06:13,111: DEBUG - 93880 + mountpoint -q /home/yunohost.backup/tmp/synapse-pre-upgrade1
2019-03-21 11:06:13,212: DEBUG - 93981 + mv /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:06:13,213: DEBUG - 93982 + read line
2019-03-21 11:06:13,215: DEBUG - 93983 ++ echo '"/etc/matrix-synapse","apps/synapse/backup/etc/matrix-synapse"'
2019-03-21 11:06:13,216: DEBUG - 93985 ++ grep -ohP '^"\K.*(?=",".*"$)'
2019-03-21 11:06:13,216: DEBUG - 93986 + local ORIGIN_PATH=/etc/matrix-synapse
2019-03-21 11:06:13,217: DEBUG - 93987 ++ echo '"/etc/matrix-synapse","apps/synapse/backup/etc/matrix-synapse"'
2019-03-21 11:06:13,218: DEBUG - 93987 ++ grep -ohP '^".*","apps/synapse/backup/\K.*(?="$)'
2019-03-21 11:06:13,219: DEBUG - 93988 + local ARCHIVE_PATH=etc/matrix-synapse
2019-03-21 11:06:13,220: DEBUG - 93989 + ynh_restore_file etc/matrix-synapse /etc/matrix-synapse
2019-03-21 11:06:13,221: DEBUG - 93991 + local ORIGIN_PATH=/etc/matrix-synapse
2019-03-21 11:06:13,223: DEBUG - 93992 + local ARCHIVE_PATH=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/matrix-synapse
2019-03-21 11:06:13,224: DEBUG - 93994 + local DEST_PATH=/etc/matrix-synapse
2019-03-21 11:06:13,225: DEBUG - 93995 + local NOT_MANDATORY=0
2019-03-21 11:06:13,226: DEBUG - 93995 + '[' '!' -d /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/matrix-synapse ']'
2019-03-21 11:06:13,227: DEBUG - 93996 + [[ -e /etc/matrix-synapse ]]
2019-03-21 11:06:13,227: DEBUG - 93997 ++ dirname /etc/matrix-synapse
2019-03-21 11:06:13,228: DEBUG - 93998 + mkdir -p /etc
2019-03-21 11:06:13,229: DEBUG - 93999 + mountpoint -q /home/yunohost.backup/tmp/synapse-pre-upgrade1
2019-03-21 11:06:13,229: DEBUG - 94000 + mv /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/matrix-synapse /etc/matrix-synapse
2019-03-21 11:06:13,330: DEBUG - 94102 + read line
2019-03-21 11:06:13,332: DEBUG - 94105 ++ echo '"/etc/default/matrix-synapse","apps/synapse/backup/etc/default/matrix-synapse"'
2019-03-21 11:06:13,333: DEBUG - 94107 ++ grep -ohP '^"\K.*(?=",".*"$)'
2019-03-21 11:06:13,335: DEBUG - 94108 + local ORIGIN_PATH=/etc/default/matrix-synapse
2019-03-21 11:06:13,336: DEBUG - 94110 ++ echo '"/etc/default/matrix-synapse","apps/synapse/backup/etc/default/matrix-synapse"'
2019-03-21 11:06:13,337: DEBUG - 94111 ++ grep -ohP '^".*","apps/synapse/backup/\K.*(?="$)'
2019-03-21 11:06:13,339: DEBUG - 94111 + local ARCHIVE_PATH=etc/default/matrix-synapse
2019-03-21 11:06:13,340: DEBUG - 94112 + ynh_restore_file etc/default/matrix-synapse /etc/default/matrix-synapse
2019-03-21 11:06:13,341: DEBUG - 94113 + local ORIGIN_PATH=/etc/default/matrix-synapse
2019-03-21 11:06:13,343: DEBUG - 94114 + local ARCHIVE_PATH=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/default/matrix-synapse
2019-03-21 11:06:13,344: DEBUG - 94114 + local DEST_PATH=/etc/default/matrix-synapse
2019-03-21 11:06:13,345: DEBUG - 94115 + local NOT_MANDATORY=0
2019-03-21 11:06:13,347: DEBUG - 94116 + '[' '!' -d /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/default/matrix-synapse ']'
2019-03-21 11:06:13,348: DEBUG - 94117 + '[' '!' -f /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/default/matrix-synapse ']'
2019-03-21 11:06:13,349: DEBUG - 94118 + [[ -e /etc/default/matrix-synapse ]]
2019-03-21 11:06:13,350: DEBUG - 94119 ++ dirname /etc/default/matrix-synapse
2019-03-21 11:06:13,350: DEBUG - 94119 + mkdir -p /etc/default
2019-03-21 11:06:13,351: DEBUG - 94121 + mountpoint -q /home/yunohost.backup/tmp/synapse-pre-upgrade1
2019-03-21 11:06:13,352: DEBUG - 94122 + mv /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/default/matrix-synapse /etc/default/matrix-synapse
2019-03-21 11:06:13,353: DEBUG - 94123 + read line
2019-03-21 11:06:13,355: DEBUG - 94125 ++ echo '"/etc/systemd/system/matrix-synapse.service","apps/synapse/backup/etc/systemd/system/matrix-synapse.service"'
2019-03-21 11:06:13,356: DEBUG - 94126 ++ grep -ohP '^"\K.*(?=",".*"$)'
2019-03-21 11:06:13,357: DEBUG - 94127 + local ORIGIN_PATH=/etc/systemd/system/matrix-synapse.service
2019-03-21 11:06:13,358: DEBUG - 94128 ++ echo '"/etc/systemd/system/matrix-synapse.service","apps/synapse/backup/etc/systemd/system/matrix-synapse.service"'
2019-03-21 11:06:13,359: DEBUG - 94130 ++ grep -ohP '^".*","apps/synapse/backup/\K.*(?="$)'
2019-03-21 11:06:13,360: DEBUG - 94131 + local ARCHIVE_PATH=etc/systemd/system/matrix-synapse.service
2019-03-21 11:06:13,361: DEBUG - 94132 + ynh_restore_file etc/systemd/system/matrix-synapse.service /etc/systemd/system/matrix-synapse.service
2019-03-21 11:06:13,362: DEBUG - 94133 + local ORIGIN_PATH=/etc/systemd/system/matrix-synapse.service
2019-03-21 11:06:13,363: DEBUG - 94134 + local ARCHIVE_PATH=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/systemd/system/matrix-synapse.service
2019-03-21 11:06:13,364: DEBUG - 94135 + local DEST_PATH=/etc/systemd/system/matrix-synapse.service
2019-03-21 11:06:13,365: DEBUG - 94136 + local NOT_MANDATORY=0
2019-03-21 11:06:13,366: DEBUG - 94136 + '[' '!' -d /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/systemd/system/matrix-synapse.service ']'
2019-03-21 11:06:13,367: DEBUG - 94137 + '[' '!' -f /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/systemd/system/matrix-synapse.service ']'
2019-03-21 11:06:13,368: DEBUG - 94138 + [[ -e /etc/systemd/system/matrix-synapse.service ]]
2019-03-21 11:06:13,370: DEBUG - 94139 ++ dirname /etc/systemd/system/matrix-synapse.service
2019-03-21 11:06:13,371: DEBUG - 94139 + mkdir -p /etc/systemd/system
2019-03-21 11:06:13,371: DEBUG - 94140 + mountpoint -q /home/yunohost.backup/tmp/synapse-pre-upgrade1
2019-03-21 11:06:13,372: DEBUG - 94141 + mv /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/systemd/system/matrix-synapse.service /etc/systemd/system/matrix-synapse.service
2019-03-21 11:06:13,373: DEBUG - 94142 + read line
2019-03-21 11:06:13,374: DEBUG - 94143 ++ echo '"/etc/default/coturn-synapse","apps/synapse/backup/etc/default/coturn-synapse"'
2019-03-21 11:06:13,375: DEBUG - 94144 ++ grep -ohP '^"\K.*(?=",".*"$)'
2019-03-21 11:06:13,376: DEBUG - 94145 + local ORIGIN_PATH=/etc/default/coturn-synapse
2019-03-21 11:06:13,377: DEBUG - 94146 ++ echo '"/etc/default/coturn-synapse","apps/synapse/backup/etc/default/coturn-synapse"'
2019-03-21 11:06:13,378: DEBUG - 94148 ++ grep -ohP '^".*","apps/synapse/backup/\K.*(?="$)'
2019-03-21 11:06:13,379: DEBUG - 94149 + local ARCHIVE_PATH=etc/default/coturn-synapse
2019-03-21 11:06:13,379: DEBUG - 94151 + ynh_restore_file etc/default/coturn-synapse /etc/default/coturn-synapse
2019-03-21 11:06:13,380: DEBUG - 94152 + local ORIGIN_PATH=/etc/default/coturn-synapse
2019-03-21 11:06:13,381: DEBUG - 94153 + local ARCHIVE_PATH=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/default/coturn-synapse
2019-03-21 11:06:13,382: DEBUG - 94154 + local DEST_PATH=/etc/default/coturn-synapse
2019-03-21 11:06:13,383: DEBUG - 94156 + local NOT_MANDATORY=0
2019-03-21 11:06:13,384: DEBUG - 94157 + '[' '!' -d /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/default/coturn-synapse ']'
2019-03-21 11:06:13,385: DEBUG - 94158 + '[' '!' -f /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/default/coturn-synapse ']'
2019-03-21 11:06:13,386: DEBUG - 94160 + [[ -e /etc/default/coturn-synapse ]]
2019-03-21 11:06:13,387: DEBUG - 94161 ++ dirname /etc/default/coturn-synapse
2019-03-21 11:06:13,388: DEBUG - 94163 + mkdir -p /etc/default
2019-03-21 11:06:13,389: DEBUG - 94164 + mountpoint -q /home/yunohost.backup/tmp/synapse-pre-upgrade1
2019-03-21 11:06:13,390: DEBUG - 94165 + mv /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/default/coturn-synapse /etc/default/coturn-synapse
2019-03-21 11:06:13,391: DEBUG - 94166 + read line
2019-03-21 11:06:13,392: DEBUG - 94167 ++ grep -ohP '^"\K.*(?=",".*"$)'
2019-03-21 11:06:13,394: DEBUG - 94168 ++ echo '"/etc/systemd/system/coturn-synapse.service","apps/synapse/backup/etc/systemd/system/coturn-synapse.service"'
2019-03-21 11:06:13,395: DEBUG - 94169 + local ORIGIN_PATH=/etc/systemd/system/coturn-synapse.service
2019-03-21 11:06:13,395: DEBUG - 94170 ++ echo '"/etc/systemd/system/coturn-synapse.service","apps/synapse/backup/etc/systemd/system/coturn-synapse.service"'
2019-03-21 11:06:13,396: DEBUG - 94172 ++ grep -ohP '^".*","apps/synapse/backup/\K.*(?="$)'
2019-03-21 11:06:13,397: DEBUG - 94173 + local ARCHIVE_PATH=etc/systemd/system/coturn-synapse.service
2019-03-21 11:06:13,398: DEBUG - 94174 + ynh_restore_file etc/systemd/system/coturn-synapse.service /etc/systemd/system/coturn-synapse.service
2019-03-21 11:06:13,399: DEBUG - 94176 + local ORIGIN_PATH=/etc/systemd/system/coturn-synapse.service
2019-03-21 11:06:13,400: DEBUG - 94177 + local ARCHIVE_PATH=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/systemd/system/coturn-synapse.service
2019-03-21 11:06:13,401: DEBUG - 94178 + local DEST_PATH=/etc/systemd/system/coturn-synapse.service
2019-03-21 11:06:13,401: DEBUG - 94180 + local NOT_MANDATORY=0
2019-03-21 11:06:13,402: DEBUG - 94181 + '[' '!' -d /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/systemd/system/coturn-synapse.service ']'
2019-03-21 11:06:13,403: DEBUG - 94183 + '[' '!' -f /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/systemd/system/coturn-synapse.service ']'
2019-03-21 11:06:13,403: DEBUG - 94184 + [[ -e /etc/systemd/system/coturn-synapse.service ]]
2019-03-21 11:06:13,404: DEBUG - 94185 ++ dirname /etc/systemd/system/coturn-synapse.service
2019-03-21 11:06:13,405: DEBUG - 94187 + mkdir -p /etc/systemd/system
2019-03-21 11:06:13,406: DEBUG - 94188 + mountpoint -q /home/yunohost.backup/tmp/synapse-pre-upgrade1
2019-03-21 11:06:13,407: DEBUG - 94190 + mv /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/etc/systemd/system/coturn-synapse.service /etc/systemd/system/coturn-synapse.service
2019-03-21 11:06:13,408: DEBUG - 94190 + read line
2019-03-21 11:06:13,509: DEBUG - 94292 ++ grep -ohP '^"\K.*(?=",".*"$)'
2019-03-21 11:06:13,510: DEBUG - 94293 ++ echo '"/opt/yunohost/matrix-synapse","apps/synapse/backup/bin"'
2019-03-21 11:06:13,510: DEBUG - 94294 + local ORIGIN_PATH=/opt/yunohost/matrix-synapse
2019-03-21 11:06:13,511: DEBUG - 94294 ++ echo '"/opt/yunohost/matrix-synapse","apps/synapse/backup/bin"'
2019-03-21 11:06:13,512: DEBUG - 94295 ++ grep -ohP '^".*","apps/synapse/backup/\K.*(?="$)'
2019-03-21 11:06:13,513: DEBUG - 94296 + local ARCHIVE_PATH=bin
2019-03-21 11:06:13,513: DEBUG - 94297 + ynh_restore_file bin /opt/yunohost/matrix-synapse
2019-03-21 11:06:13,514: DEBUG - 94298 + local ORIGIN_PATH=/bin
2019-03-21 11:06:13,515: DEBUG - 94299 + local ARCHIVE_PATH=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/bin
2019-03-21 11:06:13,515: DEBUG - 94299 + local DEST_PATH=/opt/yunohost/matrix-synapse
2019-03-21 11:06:13,516: DEBUG - 94300 + local NOT_MANDATORY=0
2019-03-21 11:06:13,517: DEBUG - 94301 + '[' '!' -d /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/bin ']'
2019-03-21 11:06:13,519: DEBUG - 94302 + [[ -e /opt/yunohost/matrix-synapse ]]
2019-03-21 11:06:13,520: DEBUG - 94303 ++ dirname /opt/yunohost/matrix-synapse
2019-03-21 11:06:13,521: DEBUG - 94303 + mkdir -p /opt/yunohost
2019-03-21 11:06:13,523: DEBUG - 94304 + mountpoint -q /home/yunohost.backup/tmp/synapse-pre-upgrade1
2019-03-21 11:06:13,524: DEBUG - 94305 + mv /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/bin /opt/yunohost/matrix-synapse
2019-03-21 11:06:21,748: DEBUG - 102526 + read line
2019-03-21 11:06:21,748: DEBUG - 102528 ++ echo '"/var/log/matrix-synapse","apps/synapse/backup/var/log/matrix-synapse"'
2019-03-21 11:06:21,749: DEBUG - 102529 ++ grep -ohP '^"\K.*(?=",".*"$)'
2019-03-21 11:06:21,850: DEBUG - 102630 + local ORIGIN_PATH=/var/log/matrix-synapse
2019-03-21 11:06:21,851: DEBUG - 102632 ++ echo '"/var/log/matrix-synapse","apps/synapse/backup/var/log/matrix-synapse"'
2019-03-21 11:06:21,852: DEBUG - 102633 ++ grep -ohP '^".*","apps/synapse/backup/\K.*(?="$)'
2019-03-21 11:06:21,853: DEBUG - 102634 + local ARCHIVE_PATH=var/log/matrix-synapse
2019-03-21 11:06:21,854: DEBUG - 102635 + ynh_restore_file var/log/matrix-synapse /var/log/matrix-synapse
2019-03-21 11:06:21,854: DEBUG - 102636 + local ORIGIN_PATH=/var/log/matrix-synapse
2019-03-21 11:06:21,855: DEBUG - 102637 + local ARCHIVE_PATH=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/var/log/matrix-synapse
2019-03-21 11:06:21,856: DEBUG - 102639 + local DEST_PATH=/var/log/matrix-synapse
2019-03-21 11:06:21,857: DEBUG - 102640 + local NOT_MANDATORY=0
2019-03-21 11:06:21,857: DEBUG - 102642 + '[' '!' -d /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/var/log/matrix-synapse ']'
2019-03-21 11:06:21,858: DEBUG - 102644 + [[ -e /var/log/matrix-synapse ]]
2019-03-21 11:06:21,859: DEBUG - 102646 ++ dirname /var/log/matrix-synapse
2019-03-21 11:06:21,860: DEBUG - 102646 + mkdir -p /var/log
2019-03-21 11:06:21,860: DEBUG - 102647 + mountpoint -q /home/yunohost.backup/tmp/synapse-pre-upgrade1
2019-03-21 11:06:21,861: DEBUG - 102649 + mv /home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup/var/log/matrix-synapse /var/log/matrix-synapse
2019-03-21 11:06:32,891: DEBUG - 113677 + read line
2019-03-21 11:06:32,891: DEBUG - 113679 + ynh_install_app_dependencies coturn build-essential python3-dev libffi-dev python3-pip python3-setuptools sqlite3 libssl-dev python3-venv libxml2-dev libxslt1-dev python3-lxml libjpeg-dev libpq-dev postgresql acl
2019-03-21 11:06:32,892: DEBUG - 113680 + local 'dependencies=coturn build-essential python3-dev libffi-dev python3-pip python3-setuptools sqlite3 libssl-dev python3-venv libxml2-dev libxslt1-dev python3-lxml libjpeg-dev libpq-dev postgresql acl'
2019-03-21 11:06:32,893: DEBUG - 113682 + local 'dependencies=coturn, build-essential, python3-dev, libffi-dev, python3-pip, python3-setuptools, sqlite3, libssl-dev, python3-venv, libxml2-dev, libxslt1-dev, python3-lxml, libjpeg-dev, libpq-dev, postgresql, acl'
2019-03-21 11:06:32,894: DEBUG - 113683 + local 'dependencies=coturn, build-essential, python3-dev, libffi-dev, python3-pip, python3-setuptools, sqlite3, libssl-dev, python3-venv, libxml2-dev, libxslt1-dev, python3-lxml, libjpeg-dev, libpq-dev, postgresql, acl'
2019-03-21 11:06:32,895: DEBUG - 113684 + local manifest_path=../manifest.json
2019-03-21 11:06:32,896: DEBUG - 113684 + '[' '!' -e ../manifest.json ']'
2019-03-21 11:06:32,897: DEBUG - 113685 + manifest_path=../settings/manifest.json
2019-03-21 11:06:32,898: DEBUG - 113686 ++ cut -d '"' -f 4
2019-03-21 11:06:32,898: DEBUG - 113687 ++ grep '\"version\": ' ../settings/manifest.json
2019-03-21 11:06:32,899: DEBUG - 113688 + local version=0.34.0.1~ynh1
2019-03-21 11:06:32,900: DEBUG - 113689 + '[' 13 -eq 0 ']'
2019-03-21 11:06:32,901: DEBUG - 113690 + local dep_app=synapse
2019-03-21 11:06:32,902: DEBUG - 113691 + cat
2019-03-21 11:06:32,902: DEBUG - 113691 + ynh_package_install_from_equivs /tmp/synapse-ynh-deps.control
2019-03-21 11:06:32,903: DEBUG - 113692 + local controlfile=/tmp/synapse-ynh-deps.control
2019-03-21 11:06:32,904: DEBUG - 113693 ++ grep '^Package: ' /tmp/synapse-ynh-deps.control
2019-03-21 11:06:32,905: DEBUG - 113694 ++ cut '-d ' -f 2
2019-03-21 11:06:32,906: DEBUG - 113695 + local pkgname=synapse-ynh-deps
2019-03-21 11:06:32,907: DEBUG - 113696 ++ grep '^Version: ' /tmp/synapse-ynh-deps.control
2019-03-21 11:06:32,907: DEBUG - 113697 ++ cut '-d ' -f 2
2019-03-21 11:06:32,908: DEBUG - 113698 + local pkgversion=0.34.0.1~ynh1
2019-03-21 11:06:32,908: DEBUG - 113699 + [[ -z synapse-ynh-deps ]]
2019-03-21 11:06:32,909: DEBUG - 113700 + [[ -z 0.34.0.1~ynh1 ]]
2019-03-21 11:06:32,910: DEBUG - 113700 + ynh_package_update
2019-03-21 11:06:32,910: DEBUG - 113701 + ynh_apt update
2019-03-21 11:06:32,911: DEBUG - 113702 + ynh_wait_dpkg_free
2019-03-21 11:06:32,912: DEBUG - 113703 + local try
2019-03-21 11:06:32,912: DEBUG - 113704 ++ seq 1 17
2019-03-21 11:06:32,913: DEBUG - 113705 + for try in `seq 1 17`
2019-03-21 11:06:32,914: DEBUG - 113706 + sudo lsof /var/lib/dpkg/lock
2019-03-21 11:06:33,918: DEBUG - 114710 + return 0
2019-03-21 11:06:33,920: DEBUG - 114711 + DEBIAN_FRONTEND=noninteractive
2019-03-21 11:06:33,922: DEBUG - 114712 + sudo apt-get -y update
2019-03-21 11:06:34,725: DEBUG - 115516 Get:1 http://debian.mirrors.ovh.net/debian stretch-updates InRelease [91.0 kB]
2019-03-21 11:06:34,831: DEBUG - 115617 Hit:2 http://security.debian.org stretch/updates InRelease
2019-03-21 11:06:34,832: DEBUG - 115618 Ign:3 http://debian.mirrors.ovh.net/debian stretch InRelease
2019-03-21 11:06:34,833: DEBUG - 115619 Hit:4 http://forge.yunohost.org/debian stretch InRelease
2019-03-21 11:06:34,834: DEBUG - 115621 Get:5 http://debian.mirrors.ovh.net/debian stretch Release [118 kB]
2019-03-21 11:06:35,036: DEBUG - 115823 Hit:6 http://cdn-fastly.deb.debian.org/debian stretch-backports InRelease
2019-03-21 11:06:35,538: DEBUG - 116326 Hit:7 https://apt.cozy.io/debian stretch InRelease
2019-03-21 11:06:35,540: DEBUG - 116327 Hit:8 https://packages.sury.org/php stretch InRelease
2019-03-21 11:06:35,542: DEBUG - 116329 Hit:9 https://download.docker.com/linux/debian stretch InRelease
2019-03-21 11:06:38,652: DEBUG - 119439 Fetched 209 kB in 3s (56.3 kB/s)
2019-03-21 11:06:43,164: DEBUG - 123951 Reading package lists...
2019-03-21 11:06:43,265: DEBUG - 124052 ++ mktemp -d
2019-03-21 11:06:43,266: DEBUG - 124054 + local TMPDIR=/tmp/tmp.2LHDZmGdqX
2019-03-21 11:06:43,267: DEBUG - 124055 + echo 10
2019-03-21 11:06:43,267: DEBUG - 124057 + ynh_wait_dpkg_free
2019-03-21 11:06:43,268: DEBUG - 124059 + local try
2019-03-21 11:06:43,269: DEBUG - 124061 ++ seq 1 17
2019-03-21 11:06:43,269: DEBUG - 124062 + for try in `seq 1 17`
2019-03-21 11:06:43,270: DEBUG - 124063 + sudo lsof /var/lib/dpkg/lock
2019-03-21 11:06:43,972: DEBUG - 124765 + return 0
2019-03-21 11:06:43,973: DEBUG - 124766 + cp /tmp/synapse-ynh-deps.control /tmp/tmp.2LHDZmGdqX/control
2019-03-21 11:06:43,974: DEBUG - 124767 + cd /tmp/tmp.2LHDZmGdqX
2019-03-21 11:06:43,975: DEBUG - 124768 + equivs-build ./control
2019-03-21 11:06:47,585: DEBUG - 128379 + dpkg --force-depends -i ./synapse-ynh-deps_0.34.0.1~ynh1_all.deb
2019-03-21 11:06:47,887: DEBUG - 128681 Selecting previously unselected package synapse-ynh-deps.
2019-03-21 11:06:48,289: DEBUG - 129084 (Reading database ... 119985 files and directories currently installed.)
2019-03-21 11:06:48,291: DEBUG - 129086 Preparing to unpack .../synapse-ynh-deps_0.34.0.1~ynh1_all.deb ...
2019-03-21 11:06:48,392: DEBUG - 129188 Unpacking synapse-ynh-deps (0.34.0.1~ynh1) ...
2019-03-21 11:06:48,594: DEBUG - 129390 dpkg: synapse-ynh-deps: dependency problems, but configuring anyway as you requested:
2019-03-21 11:06:48,595: DEBUG - 129391  synapse-ynh-deps depends on coturn; however:
2019-03-21 11:06:48,595: DEBUG - 129393   Package coturn is not installed.
2019-03-21 11:06:48,596: DEBUG - 129394  synapse-ynh-deps depends on sqlite3; however:
2019-03-21 11:06:48,597: DEBUG - 129395   Package sqlite3 is not installed.
2019-03-21 11:06:48,598: DEBUG - 129396  synapse-ynh-deps depends on python3-lxml; however:
2019-03-21 11:06:48,599: DEBUG - 129397   Package python3-lxml is not installed.
2019-03-21 11:06:48,599: DEBUG - 129398  synapse-ynh-deps depends on postgresql; however:
2019-03-21 11:06:48,600: DEBUG - 129399   Package postgresql is not installed.
2019-03-21 11:06:48,601: DEBUG - 129399
2019-03-21 11:06:48,602: DEBUG - 129400 Setting up synapse-ynh-deps (0.34.0.1~ynh1) ...
2019-03-21 11:06:49,004: DEBUG - 129702 + ynh_package_install -f
2019-03-21 11:06:49,005: DEBUG - 129705 + ynh_apt --no-remove -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install -f
2019-03-21 11:06:49,006: DEBUG - 129707 + ynh_wait_dpkg_free
2019-03-21 11:06:49,007: DEBUG - 129709 + local try
2019-03-21 11:06:49,008: DEBUG - 129711 ++ seq 1 17
2019-03-21 11:06:49,008: DEBUG - 129712 + for try in `seq 1 17`
2019-03-21 11:06:49,009: DEBUG - 129714 + sudo lsof /var/lib/dpkg/lock
2019-03-21 11:06:49,612: DEBUG - 130316 + return 0
2019-03-21 11:06:49,613: DEBUG - 130317 + DEBIAN_FRONTEND=noninteractive
2019-03-21 11:06:49,614: DEBUG - 130318 + sudo apt-get -y --no-remove -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install -f
2019-03-21 11:06:51,119: DEBUG - 131823 Reading package lists...
2019-03-21 11:06:51,822: DEBUG - 132526 Building dependency tree...
2019-03-21 11:06:51,823: DEBUG - 132527 Reading state information...
2019-03-21 11:06:52,325: DEBUG - 133029 Correcting dependencies... Done
2019-03-21 11:06:53,028: DEBUG - 133732 The following additional packages will be installed:
2019-03-21 11:06:53,029: DEBUG - 133733   coturn libevent-core-2.0-5 libevent-extra-2.0-5 libevent-openssl-2.0-5
2019-03-21 11:06:53,030: DEBUG - 133734   libevent-pthreads-2.0-5 postgresql python3-bs4 python3-html5lib python3-lxml
2019-03-21 11:06:53,030: DEBUG - 133735   python3-webencodings sqlite3
2019-03-21 11:06:53,031: DEBUG - 133736 Suggested packages:
2019-03-21 11:06:53,032: DEBUG - 133737   sip-router xmpp-server postgresql-doc python3-genshi python3-lxml-dbg
2019-03-21 11:06:53,033: DEBUG - 133738   python-lxml-doc sqlite3-doc
2019-03-21 11:06:53,134: DEBUG - 133839 The following NEW packages will be installed:
2019-03-21 11:06:53,135: DEBUG - 133841   coturn libevent-core-2.0-5 libevent-extra-2.0-5 libevent-openssl-2.0-5
2019-03-21 11:06:53,137: DEBUG - 133842   libevent-pthreads-2.0-5 postgresql python3-bs4 python3-html5lib python3-lxml
2019-03-21 11:06:53,138: DEBUG - 133843   python3-webencodings sqlite3
2019-03-21 11:06:53,239: DEBUG - 133944 0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
2019-03-21 11:06:53,241: DEBUG - 133945 Need to get 1,132 kB/2,545 kB of archives.
2019-03-21 11:06:53,243: DEBUG - 133946 After this operation, 8,637 kB of additional disk space will be used.
2019-03-21 11:06:53,244: DEBUG - 133947 Get:1 http://debian.mirrors.ovh.net/debian stretch/main amd64 libevent-core-2.0-5 amd64 2.0.21-stable-3 [109 kB]
2019-03-21 11:06:53,346: DEBUG - 134049 Get:2 http://debian.mirrors.ovh.net/debian stretch/main amd64 libevent-extra-2.0-5 amd64 2.0.21-stable-3 [90.2 kB]
2019-03-21 11:06:53,547: DEBUG - 134250 Get:3 http://debian.mirrors.ovh.net/debian stretch/main amd64 libevent-openssl-2.0-5 amd64 2.0.21-stable-3 [49.8 kB]
2019-03-21 11:06:53,750: DEBUG - 134453 Get:4 http://debian.mirrors.ovh.net/debian stretch/main amd64 libevent-pthreads-2.0-5 amd64 2.0.21-stable-3 [43.8 kB]
2019-03-21 11:06:53,751: DEBUG - 134455 Get:5 http://debian.mirrors.ovh.net/debian stretch/main amd64 postgresql all 9.6+181+deb9u2 [55.8 kB]
2019-03-21 11:06:53,852: DEBUG - 134557 Get:6 http://debian.mirrors.ovh.net/debian stretch/main amd64 sqlite3 amd64 3.16.2-5+deb9u1 [784 kB]
2019-03-21 11:06:57,462: WARNING - 138167 debconf: unable to initialize frontend: Dialog
2019-03-21 11:06:57,464: WARNING - 138169 debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
2019-03-21 11:06:57,466: WARNING - 138171 debconf: falling back to frontend: Readline
2019-03-21 11:06:57,467: WARNING - 138174 debconf: unable to initialize frontend: Readline
2019-03-21 11:06:57,469: WARNING - 138175 debconf: (This frontend requires a controlling tty.)
2019-03-21 11:06:57,470: WARNING - 138176 debconf: falling back to frontend: Teletype
2019-03-21 11:06:57,472: WARNING - 138178 dpkg-preconfigure: unable to re-open stdin:
2019-03-21 11:06:57,774: DEBUG - 138480 Fetched 1,132 kB in 0s (1,693 kB/s)
2019-03-21 11:06:57,975: DEBUG - 138682 Selecting previously unselected package libevent-core-2.0-5:amd64.
2019-03-21 11:06:58,177: DEBUG - 138883 (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 119989 files and directories currently installed.)
2019-03-21 11:06:58,178: DEBUG - 138884 Preparing to unpack .../00-libevent-core-2.0-5_2.0.21-stable-3_amd64.deb ...
2019-03-21 11:06:58,279: DEBUG - 138986 Unpacking libevent-core-2.0-5:amd64 (2.0.21-stable-3) ...
2019-03-21 11:06:58,681: DEBUG - 139388 Selecting previously unselected package libevent-extra-2.0-5:amd64.
2019-03-21 11:06:58,682: DEBUG - 139389 Preparing to unpack .../01-libevent-extra-2.0-5_2.0.21-stable-3_amd64.deb ...
2019-03-21 11:06:58,783: DEBUG - 139491 Unpacking libevent-extra-2.0-5:amd64 (2.0.21-stable-3) ...
2019-03-21 11:06:59,184: DEBUG - 139893 Selecting previously unselected package libevent-openssl-2.0-5:amd64.
2019-03-21 11:06:59,185: DEBUG - 139894 Preparing to unpack .../02-libevent-openssl-2.0-5_2.0.21-stable-3_amd64.deb ...
2019-03-21 11:06:59,186: DEBUG - 139896 Unpacking libevent-openssl-2.0-5:amd64 (2.0.21-stable-3) ...
2019-03-21 11:06:59,588: DEBUG - 140299 Selecting previously unselected package libevent-pthreads-2.0-5:amd64.
2019-03-21 11:06:59,689: DEBUG - 140401 Preparing to unpack .../03-libevent-pthreads-2.0-5_2.0.21-stable-3_amd64.deb ...
2019-03-21 11:06:59,690: DEBUG - 140402 Unpacking libevent-pthreads-2.0-5:amd64 (2.0.21-stable-3) ...
2019-03-21 11:06:59,992: DEBUG - 140704 Selecting previously unselected package postgresql.
2019-03-21 11:06:59,993: DEBUG - 140705 Preparing to unpack .../04-postgresql_9.6+181+deb9u2_all.deb ...
2019-03-21 11:07:00,094: DEBUG - 140807 Unpacking postgresql (9.6+181+deb9u2) ...
2019-03-21 11:07:00,496: DEBUG - 141209 Selecting previously unselected package python3-bs4.
2019-03-21 11:07:00,498: DEBUG - 141210 Preparing to unpack .../05-python3-bs4_4.5.3-1_all.deb ...
2019-03-21 11:07:00,599: DEBUG - 141311 Unpacking python3-bs4 (4.5.3-1) ...
2019-03-21 11:07:01,001: DEBUG - 141713 Selecting previously unselected package python3-webencodings.
2019-03-21 11:07:01,002: DEBUG - 141714 Preparing to unpack .../06-python3-webencodings_0.5-2_all.deb ...
2019-03-21 11:07:01,003: DEBUG - 141715 Unpacking python3-webencodings (0.5-2) ...
2019-03-21 11:07:01,405: DEBUG - 142117 Selecting previously unselected package python3-html5lib.
2019-03-21 11:07:01,406: DEBUG - 142118 Preparing to unpack .../07-python3-html5lib_0.999999999-1_all.deb ...
2019-03-21 11:07:01,507: DEBUG - 142219 Unpacking python3-html5lib (0.999999999-1) ...
2019-03-21 11:07:01,909: DEBUG - 142621 Selecting previously unselected package python3-lxml.
2019-03-21 11:07:01,911: DEBUG - 142622 Preparing to unpack .../08-python3-lxml_3.7.1-1_amd64.deb ...
2019-03-21 11:07:02,012: DEBUG - 142723 Unpacking python3-lxml (3.7.1-1) ...
2019-03-21 11:07:02,715: DEBUG - 143427 Selecting previously unselected package sqlite3.
2019-03-21 11:07:02,716: DEBUG - 143427 Preparing to unpack .../09-sqlite3_3.16.2-5+deb9u1_amd64.deb ...
2019-03-21 11:07:02,717: DEBUG - 143428 Unpacking sqlite3 (3.16.2-5+deb9u1) ...
2019-03-21 11:07:03,420: DEBUG - 144131 Selecting previously unselected package coturn.
2019-03-21 11:07:03,421: DEBUG - 144132 Preparing to unpack .../10-coturn_4.5.0.5-1+deb9u1_amd64.deb ...
2019-03-21 11:07:03,422: DEBUG - 144133 Unpacking coturn (4.5.0.5-1+deb9u1) ...
2019-03-21 11:07:04,125: DEBUG - 144837 Setting up python3-webencodings (0.5-2) ...
2019-03-21 11:07:05,229: DEBUG - 145942 Setting up python3-lxml (3.7.1-1) ...
2019-03-21 11:07:06,333: DEBUG - 147046 Setting up python3-bs4 (4.5.3-1) ...
2019-03-21 11:07:07,538: DEBUG - 148250 Setting up sqlite3 (3.16.2-5+deb9u1) ...
2019-03-21 11:07:07,739: DEBUG - 148452 Processing triggers for libc-bin (2.24-11+deb9u4) ...
2019-03-21 11:07:07,940: DEBUG - 148653 Setting up postgresql (9.6+181+deb9u2) ...
2019-03-21 11:07:08,142: DEBUG - 148854 Setting up libevent-core-2.0-5:amd64 (2.0.21-stable-3) ...
2019-03-21 11:07:08,243: DEBUG - 148956 Setting up python3-html5lib (0.999999999-1) ...
2019-03-21 11:07:09,548: DEBUG - 150260 Processing triggers for systemd (232-25+deb9u9) ...
2019-03-21 11:07:10,251: DEBUG - 150969 Processing triggers for man-db (2.7.6.1-2) ...
2019-03-21 11:07:12,258: DEBUG - 152976 Setting up libevent-pthreads-2.0-5:amd64 (2.0.21-stable-3) ...
2019-03-21 11:07:12,359: DEBUG - 153078 Setting up libevent-extra-2.0-5:amd64 (2.0.21-stable-3) ...
2019-03-21 11:07:12,460: DEBUG - 153180 Setting up libevent-openssl-2.0-5:amd64 (2.0.21-stable-3) ...
2019-03-21 11:07:12,561: DEBUG - 153281 Setting up coturn (4.5.0.5-1+deb9u1) ...
2019-03-21 11:07:13,264: DEBUG - 153985 Adding group `turnserver' (GID 136) ...
2019-03-21 11:07:13,465: DEBUG - 154187 Done.
2019-03-21 11:07:13,867: DEBUG - 154589 Adding system user `turnserver' (UID 131) ...
2019-03-21 11:07:13,868: DEBUG - 154591 Adding new user `turnserver' (UID 131) with group `turnserver' ...
2019-03-21 11:07:14,370: DEBUG - 155093 Not creating home directory `/'.
2019-03-21 11:07:15,675: DEBUG - 156398 Processing triggers for libc-bin (2.24-11+deb9u4) ...
2019-03-21 11:07:15,776: DEBUG - 156500 Processing triggers for systemd (232-25+deb9u9) ...
2019-03-21 11:07:18,888: DEBUG - 159609 + [[ -n /tmp/tmp.2LHDZmGdqX ]]
2019-03-21 11:07:18,889: DEBUG - 159611 + rm -rf /tmp/tmp.2LHDZmGdqX
2019-03-21 11:07:18,890: DEBUG - 159612 + ynh_package_is_installed synapse-ynh-deps
2019-03-21 11:07:18,891: DEBUG - 159613 + ynh_wait_dpkg_free
2019-03-21 11:07:18,891: DEBUG - 159614 + local try
2019-03-21 11:07:18,892: DEBUG - 159615 ++ seq 1 17
2019-03-21 11:07:18,893: DEBUG - 159617 + for try in `seq 1 17`
2019-03-21 11:07:18,894: DEBUG - 159619 + sudo lsof /var/lib/dpkg/lock
2019-03-21 11:07:19,597: DEBUG - 160322 + return 0
2019-03-21 11:07:19,598: DEBUG - 160323 + dpkg-query -W -f '${Status}' synapse-ynh-deps
2019-03-21 11:07:19,599: DEBUG - 160325 + grep -c 'ok installed'
2019-03-21 11:07:19,701: DEBUG - 160426 + rm /tmp/synapse-ynh-deps.control
2019-03-21 11:07:19,702: DEBUG - 160427 + ynh_app_setting_set synapse apt_dependencies coturn, build-essential, python3-dev, libffi-dev, python3-pip, python3-setuptools, sqlite3, libssl-dev, python3-venv, libxml2-dev, libxslt1-dev, python3-lxml, libjpeg-dev, libpq-dev, postgresql, acl
2019-03-21 11:07:19,702: DEBUG - 160429 + sudo yunohost app setting synapse apt_dependencies --value=coturn, --quiet
2019-03-21 11:07:22,710: DEBUG - 163436 + ynh_system_user_create matrix-synapse /var/lib/matrix-synapse
2019-03-21 11:07:22,711: DEBUG - 163438 + local legacy_args=uh
2019-03-21 11:07:22,712: DEBUG - 163440 + args_array=([u]=username= [h]=home_dir= [s]=use_shell)
2019-03-21 11:07:22,713: DEBUG - 163441 + declare -Ar args_array
2019-03-21 11:07:22,714: DEBUG - 163442 + local username
2019-03-21 11:07:22,714: DEBUG - 163444 + local home_dir
2019-03-21 11:07:22,715: DEBUG - 163445 + local use_shell
2019-03-21 11:07:22,716: DEBUG - 163446 + ynh_handle_getopts_args matrix-synapse /var/lib/matrix-synapse
2019-03-21 11:07:22,717: DEBUG - 163447 + set +x
2019-03-21 11:07:22,718: DEBUG - 163448 + echo '! Helper used in legacy mode !'
2019-03-21 11:07:22,719: DEBUG - 163449 + set +x
2019-03-21 11:07:22,720: DEBUG - 163450 + use_shell=0
2019-03-21 11:07:22,721: DEBUG - 163451 + home_dir=/var/lib/matrix-synapse
2019-03-21 11:07:22,722: DEBUG - 163453 + ynh_system_user_exists matrix-synapse
2019-03-21 11:07:22,723: DEBUG - 163454 + getent passwd matrix-synapse
2019-03-21 11:07:22,825: DEBUG - 163555 + '[' -n /var/lib/matrix-synapse ']'
2019-03-21 11:07:22,826: DEBUG - 163557 + local 'user_home_dir=-d /var/lib/matrix-synapse'
2019-03-21 11:07:22,827: DEBUG - 163558 + '[' 0 -eq 1 ']'
2019-03-21 11:07:22,829: DEBUG - 163559 + local 'shell=--shell /usr/sbin/nologin'
2019-03-21 11:07:22,831: DEBUG - 163561 + useradd -d /var/lib/matrix-synapse --system --user-group matrix-synapse --shell /usr/sbin/nologin
2019-03-21 11:07:32,662: DEBUG - 173392 + adduser matrix-synapse ssl-cert
2019-03-21 11:07:32,865: DEBUG - 173593 Adding user `matrix-synapse' to group `ssl-cert' ...
2019-03-21 11:07:32,966: DEBUG - 173695 Adding user matrix-synapse to group ssl-cert
2019-03-21 11:07:33,067: DEBUG - 173796 Done.
2019-03-21 11:07:33,068: DEBUG - 173797 + adduser turnserver ssl-cert
2019-03-21 11:07:33,270: DEBUG - 173999 Adding user `turnserver' to group `ssl-cert' ...
2019-03-21 11:07:33,271: DEBUG - 174001 Adding user turnserver to group ssl-cert
2019-03-21 11:07:33,472: DEBUG - 174203 Done.
2019-03-21 11:07:33,473: DEBUG - 174205 ++ ynh_app_setting_get synapse turnserver_tls_port
2019-03-21 11:07:33,474: DEBUG - 174206 ++ sudo yunohost app setting synapse turnserver_tls_port --output-as plain --quiet
2019-03-21 11:07:36,381: DEBUG - 177116 + turnserver_tls_port=5349
2019-03-21 11:07:36,383: DEBUG - 177118 ++ ynh_app_setting_get synapse turnserver_alt_tls_port
2019-03-21 11:07:36,384: DEBUG - 177119 ++ sudo yunohost app setting synapse turnserver_alt_tls_port --output-as plain --quiet
2019-03-21 11:07:39,394: DEBUG - 180126 + turnserver_alt_tls_port=5350
2019-03-21 11:07:39,395: DEBUG - 180128 ++ ynh_app_setting_get synapse turnserver_pwd
2019-03-21 11:07:39,396: DEBUG - 180129 ++ sudo yunohost app setting synapse turnserver_pwd --output-as plain --quiet
2019-03-21 11:07:42,406: DEBUG - 183139 + turnserver_pwd=3zMcFqspiCxSzLqehrvuawSpLoftAH
2019-03-21 11:07:42,407: DEBUG - 183140 ++ ynh_app_setting_get synapse cli_port
2019-03-21 11:07:42,408: DEBUG - 183142 ++ sudo yunohost app setting synapse cli_port --output-as plain --quiet
2019-03-21 11:07:45,418: DEBUG - 186152 + cli_port=5766
2019-03-21 11:07:45,419: DEBUG - 186153 + coturn_config_path=/etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,421: DEBUG - 186155 + cp ../settings/conf/turnserver.conf /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,422: DEBUG - 186156 + ynh_replace_string __APP__ synapse /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,423: DEBUG - 186158 + local delimit=@
2019-03-21 11:07:45,424: DEBUG - 186159 + local match_string=__APP__
2019-03-21 11:07:45,425: DEBUG - 186160 + local replace_string=synapse
2019-03-21 11:07:45,426: DEBUG - 186161 + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,427: DEBUG - 186162 + match_string=__APP__
2019-03-21 11:07:45,428: DEBUG - 186163 + replace_string=synapse
2019-03-21 11:07:45,429: DEBUG - 186164 + sudo sed --in-place s@__APP__@synapse@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,431: DEBUG - 186165 + ynh_replace_string __TURNPWD__ 3zMcFqspiCxSzLqehrvuawSpLoftAH /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,432: DEBUG - 186166 + local delimit=@
2019-03-21 11:07:45,432: DEBUG - 186167 + local match_string=__TURNPWD__
2019-03-21 11:07:45,434: DEBUG - 186168 + local replace_string=3zMcFqspiCxSzLqehrvuawSpLoftAH
2019-03-21 11:07:45,435: DEBUG - 186168 + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,436: DEBUG - 186169 + match_string=__TURNPWD__
2019-03-21 11:07:45,437: DEBUG - 186170 + replace_string=3zMcFqspiCxSzLqehrvuawSpLoftAH
2019-03-21 11:07:45,438: DEBUG - 186171 + sudo sed --in-place s@__TURNPWD__@3zMcFqspiCxSzLqehrvuawSpLoftAH@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,539: DEBUG - 186272 + ynh_replace_string __DOMAIN__ matrix.nicofrand.eu /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,540: DEBUG - 186275 + local delimit=@
2019-03-21 11:07:45,541: DEBUG - 186275 + local match_string=__DOMAIN__
2019-03-21 11:07:45,542: DEBUG - 186276 + local replace_string=matrix.nicofrand.eu
2019-03-21 11:07:45,544: DEBUG - 186277 + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,545: DEBUG - 186278 + match_string=__DOMAIN__
2019-03-21 11:07:45,547: DEBUG - 186279 + replace_string=matrix.nicofrand.eu
2019-03-21 11:07:45,548: DEBUG - 186281 + sudo sed --in-place s@[email protected]@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,549: DEBUG - 186282 + ynh_replace_string __TLS_PORT__ 5349 /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,550: DEBUG - 186283 + local delimit=@
2019-03-21 11:07:45,551: DEBUG - 186283 + local match_string=__TLS_PORT__
2019-03-21 11:07:45,552: DEBUG - 186285 + local replace_string=5349
2019-03-21 11:07:45,553: DEBUG - 186286 + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,554: DEBUG - 186287 + match_string=__TLS_PORT__
2019-03-21 11:07:45,555: DEBUG - 186288 + replace_string=5349
2019-03-21 11:07:45,556: DEBUG - 186289 + sudo sed --in-place s@__TLS_PORT__@5349@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,658: DEBUG - 186391 + ynh_replace_string __TLS_ALT_PORT__ 5350 /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,659: DEBUG - 186392 + local delimit=@
2019-03-21 11:07:45,660: DEBUG - 186394 + local match_string=__TLS_ALT_PORT__
2019-03-21 11:07:45,662: DEBUG - 186396 + local replace_string=5350
2019-03-21 11:07:45,663: DEBUG - 186397 + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,665: DEBUG - 186400 + match_string=__TLS_ALT_PORT__
2019-03-21 11:07:45,666: DEBUG - 186402 + replace_string=5350
2019-03-21 11:07:45,667: DEBUG - 186403 + sudo sed --in-place s@__TLS_ALT_PORT__@5350@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,769: DEBUG - 186504 + ynh_replace_string __CLI_PORT__ 5766 /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,770: DEBUG - 186505 + local delimit=@
2019-03-21 11:07:45,770: DEBUG - 186506 + local match_string=__CLI_PORT__
2019-03-21 11:07:45,771: DEBUG - 186507 + local replace_string=5766
2019-03-21 11:07:45,772: DEBUG - 186508 + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,772: DEBUG - 186509 + match_string=__CLI_PORT__
2019-03-21 11:07:45,773: DEBUG - 186510 + replace_string=5766
2019-03-21 11:07:45,773: DEBUG - 186511 + sudo sed --in-place s@__CLI_PORT__@5766@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:45,774: DEBUG - 186512 ++ curl ip.yunohost.org
2019-03-21 11:07:45,875: DEBUG - 186614 + public_ip4=37.187.23.142
2019-03-21 11:07:45,876: WARNING - 186616   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2019-03-21 11:07:45,877: DEBUG - 186618 ++ curl ipv6.yunohost.org
2019-03-21 11:07:45,878: WARNING - 186618                                  Dload  Upload   Total   Spent    Left  Speed
2019-03-21 11:07:45,879: WARNING - 186619 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    13  100    13    0     0    289      0 --:--:-- --:--:-- --:--:--   295
2019-03-21 11:07:45,981: DEBUG - 186721 + public_ip6=2001:41d0:a:178e::1
2019-03-21 11:07:45,982: WARNING - 186723   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2019-03-21 11:07:45,983: DEBUG - 186725 + [[ -n 37.187.23.142 ]]
2019-03-21 11:07:45,984: WARNING - 186726                                  Dload  Upload   Total   Spent    Left  Speed
2019-03-21 11:07:45,986: DEBUG - 186727 + ynh_validate_ip4 37.187.23.142
2019-03-21 11:07:45,987: WARNING - 186728 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    19  100    19    0     0    310      0 --:--:-- --:--:-- --:--:--   311
2019-03-21 11:07:45,989: DEBUG - 186729 + ynh_validate_ip 4 37.187.23.142
2019-03-21 11:07:45,989: DEBUG - 186730 + local IP_ADDRESS_FAMILY=4
2019-03-21 11:07:45,990: DEBUG - 186731 + local IP_ADDRESS=37.187.23.142
2019-03-21 11:07:45,991: DEBUG - 186732 + '[' 4 == 4 ']'
2019-03-21 11:07:45,992: DEBUG - 186733 + python /dev/stdin
2019-03-21 11:07:46,093: DEBUG - 186835 + ynh_replace_string __IPV4__ 37.187.23.142 /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:46,094: DEBUG - 186837 + local delimit=@
2019-03-21 11:07:46,094: DEBUG - 186839 + local match_string=__IPV4__
2019-03-21 11:07:46,095: DEBUG - 186841 + local replace_string=37.187.23.142
2019-03-21 11:07:46,096: DEBUG - 186844 + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:07:46,097: DEBUG - 186845 + match_string=__IPV4__
2019-03-21 11:07:46,097: DEBUG - 186847 + replace_string=37.187.23.142
2019-03-21 11:07:46,098: DEBUG - 186848 + sudo sed --in-place s@[email protected]@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:46,199: DEBUG - 186949 + [[ -n 2001:41d0:a:178e::1 ]]
2019-03-21 11:07:46,200: WARNING - 186950 /tmp/restoreSVuydC/restore: line 110: ynh_valide_ip6: command not found
2019-03-21 11:07:46,203: DEBUG - 186952 + ynh_valide_ip6 2001:41d0:a:178e::1
2019-03-21 11:07:46,204: DEBUG - 186953 + ynh_replace_string ,__IPV6__ '' /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:46,206: DEBUG - 186955 + local delimit=@
2019-03-21 11:07:46,207: DEBUG - 186956 + local match_string=,__IPV6__
2019-03-21 11:07:46,208: DEBUG - 186957 + local replace_string=
2019-03-21 11:07:46,210: DEBUG - 186958 + local workfile=/etc/matrix-synapse/coturn.conf
2019-03-21 11:07:46,211: DEBUG - 186959 + match_string=,__IPV6__
2019-03-21 11:07:46,212: DEBUG - 186961 + replace_string=
2019-03-21 11:07:46,213: DEBUG - 186962 + sudo sed --in-place s@,__IPV6__@@g /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:46,214: DEBUG - 186963 + ynh_store_file_checksum /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:46,215: DEBUG - 186964 + local checksum_setting_name=checksum__etc_matrix-synapse_coturn.conf
2019-03-21 11:07:46,216: DEBUG - 186965 ++ sudo md5sum /etc/matrix-synapse/coturn.conf
2019-03-21 11:07:46,217: DEBUG - 186966 ++ cut '-d ' -f1
2019-03-21 11:07:46,319: DEBUG - 187068 + ynh_app_setting_set synapse checksum__etc_matrix-synapse_coturn.conf 64eb3f589127eb3f10088b6dbc183426
2019-03-21 11:07:46,320: DEBUG - 187069 + sudo yunohost app setting synapse checksum__etc_matrix-synapse_coturn.conf --value=64eb3f589127eb3f10088b6dbc183426 --quiet
2019-03-21 11:07:49,231: DEBUG - 189978 + yunohost firewall allow TCP 8448
2019-03-21 11:08:14,104: DEBUG - 214848 + yunohost firewall allow Both 5349
2019-03-21 11:08:37,878: DEBUG - 238618 + yunohost firewall allow Both 5350
2019-03-21 11:09:02,051: DEBUG - 262789 + python3 /opt/yunohost/matrix-synapse/add_sso_conf.py
2019-03-21 11:09:02,253: DEBUG - 262991 + ynh_die 'Your file /etc/ssowat/conf.json.persistent don'\''t respect the json synaxe. Please fix the synaxe to install this app. For more information see here : https://github.com/YunoHost-Apps/synapse_ynh/issues/32'
2019-03-21 11:09:02,254: WARNING - 262992 python3: can't open file '/opt/yunohost/matrix-synapse/add_sso_conf.py': [Errno 2] No such file or directory
2019-03-21 11:09:02,256: DEBUG - 262993 + echo 'Your file /etc/ssowat/conf.json.persistent don'\''t respect the json synaxe. Please fix the synaxe to install this app. For more information see here : https://github.com/YunoHost-Apps/synapse_ynh/issues/32'
2019-03-21 11:09:02,257: WARNING - 262994 Your file /etc/ssowat/conf.json.persistent don't respect the json synaxe. Please fix the synaxe to install this app. For more information see here : https://github.com/YunoHost-Apps/synapse_ynh/issues/32
2019-03-21 11:09:02,259: DEBUG - 262995 + exit 1
2019-03-21 11:09:02,260: WARNING - 262996 !!
2019-03-21 11:09:02,262: DEBUG - 262997 + ynh_exit_properly
2019-03-21 11:09:02,263: WARNING - 262998   synapse's script has encountered an error. Its execution was cancelled.
2019-03-21 11:09:02,264: DEBUG - 262999 + local exit_code=1
2019-03-21 11:09:02,265: WARNING - 263000 !!
2019-03-21 11:09:02,267: DEBUG - 263001 + '[' 1 -eq 0 ']'
2019-03-21 11:09:02,268: WARNING - 263002
2019-03-21 11:09:02,270: DEBUG - 263002 + trap '' EXIT
2019-03-21 11:09:02,271: DEBUG - 263003 + set +eu
2019-03-21 11:09:02,272: DEBUG - 263004 + echo -e '!!\n  synapse'\''s script has encountered an error. Its execution was cancelled.\n!!'
2019-03-21 11:09:02,272: DEBUG - 263005 + type -t ynh_clean_setup
2019-03-21 11:09:02,273: DEBUG - 263006 + ynh_die
2019-03-21 11:09:02,274: DEBUG - 263007 + echo ''
2019-03-21 11:09:02,275: DEBUG - 263008 + exit 1
2019-03-21 11:09:02,576: DEBUG - 263300 The operation 'Restore 'synapse' from a backup archive' has failed! To get help, please share the full log of this operation using the command 'yunohost log display 20190321-100545-backup_restore_app-synapse --share'
2019-03-21 11:09:02,577: WARNING - 263156 Unable to restore the app 'synapse'
2019-03-21 11:09:02,579: WARNING - Traceback (most recent call last):
2019-03-21 11:09:02,580: WARNING -   File "/usr/lib/moulinette/yunohost/backup.py", line 1302, in _restore_app
2019-03-21 11:09:02,582: WARNING -     env=env_dict)
2019-03-21 11:09:02,584: WARNING -   File "/usr/lib/moulinette/yunohost/hook.py", line 390, in hook_exec
2019-03-21 11:09:02,586: WARNING -     raise YunohostError('hook_exec_failed', path=path)
2019-03-21 11:09:02,587: WARNING - YunohostError: Script execution failed: /tmp/restoreSVuydC/restore
2019-03-21 11:09:02,689: DEBUG - 263445 Executing command 'sh -c YNH_APP_INSTANCE_NUMBER=1 YNH_APP_ID=synapse YNH_CWD=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/settings/scripts YNH_APP_INSTANCE_NAME=synapse YNH_STDINFO=/tmp/tmpId2koP/stdinfo BASH_XTRACEFD=7 /bin/bash -x "./remove" synapse 7>&1'…
2019-03-21 11:09:02,690: DEBUG - 263446 About to run the command '['sh', '-c', 'YNH_APP_INSTANCE_NUMBER=1 YNH_APP_ID=synapse YNH_CWD=/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/settings/scripts YNH_APP_INSTANCE_NAME=synapse YNH_STDINFO=/tmp/tmpId2koP/stdinfo BASH_XTRACEFD=7 /bin/bash -x "./remove" synapse 7>&1']'
2019-03-21 11:09:02,891: DEBUG - 263675 + source /usr/share/yunohost/helpers
2019-03-21 11:09:02,892: DEBUG - 263677 +++ run-parts --list /usr/share/yunohost/helpers.d
2019-03-21 11:09:02,892: DEBUG - 263678 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:02,893: DEBUG - 263679 ++ '[' -r /usr/share/yunohost/helpers.d/backend ']'
2019-03-21 11:09:02,894: DEBUG - 263680 ++ . /usr/share/yunohost/helpers.d/backend
2019-03-21 11:09:02,894: DEBUG - 263681 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:02,895: DEBUG - 263682 ++ '[' -r /usr/share/yunohost/helpers.d/filesystem ']'
2019-03-21 11:09:02,895: DEBUG - 263683 ++ . /usr/share/yunohost/helpers.d/filesystem
2019-03-21 11:09:02,896: DEBUG - 263684 +++ CAN_BIND=1
2019-03-21 11:09:02,897: DEBUG - 263684 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:02,897: DEBUG - 263685 ++ '[' -r /usr/share/yunohost/helpers.d/getopts ']'
2019-03-21 11:09:02,898: DEBUG - 263686 ++ . /usr/share/yunohost/helpers.d/getopts
2019-03-21 11:09:02,899: DEBUG - 263687 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:02,899: DEBUG - 263688 ++ '[' -r /usr/share/yunohost/helpers.d/ip ']'
2019-03-21 11:09:02,900: DEBUG - 263689 ++ . /usr/share/yunohost/helpers.d/ip
2019-03-21 11:09:03,202: DEBUG - 263991 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:03,204: DEBUG - 263993 ++ '[' -r /usr/share/yunohost/helpers.d/mysql ']'
2019-03-21 11:09:03,205: DEBUG - 263995 ++ . /usr/share/yunohost/helpers.d/mysql
2019-03-21 11:09:03,206: DEBUG - 263997 +++ MYSQL_ROOT_PWD_FILE=/etc/yunohost/mysql
2019-03-21 11:09:03,208: DEBUG - 263998 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:03,209: DEBUG - 263999 ++ '[' -r /usr/share/yunohost/helpers.d/network ']'
2019-03-21 11:09:03,210: DEBUG - 264001 ++ . /usr/share/yunohost/helpers.d/network
2019-03-21 11:09:03,211: DEBUG - 264002 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:03,212: DEBUG - 264003 ++ '[' -r /usr/share/yunohost/helpers.d/nodejs ']'
2019-03-21 11:09:03,214: DEBUG - 264005 ++ . /usr/share/yunohost/helpers.d/nodejs
2019-03-21 11:09:03,215: DEBUG - 264006 +++ n_install_dir=/opt/node_n
2019-03-21 11:09:03,216: DEBUG - 264008 +++ node_version_path=/opt/node_n/n/versions/node
2019-03-21 11:09:03,218: DEBUG - 264009 +++ export N_PREFIX=/opt/node_n
2019-03-21 11:09:03,219: DEBUG - 264010 +++ N_PREFIX=/opt/node_n
2019-03-21 11:09:03,220: DEBUG - 264013 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:03,221: DEBUG - 264014 ++ '[' -r /usr/share/yunohost/helpers.d/package ']'
2019-03-21 11:09:03,222: DEBUG - 264015 ++ . /usr/share/yunohost/helpers.d/package
2019-03-21 11:09:03,223: DEBUG - 264017 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:03,223: DEBUG - 264018 ++ '[' -r /usr/share/yunohost/helpers.d/print ']'
2019-03-21 11:09:03,224: DEBUG - 264019 ++ . /usr/share/yunohost/helpers.d/print
2019-03-21 11:09:03,325: DEBUG - 264122 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:03,326: DEBUG - 264123 ++ '[' -r /usr/share/yunohost/helpers.d/psql ']'
2019-03-21 11:09:03,327: DEBUG - 264124 ++ . /usr/share/yunohost/helpers.d/psql
2019-03-21 11:09:03,328: DEBUG - 264126 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:03,329: DEBUG - 264127 ++ '[' -r /usr/share/yunohost/helpers.d/setting ']'
2019-03-21 11:09:03,330: DEBUG - 264128 ++ . /usr/share/yunohost/helpers.d/setting
2019-03-21 11:09:03,331: DEBUG - 264130 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:03,332: DEBUG - 264131 ++ '[' -r /usr/share/yunohost/helpers.d/string ']'
2019-03-21 11:09:03,437: DEBUG - 264132 ++ . /usr/share/yunohost/helpers.d/string
2019-03-21 11:09:03,438: DEBUG - 264134 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:03,439: DEBUG - 264135 ++ '[' -r /usr/share/yunohost/helpers.d/system ']'
2019-03-21 11:09:03,441: DEBUG - 264136 ++ . /usr/share/yunohost/helpers.d/system
2019-03-21 11:09:03,442: DEBUG - 264238 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:03,443: DEBUG - 264240 ++ '[' -r /usr/share/yunohost/helpers.d/user ']'
2019-03-21 11:09:03,444: DEBUG - 264241 ++ . /usr/share/yunohost/helpers.d/user
2019-03-21 11:09:03,446: DEBUG - 264242 ++ for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)
2019-03-21 11:09:03,447: DEBUG - 264244 ++ '[' -r /usr/share/yunohost/helpers.d/utils ']'
2019-03-21 11:09:03,548: DEBUG - 264246 ++ . /usr/share/yunohost/helpers.d/utils
2019-03-21 11:09:03,549: DEBUG - 264247 + source ./psql.sh
2019-03-21 11:09:03,550: DEBUG - 264248 + source ./experimental_helper.sh
2019-03-21 11:09:03,551: DEBUG - 264249 + source ./_common.sh
2019-03-21 11:09:03,551: DEBUG - 264250 ++ dependances='coturn build-essential python3-dev libffi-dev python3-pip python3-setuptools sqlite3 libssl-dev python3-venv libxml2-dev libxslt1-dev python3-lxml libjpeg-dev libpq-dev postgresql acl'
2019-03-21 11:09:03,552: DEBUG - 264251 + app=synapse
2019-03-21 11:09:03,553: DEBUG - 264252 + synapse_user=matrix-synapse
2019-03-21 11:09:03,554: DEBUG - 264253 + synapse_db_name=matrix_synapse
2019-03-21 11:09:03,554: DEBUG - 264255 + synapse_db_user=matrix_synapse
2019-03-21 11:09:03,555: DEBUG - 264256 ++ ynh_app_upstream_version
2019-03-21 11:09:03,556: DEBUG - 264257 ++ manifest_path=../manifest.json
2019-03-21 11:09:03,556: DEBUG - 264258 ++ '[' '!' -e ../manifest.json ']'
2019-03-21 11:09:03,557: DEBUG - 264259 +++ ynh_read_manifest ../manifest.json version
2019-03-21 11:09:03,558: DEBUG - 264260 +++ manifest=../manifest.json
2019-03-21 11:09:03,559: DEBUG - 264260 +++ key=version
2019-03-21 11:09:03,559: DEBUG - 264261 +++ python3 -c 'import sys, json;print(json.load(open('\''../manifest.json'\'', encoding='\''utf-8'\''))['\''version'\''])'
2019-03-21 11:09:03,660: DEBUG - 264363 ++ version_key=0.34.0.1~ynh1
2019-03-21 11:09:03,762: DEBUG - 264465 ++ echo 0.34.0.1
2019-03-21 11:09:03,762: DEBUG - 264466 + upstream_version=0.34.0.1
2019-03-21 11:09:03,763: DEBUG - 264467 ++ ynh_app_setting_get synapse special_domain
2019-03-21 11:09:03,764: DEBUG - 264469 ++ sudo yunohost app setting synapse special_domain --output-as plain --quiet
2019-03-21 11:09:07,074: DEBUG - 267782 + domain=matrix.nicofrand.eu
2019-03-21 11:09:07,075: DEBUG - 267783 ++ ynh_app_setting_get synapse final_path
2019-03-21 11:09:07,076: DEBUG - 267784 ++ sudo yunohost app setting synapse final_path --output-as plain --quiet
2019-03-21 11:09:09,985: DEBUG - 270698 + final_path=/opt/yunohost/matrix-synapse
2019-03-21 11:09:09,986: DEBUG - 270699 ++ ynh_app_setting_get synapse synapse_tls_port
2019-03-21 11:09:09,986: DEBUG - 270701 ++ sudo yunohost app setting synapse synapse_tls_port --output-as plain --quiet
2019-03-21 11:09:12,994: DEBUG - 273711 + synapse_tls_port=8448
2019-03-21 11:09:12,995: DEBUG - 273712 ++ ynh_app_setting_get synapse turnserver_tls_port
2019-03-21 11:09:12,996: DEBUG - 273713 ++ sudo yunohost app setting synapse turnserver_tls_port --output-as plain --quiet
2019-03-21 11:09:16,005: DEBUG - 276721 + turnserver_tls_port=5349
2019-03-21 11:09:16,007: DEBUG - 276722 ++ ynh_app_setting_get synapse turnserver_alt_tls_port
2019-03-21 11:09:16,008: DEBUG - 276724 ++ sudo yunohost app setting synapse turnserver_alt_tls_port --output-as plain --quiet
2019-03-21 11:09:18,916: DEBUG - 279632 + turnserver_alt_tls_port=5350
2019-03-21 11:09:18,917: DEBUG - 279633 + ynh_remove_systemd_config matrix-synapse
2019-03-21 11:09:18,918: DEBUG - 279634 + local service_name=matrix-synapse
2019-03-21 11:09:18,919: DEBUG - 279635 + local finalsystemdconf=/etc/systemd/system/matrix-synapse.service
2019-03-21 11:09:18,920: DEBUG - 279637 + '[' -e /etc/systemd/system/matrix-synapse.service ']'
2019-03-21 11:09:18,921: DEBUG - 279638 + sudo systemctl stop matrix-synapse
2019-03-21 11:09:19,022: DEBUG - 279739 + sudo systemctl disable matrix-synapse
2019-03-21 11:09:19,425: DEBUG - 280141 + ynh_secure_remove /etc/systemd/system/matrix-synapse.service
2019-03-21 11:09:19,426: DEBUG - 280142 + local path_to_remove=/etc/systemd/system/matrix-synapse.service
2019-03-21 11:09:19,428: DEBUG - 280143 + local 'forbidden_path= 	/var/www 	/home/yunohost.app'
2019-03-21 11:09:19,429: DEBUG - 280144 + [[  	/var/www 	/home/yunohost.app =~ /etc/systemd/system/matrix-synapse\.service ]]
2019-03-21 11:09:19,430: DEBUG - 280145 + [[ /etc/systemd/system/matrix-synapse.service =~ ^/[[:alnum:]]+$ ]]
2019-03-21 11:09:19,431: DEBUG - 280146 + [[ e = \/ ]]
2019-03-21 11:09:19,432: DEBUG - 280147 + '[' -e /etc/systemd/system/matrix-synapse.service ']'
2019-03-21 11:09:19,433: DEBUG - 280148 + sudo rm -R /etc/systemd/system/matrix-synapse.service
2019-03-21 11:09:19,434: DEBUG - 280150 + sudo systemctl daemon-reload
2019-03-21 11:09:19,836: DEBUG - 280552 + ynh_remove_systemd_config coturn-synapse
2019-03-21 11:09:19,837: DEBUG - 280553 + local service_name=coturn-synapse
2019-03-21 11:09:19,837: DEBUG - 280554 + local finalsystemdconf=/etc/systemd/system/coturn-synapse.service
2019-03-21 11:09:19,838: DEBUG - 280555 + '[' -e /etc/systemd/system/coturn-synapse.service ']'
2019-03-21 11:09:19,839: DEBUG - 280556 + sudo systemctl stop coturn-synapse
2019-03-21 11:09:19,940: DEBUG - 280658 + sudo systemctl disable coturn-synapse
2019-03-21 11:09:20,249: DEBUG - 280960 + ynh_secure_remove /etc/systemd/system/coturn-synapse.service
2019-03-21 11:09:20,251: DEBUG - 280961 + local path_to_remove=/etc/systemd/system/coturn-synapse.service
2019-03-21 11:09:20,252: DEBUG - 280963 + local 'forbidden_path= 	/var/www 	/home/yunohost.app'
2019-03-21 11:09:20,254: DEBUG - 280964 + [[  	/var/www 	/home/yunohost.app =~ /etc/systemd/system/coturn-synapse\.service ]]
2019-03-21 11:09:20,255: DEBUG - 280965 + [[ /etc/systemd/system/coturn-synapse.service =~ ^/[[:alnum:]]+$ ]]
2019-03-21 11:09:20,256: DEBUG - 280966 + [[ e = \/ ]]
2019-03-21 11:09:20,257: DEBUG - 280968 + '[' -e /etc/systemd/system/coturn-synapse.service ']'
2019-03-21 11:09:20,258: DEBUG - 280969 + sudo rm -R /etc/systemd/system/coturn-synapse.service
2019-03-21 11:09:20,359: DEBUG - 281071 + sudo systemctl daemon-reload
2019-03-21 11:09:20,661: DEBUG - 281374 + closeport 8448
2019-03-21 11:09:20,662: DEBUG - 281375 + local port=8448
2019-03-21 11:09:20,663: DEBUG - 281376 + grep -q '\- 8448$'
2019-03-21 11:09:20,664: DEBUG - 281377 + yunohost firewall list
2019-03-21 11:09:23,571: DEBUG - 284284 + echo 'Close port 8448'
2019-03-21 11:09:23,572: DEBUG - 284285 Close port 8448
2019-03-21 11:09:23,573: DEBUG - 284286 + yunohost firewall disallow Both 8448
2019-03-21 11:09:26,381: WARNING - 287095 Port 8448 is already closed for IPv4 connections
2019-03-21 11:09:26,383: WARNING - 287096 Port 8448 is already closed for IPv6 connections
2019-03-21 11:09:39,928: DEBUG - 300636 + closeport 5349
2019-03-21 11:09:39,929: DEBUG - 300637 + local port=5349
2019-03-21 11:09:39,930: DEBUG - 300638 + yunohost firewall list
2019-03-21 11:09:39,931: DEBUG - 300639 + grep -q '\- 5349$'
2019-03-21 11:09:42,841: DEBUG - 303547 + echo 'Close port 5349'
2019-03-21 11:09:42,842: DEBUG - 303549 Close port 5349
2019-03-21 11:09:42,843: DEBUG - 303551 + yunohost firewall disallow Both 5349
2019-03-21 11:09:58,691: DEBUG - 319400 + closeport 5350
2019-03-21 11:09:58,692: DEBUG - 319401 + local port=5350
2019-03-21 11:09:58,693: DEBUG - 319402 + yunohost firewall list
2019-03-21 11:09:58,694: DEBUG - 319403 + grep -q '\- 5350$'
2019-03-21 11:10:01,904: DEBUG - 322613 + echo 'Close port 5350'
2019-03-21 11:10:01,905: DEBUG - 322615 Close port 5350
2019-03-21 11:10:01,906: DEBUG - 322616 + yunohost firewall disallow Both 5350
2019-03-21 11:10:20,461: DEBUG - 341169 + python3 /opt/yunohost/matrix-synapse/remove_sso_conf.py
2019-03-21 11:10:20,563: DEBUG - 341271 + ynh_remove_app_dependencies
2019-03-21 11:10:20,563: WARNING - 341273 python3: can't open file '/opt/yunohost/matrix-synapse/remove_sso_conf.py': [Errno 2] No such file or directory
2019-03-21 11:10:20,565: DEBUG - 341275 + local dep_app=synapse
2019-03-21 11:10:20,566: DEBUG - 341276 + ynh_package_autopurge synapse-ynh-deps
2019-03-21 11:10:20,567: DEBUG - 341278 + ynh_apt autoremove --purge synapse-ynh-deps
2019-03-21 11:10:20,568: DEBUG - 341280 + ynh_wait_dpkg_free
2019-03-21 11:10:20,569: DEBUG - 341282 + local try
2019-03-21 11:10:20,570: DEBUG - 341284 ++ seq 1 17
2019-03-21 11:10:20,571: DEBUG - 341286 + for try in `seq 1 17`
2019-03-21 11:10:20,572: DEBUG - 341286 + sudo lsof /var/lib/dpkg/lock
2019-03-21 11:10:21,275: DEBUG - 341990 + return 0
2019-03-21 11:10:21,276: DEBUG - 341991 + DEBIAN_FRONTEND=noninteractive
2019-03-21 11:10:21,277: DEBUG - 341992 + sudo apt-get -y autoremove --purge synapse-ynh-deps
2019-03-21 11:10:21,679: DEBUG - 342394 Reading package lists...
2019-03-21 11:10:22,181: DEBUG - 342897 Building dependency tree...
2019-03-21 11:10:22,183: DEBUG - 342898 Reading state information...
2019-03-21 11:10:23,086: DEBUG - 343802 The following packages will be REMOVED:
2019-03-21 11:10:23,087: DEBUG - 343803   coturn* libevent-core-2.0-5* libevent-extra-2.0-5* libevent-openssl-2.0-5*
2019-03-21 11:10:23,088: DEBUG - 343805   libevent-pthreads-2.0-5* postgresql* python3-bs4* python3-html5lib*
2019-03-21 11:10:23,088: DEBUG - 343806   python3-lxml* python3-webencodings* sqlite3* synapse-ynh-deps*
2019-03-21 11:10:26,600: DEBUG - 347317 0 upgraded, 0 newly installed, 12 to remove and 0 not upgraded.
2019-03-21 11:10:26,601: DEBUG - 347319 After this operation, 8,647 kB disk space will be freed.
2019-03-21 11:10:26,903: DEBUG - 347621 (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 120294 files and directories currently installed.)
2019-03-21 11:10:27,004: DEBUG - 347723 Removing synapse-ynh-deps (0.34.0.1~ynh1) ...
2019-03-21 11:10:27,406: DEBUG - 348125 Removing coturn (4.5.0.5-1+deb9u1) ...
2019-03-21 11:10:28,712: DEBUG - 349430 Removing libevent-pthreads-2.0-5:amd64 (2.0.21-stable-3) ...
2019-03-21 11:10:29,115: DEBUG - 349832 Removing libevent-openssl-2.0-5:amd64 (2.0.21-stable-3) ...
2019-03-21 11:10:29,617: DEBUG - 350334 Removing libevent-extra-2.0-5:amd64 (2.0.21-stable-3) ...
2019-03-21 11:10:30,019: DEBUG - 350737 Removing postgresql (9.6+181+deb9u2) ...
2019-03-21 11:10:30,421: DEBUG - 351139 Removing python3-bs4 (4.5.3-1) ...
2019-03-21 11:10:31,324: DEBUG - 352042 Removing python3-html5lib (0.999999999-1) ...
2019-03-21 11:10:32,227: DEBUG - 352945 Removing python3-lxml (3.7.1-1) ...
2019-03-21 11:10:33,131: DEBUG - 353849 Removing python3-webencodings (0.5-2) ...
2019-03-21 11:10:34,035: DEBUG - 354752 Removing sqlite3 (3.16.2-5+deb9u1) ...
2019-03-21 11:10:34,437: DEBUG - 355154 Removing libevent-core-2.0-5:amd64 (2.0.21-stable-3) ...
2019-03-21 11:10:35,040: DEBUG - 355758 Processing triggers for libc-bin (2.24-11+deb9u4) ...
2019-03-21 11:10:35,141: DEBUG - 355860 Processing triggers for man-db (2.7.6.1-2) ...
2019-03-21 11:10:37,349: DEBUG - 358067 (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 119988 files and directories currently installed.)
2019-03-21 11:10:37,350: DEBUG - 358069 Purging configuration files for coturn (4.5.0.5-1+deb9u1) ...
2019-03-21 11:10:39,257: DEBUG - 359974 Processing triggers for systemd (232-25+deb9u9) ...
2019-03-21 11:10:42,166: DEBUG - 362884 + ynh_secure_remove /opt/yunohost/matrix-synapse
2019-03-21 11:10:42,167: DEBUG - 362885 + local path_to_remove=/opt/yunohost/matrix-synapse
2019-03-21 11:10:42,168: DEBUG - 362886 + local 'forbidden_path= 	/var/www 	/home/yunohost.app'
2019-03-21 11:10:42,169: DEBUG - 362887 + [[  	/var/www 	/home/yunohost.app =~ /opt/yunohost/matrix-synapse ]]
2019-03-21 11:10:42,170: DEBUG - 362888 + [[ /opt/yunohost/matrix-synapse =~ ^/[[:alnum:]]+$ ]]
2019-03-21 11:10:42,171: DEBUG - 362889 + [[ e = \/ ]]
2019-03-21 11:10:42,172: DEBUG - 362890 + '[' -e /opt/yunohost/matrix-synapse ']'
2019-03-21 11:10:42,173: DEBUG - 362891 + sudo rm -R /opt/yunohost/matrix-synapse
2019-03-21 11:10:42,876: DEBUG - 363594 + ynh_secure_remove /var/lib/matrix-synapse
2019-03-21 11:10:42,877: WARNING - 363596 /var/lib/matrix-synapse wasn't deleted because it doesn't exist.
2019-03-21 11:10:42,879: DEBUG - 363598 + local path_to_remove=/var/lib/matrix-synapse
2019-03-21 11:10:42,880: DEBUG - 363599 + local 'forbidden_path= 	/var/www 	/home/yunohost.app'
2019-03-21 11:10:42,881: DEBUG - 363601 + [[  	/var/www 	/home/yunohost.app =~ /var/lib/matrix-synapse ]]
2019-03-21 11:10:42,882: DEBUG - 363602 + [[ /var/lib/matrix-synapse =~ ^/[[:alnum:]]+$ ]]
2019-03-21 11:10:42,882: DEBUG - 363603 + [[ e = \/ ]]
2019-03-21 11:10:42,883: DEBUG - 363604 + '[' -e /var/lib/matrix-synapse ']'
2019-03-21 11:10:42,884: DEBUG - 363605 + echo '/var/lib/matrix-synapse wasn'\''t deleted because it doesn'\''t exist.'
2019-03-21 11:10:42,885: DEBUG - 363606 + ynh_secure_remove /var/log/matrix-synapse
2019-03-21 11:10:42,885: DEBUG - 363607 + local path_to_remove=/var/log/matrix-synapse
2019-03-21 11:10:42,886: DEBUG - 363608 + local 'forbidden_path= 	/var/www 	/home/yunohost.app'
2019-03-21 11:10:42,887: DEBUG - 363609 + [[  	/var/www 	/home/yunohost.app =~ /var/log/matrix-synapse ]]
2019-03-21 11:10:42,888: DEBUG - 363610 + [[ /var/log/matrix-synapse =~ ^/[[:alnum:]]+$ ]]
2019-03-21 11:10:42,888: DEBUG - 363611 + [[ e = \/ ]]
2019-03-21 11:10:42,889: DEBUG - 363612 + '[' -e /var/log/matrix-synapse ']'
2019-03-21 11:10:42,890: DEBUG - 363613 + sudo rm -R /var/log/matrix-synapse
2019-03-21 11:10:42,890: DEBUG - 363615 + ynh_secure_remove /etc/matrix-synapse
2019-03-21 11:10:42,891: DEBUG - 363616 + local path_to_remove=/etc/matrix-synapse
2019-03-21 11:10:42,892: DEBUG - 363617 + local 'forbidden_path= 	/var/www 	/home/yunohost.app'
2019-03-21 11:10:42,892: DEBUG - 363618 + [[  	/var/www 	/home/yunohost.app =~ /etc/matrix-synapse ]]
2019-03-21 11:10:42,893: DEBUG - 363620 + [[ /etc/matrix-synapse =~ ^/[[:alnum:]]+$ ]]
2019-03-21 11:10:42,894: DEBUG - 363621 + [[ e = \/ ]]
2019-03-21 11:10:42,894: DEBUG - 363622 + '[' -e /etc/matrix-synapse ']'
2019-03-21 11:10:42,895: DEBUG - 363623 + sudo rm -R /etc/matrix-synapse
2019-03-21 11:10:42,996: DEBUG - 363724 + ynh_secure_remove /etc/default/matrix-synapse
2019-03-21 11:10:42,997: DEBUG - 363726 + local path_to_remove=/etc/default/matrix-synapse
2019-03-21 11:10:42,999: DEBUG - 363727 + local 'forbidden_path= 	/var/www 	/home/yunohost.app'
2019-03-21 11:10:43,000: DEBUG - 363729 + [[  	/var/www 	/home/yunohost.app =~ /etc/default/matrix-synapse ]]
2019-03-21 11:10:43,001: DEBUG - 363730 + [[ /etc/default/matrix-synapse =~ ^/[[:alnum:]]+$ ]]
2019-03-21 11:10:43,002: DEBUG - 363730 + [[ e = \/ ]]
2019-03-21 11:10:43,003: DEBUG - 363731 + '[' -e /etc/default/matrix-synapse ']'
2019-03-21 11:10:43,004: DEBUG - 363733 + sudo rm -R /etc/default/matrix-synapse
2019-03-21 11:10:43,006: DEBUG - 363734 + ynh_secure_remove /etc/default/coturn-synapse
2019-03-21 11:10:43,007: DEBUG - 363735 + local path_to_remove=/etc/default/coturn-synapse
2019-03-21 11:10:43,008: DEBUG - 363736 + local 'forbidden_path= 	/var/www 	/home/yunohost.app'
2019-03-21 11:10:43,009: DEBUG - 363737 + [[  	/var/www 	/home/yunohost.app =~ /etc/default/coturn-synapse ]]
2019-03-21 11:10:43,010: DEBUG - 363738 + [[ /etc/default/coturn-synapse =~ ^/[[:alnum:]]+$ ]]
2019-03-21 11:10:43,012: DEBUG - 363739 + [[ e = \/ ]]
2019-03-21 11:10:43,013: DEBUG - 363740 + '[' -e /etc/default/coturn-synapse ']'
2019-03-21 11:10:43,014: DEBUG - 363742 + sudo rm -R /etc/default/coturn-synapse
2019-03-21 11:10:43,115: DEBUG - 363843 + ynh_remove_nginx_config
2019-03-21 11:10:43,116: DEBUG - 363844 + ynh_secure_remove /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:10:43,118: DEBUG - 363845 + local path_to_remove=/etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:10:43,119: DEBUG - 363846 + local 'forbidden_path= 	/var/www 	/home/yunohost.app'
2019-03-21 11:10:43,121: DEBUG - 363847 + [[  	/var/www 	/home/yunohost.app =~ /etc/nginx/conf\.d/matrix\.nicofrand\.eu\.d/synapse\.conf ]]
2019-03-21 11:10:43,122: DEBUG - 363848 + [[ /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf =~ ^/[[:alnum:]]+$ ]]
2019-03-21 11:10:43,124: DEBUG - 363850 + [[ f = \/ ]]
2019-03-21 11:10:43,125: DEBUG - 363851 + '[' -e /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf ']'
2019-03-21 11:10:43,126: DEBUG - 363852 + sudo rm -R /etc/nginx/conf.d/matrix.nicofrand.eu.d/synapse.conf
2019-03-21 11:10:43,227: DEBUG - 363954 + sudo systemctl reload nginx
2019-03-21 11:10:43,830: DEBUG - 364556 + ynh_psql_remove_db matrix_synapse matrix_synapse
2019-03-21 11:10:43,831: DEBUG - 364558 + db=matrix_synapse
2019-03-21 11:10:43,831: DEBUG - 364559 + user=matrix_synapse
2019-03-21 11:10:43,832: DEBUG - 364562 + su '--command=dropdb "matrix_synapse"' postgres
2019-03-21 11:10:44,238: WARNING - 364964 could not change directory to "/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/settings/scripts": Permission denied
2019-03-21 11:10:44,340: DEBUG - 365069 + ynh_psql_drop_user matrix_synapse
2019-03-21 11:10:44,341: WARNING - 365071 dropdb: database removal failed: ERROR:  database "matrix_synapse" does not exist
2019-03-21 11:10:44,344: DEBUG - 365073 + user=matrix_synapse
2019-03-21 11:10:44,344: DEBUG - 365074 + su '--command=dropuser "matrix_synapse"' postgres
2019-03-21 11:10:44,647: WARNING - 365377 could not change directory to "/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/settings/scripts": Permission denied
2019-03-21 11:10:44,749: DEBUG - 365478 + ynh_system_user_delete matrix-synapse
2019-03-21 11:10:44,750: WARNING - 365480 dropuser: removal of role "matrix_synapse" failed: ERROR:  role "matrix_synapse" does not exist
2019-03-21 11:10:44,752: DEBUG - 365482 + ynh_system_user_exists matrix-synapse
2019-03-21 11:10:44,752: WARNING - 365483 Remove the user matrix-synapse
2019-03-21 11:10:44,754: DEBUG - 365484 + getent passwd matrix-synapse
2019-03-21 11:10:44,755: DEBUG - 365486 + echo 'Remove the user matrix-synapse'
2019-03-21 11:10:44,756: DEBUG - 365487 + sudo userdel matrix-synapse
2019-03-21 11:10:45,157: DEBUG - 365889 + ynh_remove_logrotate
2019-03-21 11:10:45,158: DEBUG - 365890 + '[' -e /etc/logrotate.d/synapse ']'
2019-03-21 11:10:45,159: DEBUG - 365891 + yunohost service remove matrix-synapse
2019-03-21 11:10:48,167: WARNING - 368899 Unknown service 'matrix-synapse'
2019-03-21 11:10:48,269: DEBUG - 369000 + yunohost service remove coturn-synapse
2019-03-21 11:10:51,277: DEBUG - 372024 The operation 'Remove 'synapse' after a failed restore from a backup archive' has failed! To get help, please share the full log of this operation using the command 'yunohost log display 20190321-100902-remove_on_failed_restore-synapse --share'
2019-03-21 11:10:51,278: WARNING - 372009 Unknown service 'coturn-synapse'
2019-03-21 11:10:51,280: DEBUG - 372070 action [17269.1] executed in 369.112s
2019-03-21 11:10:51,282: WARNING - 372022 synapse has not been properly removed
2019-03-21 11:10:51,284: WARNING - 372071 Nothing has been restored
2019-03-21 11:10:51,487: DEBUG - + ynh_die 'The app was restored to the way it was before the failed upgrade.'
2019-03-21 11:10:51,489: WARNING - The app was restored to the way it was before the failed upgrade.
2019-03-21 11:10:51,492: DEBUG - + echo 'The app was restored to the way it was before the failed upgrade.'
2019-03-21 11:10:51,493: DEBUG - + exit 1
2019-03-21 11:10:51,707: ERROR - Impossible de mettre à jour synapse

Many thanks for the update, I can't wait to see if that new synapse version fixes my current issue (timeouts when listing rooms on matrix.org mostly)!

Synapse button on homepage

Currently, Synapse has its own button on the homepage, that leads to /_matrix where you get an error since it's not meant to be accessed with a browser.
This is not preventing anything in daily use, but it may be cleaner to remove the button. I believe some users may be confused.
(Of course I would put a quite low priority on this...)

Upgrade fails, synapse no longer usable

Upgraded today, had the following error:

Warning: dh_install: Compatibility levels before 9 are deprecated (level 7 in use) Warning: dh_installdocs: Compatibility levels before 9 are deprecated (level 7 in use) Warning: dh_installdeb: Compatibility levels before 9 are deprecated (level 7 in use) Warning: E: Packages need to be removed but remove is disabled. Warning: /etc/init.d/matrix-synapse wasn't deleted because it doesn't exist. Warning: /lib/systemd/system/matrix-synapse.service wasn't deleted because it doesn't exist. Warning: /etc/systemd/system/matrix-synapse.service wasn't deleted because it doesn't exist. Warning: Created symlink from /etc/systemd/system/multi-user.target.wants/matrix-synapse.service to /etc/systemd/system/matrix-synapse.service. Warning: No passwd entry for user 'postgres' Warning: !! Warning: synapse's script has encountered an error. Its execution was cancelled. Warning: !! Warning: Error: Unable to upgrade synapse Error: No app to upgrade

Would I be correct to say that the install fails if postgre is not already installed?
Should it not be in the dependencies?

Upgrade to 0.25.1 failed, app removed, can't reinstall

Hi,

I've attempted upgrading to 0.25.1 and the upgrade failed after having performed quite some work.
Here is the log file from the upgrade (from the WebUI).
Apparently, the upgrade failed, then decided to remove the app completely, and failed at restoring a backup.
I then tried to reinstall the app from the menu but it failed again (also included in the log).

matrix-synapse_failed_install.log

Can't register an account: Cross-Origin Request Blocked

Hello! I installed synapse on my server, but when I try to create an account on it from riot.im web app, I get this error once the address is filled, and I press "next":

Unable to query for supported registration methods.

And in the web console:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://matrix.***.com/_matrix/client/r0/register. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)

And then, when I enter the credential and press enter, I get this from the web interface:

CORS request rejected: https://matrix.***.com/_matrix/client/r0/register

And the cross-origin error again in the web console.

Matrix-synapse service reports "active", but there are errors in the log:


2019-05-20 10:49:59,817 - twisted - 240 - ERROR - -     address
2019-05-20 10:49:59,818 - twisted - 240 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/twisted/internet/posixbase.py", line 495, in listenTCP
2019-05-20 10:49:59,819 - twisted - 240 - ERROR - -     p.startListening()
2019-05-20 10:49:59,819 - twisted - 240 - ERROR - -   File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/twisted/internet/tcp.py", line 1363, in startListening
2019-05-20 10:49:59,820 - twisted - 240 - ERROR - -     raise CannotListenError(self.interface, self.port, le)
2019-05-20 10:49:59,821 - twisted - 240 - ERROR - - twisted.internet.error.CannotListenError: Couldn't listen on ::1:8008: [Errno 99] Cannot assign requested address.
2019-05-20 10:49:59,825 - synapse.handlers.deactivate_account - 144 - INFO - user_parter_loop-0- User parter finished: stopping
2019-05-20 10:49:59,830 - synapse.handlers.presence - 240 - INFO - - Performing _on_shutdown. Persisting 0 unpersisted changes
2019-05-20 10:49:59,843 - synapse.handlers.presence - 248 - INFO - - Finished _on_shutdown
2019-05-20 10:49:59,844 - synapse.metrics - 372 - INFO - - Collecting gc 0
2019-05-20 10:49:59,974 - twisted - 240 - CRITICAL - - Unhandled error in Deferred:
2019-05-20 10:49:59,976 - twisted - 240 - CRITICAL - - 
Traceback (most recent call last):
  File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/twisted/internet/tcp.py", line 1361, in startListening
    skt.bind(addr)
OSError: [Errno 99] Cannot assign requested address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/_base.py", line 273, in start
    hs.start_listening(listeners)
  File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 259, in start_listening
    self._listener_http(config, listener)
  File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 153, in _listener_http
    reactor=self.get_reactor(),
  File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/_base.py", line 181, in listen_tcp
    check_bind_error(e, address, bind_addresses)
  File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/__init__.py", line 49, in check_bind_error
    raise e
  File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/_base.py", line 177, in listen_tcp
    address
  File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/twisted/internet/posixbase.py", line 495, in listenTCP
    p.startListening()
  File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/twisted/internet/tcp.py", line 1363, in startListening
    raise CannotListenError(self.interface, self.port, le)
twisted.internet.error.CannotListenError: Couldn't listen on ::1:8008: [Errno 99] Cannot assign requested address.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/homeserver.py", line 438, in start
    _base.start(hs, config.listeners)
  File "/opt/yunohost/matrix-synapse/lib/python3.5/site-packages/synapse/app/_base.py", line 282, in start
    sys.exit(1)
SystemExit: 1
2019-05-20 10:50:00,006 - twisted - 240 - INFO - - (TLS Port 8448 Closed)
2019-05-20 10:50:00,043 - twisted - 240 - INFO - - Main loop terminated.

And here is the app info:
info
Note the empty URL. Of course, I selected a subdomain during the installation: matrix.***.com, but somehow it is not reflected in the "URL" once the app is installed. The subdomain uses a Let's Encrypt cert, if that is of relevance.

I've also tried installing /master and /testing - nothing changed.

Warning sign on top

Hi
After a fresh install on Debian Stretch, I see a red warning sign on top on the riot saying could not connect to the integration server.
synapse_red_warning
Is this because of ports opening issue or related to something else?

Installation fails

Hi
New installation fails:

+ turnserver_pwd=PcVOlu06bhVRFUOq3Cz5FB1zMlhFa0
++ ynh_string_random 30
++ dd if=/dev/urandom bs=1 count=200
++ tr -c -d A-Za-z0-9
++ sed -n 's/\(.\{30\}\).*/\1/p'
+ synapse_db_pwd=5qYqjgRUpyUdPsHq3ItIKlfD4j3wQ6
+ ynh_app_setting_set synapse special_domain domain.tld
+ sudo yunohost app setting synapse special_domain -v domain.tld --quiet
+ ynh_app_setting_set synapse special_path /_matrix
+ sudo yunohost app setting synapse special_path -v /_matrix --quiet
+ ynh_app_setting_set synapse final_path /opt/yunohost/matrix-synapse
+ sudo yunohost app setting synapse final_path -v /opt/yunohost/matrix-synapse --quiet
+ ynh_app_setting_set synapse synapse_version 0.24.1
+ sudo yunohost app setting synapse synapse_version -v 0.24.1 --quiet
+ ynh_app_setting_set synapse synapse_db_pwd 5qYqjgRUpyUdPsHq3ItIKlfD4j3wQ6
+ sudo yunohost app setting synapse synapse_db_pwd -v 5qYqjgRUpyUdPsHq3ItIKlfD4j3wQ6 --quiet
+ ynh_app_setting_set synapse is_public 1
+ sudo yunohost app setting synapse is_public -v 1 --quiet
+ ynh_app_setting_set synapse synapse_port 8008
+ sudo yunohost app setting synapse synapse_port -v 8008 --quiet
+ ynh_app_setting_set synapse synapse_tls_port 8448
+ sudo yunohost app setting synapse synapse_tls_port -v 8448 --quiet
+ ynh_app_setting_set synapse turnserver_tls_port 5349
+ sudo yunohost app setting synapse turnserver_tls_port -v 5349 --quiet
+ ynh_app_setting_set synapse turnserver_pwd PcVOlu06bhVRFUOq3Cz5FB1zMlhFa0
+ sudo yunohost app setting synapse turnserver_pwd -v PcVOlu06bhVRFUOq3Cz5FB1zMlhFa0 --quiet
+ install_dependances
+ ynh_install_app_dependencies coturn build-essential python2.7-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libxml2-dev libxslt1-dev python-lxml libjpeg-dev libpq-dev postgresql
+ dependencies='coturn build-essential python2.7-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libxml2-dev libxslt1-dev python-lxml libjpeg-dev libpq-dev postgresql'
+ manifest_path=../manifest.json
+ '[' '!' -e ../manifest.json ']'
++ grep '\"version\": ' ../manifest.json
++ cut -d '"' -f 4
+ version=0.24.1
+ dep_app=synapse
+ ynh_package_is_installed synapse-ynh-deps
+ dpkg-query -W -f '${Status}' synapse-ynh-deps
+ grep -c 'ok installed'
+ cat
+ ynh_package_install_from_equivs /tmp/synapse-ynh-deps.control
+ controlfile=/tmp/synapse-ynh-deps.control
+ ynh_package_is_installed equivs
+ dpkg-query -W -f '${Status}' equivs
+ grep -c 'ok installed'
++ grep '^Package: ' /tmp/synapse-ynh-deps.control
++ cut '-d ' -f 2
+ pkgname=synapse-ynh-deps
++ grep '^Version: ' /tmp/synapse-ynh-deps.control
++ cut '-d ' -f 2
+ pkgversion=0.24.1
+ [[ -z synapse-ynh-deps ]]
+ [[ -z 0.24.1 ]]
+ ynh_package_update
+ ynh_apt update
+ DEBIAN_FRONTEND=noninteractive
+ sudo apt-get -y -qq update
++ mktemp -d
+ TMPDIR=/tmp/tmp.dfcaOfNOFT
+ cp /tmp/synapse-ynh-deps.control /tmp/tmp.dfcaOfNOFT/control
+ cd /tmp/tmp.dfcaOfNOFT
+ equivs-build ./control
+ sudo dpkg --force-depends -i ./synapse-ynh-deps_0.24.1_all.deb
Selecting previously unselected package synapse-ynh-deps.
(Reading database ... 50599 files and directories currently installed.)
Preparing to unpack .../synapse-ynh-deps_0.24.1_all.deb ...
Unpacking synapse-ynh-deps (0.24.1) ...
Setting up synapse-ynh-deps (0.24.1) ...
+ ynh_package_try_install -f
+ ynh_apt -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install -f
+ DEBIAN_FRONTEND=noninteractive
+ sudo apt-get -y -qq -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install -f
+ [[ -n /tmp/tmp.dfcaOfNOFT ]]
+ rm -rf /tmp/tmp.dfcaOfNOFT
+ ynh_package_is_installed synapse-ynh-deps
+ dpkg-query -W -f '${Status}' synapse-ynh-deps
+ grep -c 'ok installed'
+ rm /tmp/synapse-ynh-deps.control
+ ynh_app_setting_set synapse apt_dependencies coturn build-essential python2.7-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libxml2-dev libxslt1-dev python-lxml libjpeg-dev libpq-dev postgresql
+ sudo yunohost app setting synapse apt_dependencies -v coturn --quiet
+ pip install --upgrade pip
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages
+ pip install --upgrade virtualenv
Requirement already up-to-date: virtualenv in /usr/local/lib/python2.7/dist-packages
+ ynh_system_user_create matrix-synapse /var/lib/matrix-synapse
+ ynh_system_user_exists matrix-synapse
+ getent passwd matrix-synapse
+ '[' 2 -ge 2 ']'
+ user_home_dir='-d /var/lib/matrix-synapse'
+ sudo useradd -d /var/lib/matrix-synapse --system --user-group matrix-synapse --shell /usr/sbin/nologin
+ ynh_psql_create_user matrix_synapse 5qYqjgRUpyUdPsHq3ItIKlfD4j3wQ6
+ ynh_psql_execute_as_root 'CREATE USER matrix_synapse WITH PASSWORD '\''5qYqjgRUpyUdPsHq3ItIKlfD4j3wQ6'\'';'
+ sudo su -c psql - postgres
Warning: psql: could not connect to server: No such file or directory
Warning: 	Is the server running locally and accepting
Warning: 	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
+ ynh_exit_properly
Warning: !!
+ exit_code=2
Warning:   synapse's script has encountered an error. Its execution was cancelled.
+ '[' 2 -eq 0 ']'
+ trap '' EXIT
Warning: !!
+ set +eu
Warning: 
+ echo -e '!!\n  synapse'\''s script has encountered an error. Its execution was cancelled.\n!!'

Failed install

Hi !
I am running ynh on a raspberry pi 3.
I tried to install synapse but I'm getting the following errors and the process aborts…

E: Some index files failed to download. They have been ignored, or old ones used instead.

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie-backports/non-free/binary-armhf/Packages 404 Not Found [IP: 93.93.128.193 80]

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie-backports/contrib/binary-armhf/Packages 404 Not Found [IP: 93.93.128.193 80]

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie-backports/main/binary-armhf/Packages 404 Not Found [IP: 93.93.128.193 80]

Thanks for the help !

Share big file

Hello,

I installed synapse without any difficulty and it works almost perfectly well.
We can chat, voice/video call between members of our server and with members of matrix federation.
I changed max_upload_size: "10M" to max_upload_size: "100M" in
#nano /etc/matrix-synapse/homeserver.yaml
Since that, we can exchange big file up to 100M between members of our server (YES!) and we can also receive these files from members of Federation (YES!).
However, if one of the member of our server wants to send a big file (up to 100M), members of federation can't receive it (I tried only with members of matrix.org).
They see the file, they can click on it but the downloading process stops (does it even start?, I'm not 100% sure but I think it does because I can see a jump in transfer traffic from my yunohost server).
They always got, after some second (6-8s), the following message {"errcode":"M_UNKNOWN","error":"timeout"}
What can I do to solve that problem?

Thank you in advance,
Thatoo

Add an action/option to configure registration

Right now to allow or disallow non-yunohost users to register (aka public registration), admins need to edit /etc/yunohost/apps/synapse/settings.yml and change is_public value.

Also "is_public" option is confusing : #108 and https://forum.yunohost.org/t/how-to-set-synapse-to-enable-registration-false/6863

It would be nice to add app actions/app config panel (as implemented in Yunohost 3.1 https://forum.yunohost.org/t/yunohost-3-1-minor-stable-release-version-stable-mineure/5445) to ease that process, and expose it thought the command line and admin interface.

Installation fail: synapse-ynh-deps doesn't install correctly

I encounter this issue when trying to install.
(note: when I did it ~ a month ago, it was working fine on my system)

mktemp -d
TMPDIR=/tmp/tmp.r6aiJY0BgP
cp /tmp/synapse-ynh-deps.control /tmp/tmp.r6aiJY0BgP/control
cd /tmp/tmp.r6aiJY0BgP
equivs-build ./control
sudo dpkg --force-depends -i ./synapse-ynh-deps_0.22.0_all.deb
dpkg : erreur fatale irréversible, abandon :
utilisateur « matrix-synapse » inconnu dans le fichier des permissions (« statoverride »)
[[ -n /tmp/tmp.r6oiJY0wgP ]]
rm -rf /tmp/tmp.r6oiJY0wgP
ynh_package_is_installed synapse-ynh-deps
grep -c 'ok installed'
dpkg-query -W -f '${Status}' synapse-ynh-deps
ynh_die 'Unable to install dependencies'
echo 'Unable to install dependencies'
exit 1
Attention : Unable to install dependencies

SEC_ERROR_REUSED_ISSUER_AND_SERIAL

Hi need help

i did a install and a uninstll because i didn´t activat the option "Public server"
I install it again and now i get th error " SEC_ERROR_REUSED_ISSUER_AND_SERIAL"
how do i get a new certificate just for the server?
thanks

IRC bridge to geeknode

Hello,

I would like to create an irc bridge with a room on geeknode network. If I click on irc bridge, the list doesn't include geeknode. There is Freenode, moznet...
I think I understood that I need to modify matrix-appservice-irc/config.yaml fileto add geeknode.
I can't find this file. I don't know where the folder matrix-appservice-irc is in yunohost synapse installation.

Thank you for help,

Upgrade to 0.23 failed, app lost

I tried to upgrade to 0.23, uploaded 3 days ago.

The backup failed, then the install failed.
So there was no backup to resume and it ended up removing pretty much everything...

Command used:

sudo yunohost app upgrade synapse -u https://github.com/YunoHost-Apps/synapse_ynh

Output:

Warning: could not change directory to "/home/yunohost.backup/tmp/synapse-pre-upgrade1/apps/synapse/backup": Permission denied
Warning: Job for matrix-synapse.service failed. See 'systemctl status matrix-synapse.service' and 'journalctl -xn' for details.
Warning: !!
Warning:   synapse's script has encountered an error. Its execution was cancelled.
Warning: !!
Warning: Upgrade failed.
Warning: Removed symlink /etc/systemd/system/multi-user.target.wants/matrix-synapse.service.
Warning: Remove the user matrix-synapse
Warning: Mounting the backup archive failed
Warning: Generating DH parameters, 2048 bit long safe prime, generator 2
Warning: This is going to take a long time
Warning: .................................................................+...............................................+.................................+...................................................................................................................................................................................................+.............................................................................................................................................................................................................................+...................................................................................+.............................................................+..............................+..+.................................................................................................................................+...............................................................................................................................................................................+......................................................................................................................................................................................+....................................................................................................................................................................................................................................+..................+.......+............................................................................................................................................+..............................................................................+.........................................................................+.....+..................................................................+...............................................................................................................................................................+....................................................................................................+..................................................................................................................................................................+.........................................................................................++*++*
Warning: dh_install: Compatibility levels before 9 are deprecated (level 7 in use)
Warning: dh_installdocs: Compatibility levels before 9 are deprecated (level 7 in use)
Warning: dh_installdeb: Compatibility levels before 9 are deprecated (level 7 in use)
Warning: cp: cannot stat ‘../conf/virtualenv_activate’: No such file or directory
Warning: !!
Warning:   synapse's script has encountered an error. Its execution was cancelled.
Warning: !!
Warning:
Warning: Unable to restore the app 'synapse'
Warning: Failed to stop matrix-synapse.service: Unit matrix-synapse.service not loaded.
Warning: /etc/nginx/conf.d/chtisurel.net.d/synapse.conf wasn't deleted because it doesn't exist.
Warning: python: can't open file '/opt/yunohost/matrix-synapse/remove_sso_conf.py': [Errno 2] No such file or directory
Warning: /etc/default/matrix-synapse wasn't deleted because it doesn't exist.
Warning: /etc/systemd/system/matrix-synapse.service wasn't deleted because it doesn't exist.
Warning: dropdb: database removal failed: ERROR:  database "matrix_synapse" does not exist
Warning: dropuser: removal of role "matrix_synapse" failed: ERROR:  role "matrix_synapse" does not exist
Warning: Remove the user matrix-synapse
Warning: Unknown service 'matrix-synapse'
Warning: Nothing has been restored
Warning: The app was restored to the way it was before the failed upgrade.
Error: Unable to upgrade synapse
Error: No app to upgrade

I have a recent backup in case of, but since last time I made things more complicated by "trying stuff", I prefer not touch anything until advised.

Fresh Install Fails: "cannot import name _OpenSSLECCurve"

I'm currently evaluating migrating my self hosting solutions over to Yunohost and after a fresh install on Digital Ocean, I cannot install the Synapse application.

I'm using Digital Ocean's Debian 8.10 x64 image as a base and I followed the instructions to install manually.

I've repeated this a couple of times and found the same result.

Here is the output from attempting to install from the command line.

$ sudo yunohost app install synapse
Available domains:
- ***.***.***
Choose a domain for Synapse (default: ***.***.***):
Is it a public server ? [0 | 1] (default: 0):
Warning: Generating DH parameters, 2048 bit long safe prime, generator 2
Warning: This is going to take a long time
Warning: .......................+.......................+................................+....+.............................................................................................................
.+..........................................................................................+............................................................................................+..................
....+............................................................+...................................................................................+......................................................
.................................................................................................................................+.........+................................................................
............................................................................................................................................................................................................
................................................................................+........................................................................................................++*++*
Extracting templates from packages: 100%
Warning: Synchronizing state for postgresql.service with sysvinit using update-rc.d...
Warning: Executing /usr/sbin/update-rc.d postgresql defaults
Warning: Executing /usr/sbin/update-rc.d postgresql enable
Warning: 2018-05-24 07:01:51 URL:https://codeload.github.com/matrix-org/synapse/tar.gz/v0.27.2 [932894] -> "synapse_source.tar.gz" [1]
Warning: Created symlink from /etc/systemd/system/multi-user.target.wants/matrix-synapse.service to /etc/systemd/system/matrix-synapse.service.
Warning: Created symlink from /etc/systemd/system/multi-user.target.wants/coturn-synapse.service to /etc/systemd/system/coturn-synapse.service.
Warning: Starting of matrix-synapse
Warning: Job for matrix-synapse.service failed. See 'systemctl status matrix-synapse.service' and 'journalctl -xn' for details.
Warning: !!
Warning:   synapse's script has encountered an error. Its execution was cancelled.
Warning: !!
Warning:
Warning: Removed symlink /etc/systemd/system/multi-user.target.wants/matrix-synapse.service.
Warning: Removed symlink /etc/systemd/system/multi-user.target.wants/coturn-synapse.service.
Warning: Port 8448 is already closed for IPv4 connections
Warning: Port 8448 is already closed for IPv6 connections
Warning: Remove the user matrix-synapse
Success! The SSOwat configuration has been generated
Error: Installation failed

It fails to start the matrix-synapse.service via Systemd and aborts the install. When I check the logs via journalctl I see this:

$ sudo journalctl -u matrix-synapse.service
-- Logs begin at Thu 2018-05-24 06:51:47 UTC, end at Thu 2018-05-24 07:04:27 UTC. --
May 24 07:02:49 test.neokitsune.com systemd[1]: Starting Synapse Matrix homeserver...
May 24 07:02:49 test.neokitsune.com python[11550]: Traceback (most recent call last):
May 24 07:02:49 test.neokitsune.com python[11550]: File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
May 24 07:02:49 test.neokitsune.com python[11550]: "__main__", fname, loader, pkg_name)
May 24 07:02:49 test.neokitsune.com python[11550]: File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
May 24 07:02:49 test.neokitsune.com python[11550]: exec code in run_globals
May 24 07:02:49 test.neokitsune.com python[11550]: File "/opt/yunohost/matrix-synapse/lib/python2.7/site-packages/synapse/app/homeserver.py", line 31, in <module>
May 24 07:02:49 test.neokitsune.com python[11550]: from synapse.crypto import context_factory
May 24 07:02:49 test.neokitsune.com python[11550]: File "/opt/yunohost/matrix-synapse/local/lib/python2.7/site-packages/synapse/crypto/context_factory.py", line 17, in <module>
May 24 07:02:49 test.neokitsune.com python[11550]: from twisted.internet._sslverify import _OpenSSLECCurve, _defaultCurveName
May 24 07:02:49 test.neokitsune.com python[11550]: ImportError: cannot import name _OpenSSLECCurve
May 24 07:02:49 test.neokitsune.com systemd[1]: matrix-synapse.service: control process exited, code=exited status=1
May 24 07:02:49 test.neokitsune.com systemd[1]: Failed to start Synapse Matrix homeserver.
May 24 07:02:49 test.neokitsune.com systemd[1]: Unit matrix-synapse.service entered failed state.
May 24 07:02:50 test.neokitsune.com systemd[1]: Stopping Synapse Matrix homeserver...
May 24 07:02:50 test.neokitsune.com systemd[1]: Stopped Synapse Matrix homeserver.

The key error here appears to be: cannot import name _OpenSSLECCurve

The image are public?

Hi
The image I add to the rooms can be seen by public(without authentication) when the link to the image is copied and pasted in the browser.

Is this default behavior? If yes how can I restrict the image to encrypted for the public?

CI failed

Hi Josue-T (again)

Synapse encountered a strange error in those tests.
Here is a part of the log:

2017-03-03 06:20:29,465 INFO     yunohost.hook <lambda> - [903.1] + NO_LOG FIND_PORT 8448
2017-03-03 06:20:29,465 INFO     yunohost.hook <lambda> - [903.1] + ynh_cli_log=/var/log/yunohost/yunohost-cli.log
2017-03-03 06:20:29,465 INFO     yunohost.hook <lambda> - [903.1] + sudo cp -a /var/log/yunohost/yunohost-cli.log /var/log/yunohost/yunohost-cli.log-move
2017-03-03 06:20:31,070 INFO     moulinette.actionsmap process - processing action [971.1]: yunohost.firewall.allow
2017-03-03 06:20:31,341 WARNING  yunohost.firewall firewall_reload - [971.1] You cannot play with ip6tables here. You are either in a container or your kernel does not support it
2017-03-03 06:20:38,682 SUCCESS  yunohost.firewall success - [971.1] The firewall has been reloaded
2017-03-03 06:20:39,029 INFO     moulinette.actionsmap process - processing action [1142.1]: yunohost.firewall.allow
2017-03-03 06:20:39,274 WARNING  yunohost.firewall firewall_reload - [1142.1] You cannot play with ip6tables here. You are either in a container or your kernel does not support it
2017-03-03 06:20:45,985 SUCCESS  yunohost.firewall success - [1142.1] The firewall has been reloaded
2017-03-03 06:20:51,767 INFO     moulinette.actionsmap process - processing action [1322.1]: yunohost.app.setting
2017-03-03 06:20:52,152 INFO     moulinette.actionsmap process - processing action [1324.1]: yunohost.app.setting
2017-03-03 06:20:52,524 INFO     moulinette.actionsmap process - processing action [1326.1]: yunohost.app.setting
2017-03-03 06:20:52,899 INFO     moulinette.actionsmap process - processing action [1328.1]: yunohost.app.setting
2017-03-03 06:20:53,274 INFO     moulinette.actionsmap process - processing action [1330.1]: yunohost.app.setting
2017-03-03 06:20:53,649 INFO     moulinette.actionsmap process - processing action [1332.1]: yunohost.app.setting
2017-03-03 06:20:54,022 INFO     moulinette.actionsmap process - processing action [1334.1]: yunohost.app.setting
2017-03-03 06:21:03,337 INFO     moulinette.actionsmap process - processing action [2051.1]: yunohost.app.setting
2017-03-03 06:21:03,719 INFO     moulinette.actionsmap process - processing action [2054.1]: yunohost.app.setting
2017-03-03 06:21:04,092 INFO     moulinette.actionsmap process - processing action [2057.1]: yunohost.app.setting
2017-03-03 06:21:04,098 INFO     yunohost.app app_setting - [2057.1] cannot get app setting 'turnserver_port' for 'synapse'

During the opening of this port, it seems you have a error.
But, with the NO_LOG function, we can see what it is.

Maybe you can perform a real test on a virtual machine.

502 Bad Gateway error

The server was working fine, but suddenly it stopped and I am unable to start matrix-synapse.

systemctl status matrix-synapse.service
● matrix-synapse.service - Synapse Matrix homeserver
   Loaded: loaded (/lib/systemd/system/matrix-synapse.service; enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2017-03-29 19:18:10 UTC; 422ms ago
  Process: 21090 ExecStart=/usr/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ (code=exited, status=0/SUCCESS)
  Process: 12873 ExecStartPre=/usr/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --generate-keys (code=exited, status=1/FAILURE)
 Main PID: 21090 (code=exited, status=0/SUCCESS)

Mar 29 19:18:10 server systemd[1]: matrix-synapse.service: control process exited, code=exited status=1
Mar 29 19:18:10 server systemd[1]: Failed to start Synapse Matrix homeserver.
Mar 29 19:18:10 server systemd[1]: Unit matrix-synapse.service entered failed state.

Maybe its similar issue: matrix-org/synapse#843 (comment)

Upgrade fails

The latest commit makes the upgrade fail with:
Warning: Job for matrix-synapse.service failed. See 'systemctl status matrix-synapse.service' and 'journalctl -xn' for details.
Warning: !!
Warning: synapse's script has encountered an error. Its execution was cancelled.
Warning: !!
ynh_exit_properly

systemctl status matrix-synapse.service log:

Jan 07 02:50:28 datamol.org python[18264]: module = __import__(module_name)
Jan 07 02:50:28 datamol.org python[18264]: ImportError: No module named msgpack
Jan 07 02:50:28 datamol.org python[18264]: Missing Requirement: Can't import 'msgpack' which is part of 'msgpack-python>=0.3.0'
Jan 07 02:50:28 datamol.org python[18264]: To install run:
Jan 07 02:50:28 datamol.org python[18264]: pip install --upgrade --force "msgpack-python>=0.3.0"
Jan 07 02:50:28 datamol.org systemd[1]: matrix-synapse.service: control process exited, code=exited status=1
Jan 07 02:50:28 datamol.org systemd[1]: Failed to start Synapse Matrix homeserver.
Jan 07 02:50:28 datamol.org systemd[1]: Unit matrix-synapse.service entered failed state.
Jan 07 02:50:29 datamol.org systemd[1]: Stopping Synapse Matrix homeserver...
Jan 07 02:50:29 datamol.org systemd[1]: Stopped Synapse Matrix homeserver.

For security, this session has been signed out. Please sign in again.

For a user I get For security, this session has been signed out. Please sign in again.
Here is the log:

Chrome/53.0.2785.143 Safari/537.36"
2017-04-12 21:16:41,994 - synapse.access.http.8008 - 59 - INFO - POST-212- 185.xx.xx.xx - 8008 - Received request: POST /_matrix/client/r0/logout?access_token=<redacted>
2017-04-12 21:16:41,999 - synapse.access.http.8008 - 91 - INFO - POST-212- 185.xx.xx.xx - 8008 - {None} Processed request: 5ms (0ms, 0ms) (3ms/1) 22B 200 "POST /_matrix/client/r0/logout?access_token=<redacted> HTTP/1.0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/53.0.2785.143 Chrome/53.0.2785.143 Safari/537.36"
2017-04-12 21:16:42,022 - synapse.access.http.8008 - 59 - INFO - POST-213- 185.xx.xx.xx - 8008 - Received request: POST /_matrix/client/r0/logout?access_token=<redacted>
2017-04-12 21:16:42,024 - synapse.http.server - 123 - INFO - POST-213- <XForwardedForRequest at 0x7f88dc3eb8c0 method=POST uri=/_matrix/client/r0/logout?access_token=<redacted> clientproto=HTTP/1.0 site=8008> SynapseError: 404 - No row found
2017-04-12 21:16:42,024 - synapse.access.http.8008 - 91 - INFO - POST-213- 185.xx.xx.xx - 8008 - {None} Processed request: 1ms (0ms, 0ms) (0ms/1) 62B 404 "POST /_matrix/client/r0/logout?access_token=<redacted> HTTP/1.0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/53.0.2785.143 Chrome/53.0.2785.143 Safari/537.36"
2017-04-12 21:16:42,057 - synapse.access.http.8008 - 59 - INFO - PUT-214- 185.xx.xx.xx - 8008 - Received request: PUT /_matrix/client/r0/presence/%40user%3Adomian.tld/status?access_token=<redacted>
2017-04-12 21:16:42,060 - synapse.api.auth - 449 - WARNING - PUT-214- Unrecognised access token - not in store: MDAxOGxvY2F0aW9uIGFsbHRhbGsudGsKMDAxM2lkZW50aWZpZXIga2V5CjAwMTBjaWQgZ2VuID0gMQowMDITphbGx0YWxrLnRrCjAwMTZjaWQgdHlwZSA9IGFjY2VzcwowMDIxY2lkIG5vbmNlID0gdzlxRnBvYzdCTUptVmc5aQowMDJmc2lnbmF0dXJlIMVS3dZ9PNdfC1b4Wqni1w45d1AI3Q0Wgf8yCDH9KlGuCg
2017-04-12 21:16:42,061 - synapse.http.server - 123 - INFO - PUT-214- <XForwardedForRequest at 0x7f88ddb03680 method=PUT uri=/_matrix/client/r0/presence/%40user%3Adomian.tld/status?access_token=<redacted> clientproto=HTTP/1.0 site=8008> SynapseError: 403 - Unrecognised access token.
2017-04-12 21:16:42,062 - synapse.access.http.8008 - 91 - INFO - PUT-214- 185.xx.xx.xx - 8008 - {None} Processed request: 4ms (0ms, 0ms) (0ms/0) 82B 403 "PUT /_matrix/client/r0/presence/%40user%3Adomian.tld/status?access_token=<redacted> HTTP/1.0" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/53.0.2785.143 Chrome/53.0.2785.143 Safari/537.36"
2017-04-12 21:16:42,062 - synapse.metrics - 162 - INFO - - Collecting gc 0
2017-04-12 21:16:42,100 - synapse.access.http.8008 - 59 - INFO - POST-215- 185.xx.xx.xx - 8008 - Received request: POST /_matrix/client/r0/logout?access_token=<redacted>

Log rotation does not work as intended in logrotate configuration

In log.yaml, synapse is configured to rotate the homeserver.log file, generating 10 files of 100M each (no compression).

logrotate is configured to cut above 100M, compress, and keep 12 files.

As synapse does the job (badly), logrotate does nothing and we get 1G of uncompressed log files.

Fix: configure synapse to log without rotation (class: logging.FileHandler) to let logrotate do the job.


version: 1

formatters:
  precise:
   format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s- %(message)s'

filters:
  context:
    (): synapse.util.logcontext.LoggingContextFilter
    request: ""

handlers:
  file:
    class: logging.FileHandler
    formatter: precise
    filename: /var/log/matrix-synapse/homeserver.log
    filters: [context]
    level: INFO
  console:
    class: logging.StreamHandler
    formatter: precise
    level: WARN

loggers:
    synapse:
        level: INFO

    synapse.storage.SQL:
        level: INFO

root:
    level: INFO
    handlers: [file, console]

Cannot login with older android device

I know this is quite an edge case, and I would understand it's not a priority at all for ynh to handle this kind of issues, but maybe.
I have the problem described in this issue reported on the riot.im repo.
The problem seem to be that the device I'm trying to connect with has an old android version (but yes the idea is not to need to buy new devices and reuse hardware that's still working fine :)).
I didn't find a solution on the device's side, but some comments made me think there is a server side solution that would allow those older devices to function. From what I understand, it means allowing support for TLS 1.0 (I tested my YNH server and it seem to only support TLS 1.2 at the moment).

But the thread is also mentioning that maybe supporting older version wouldn't be good security-wise.

I don't have the competence to judge if that could be something that the ynh synapse app could achieve or if it requires some deeper ynh core changes to change the nginx config. Nor do I know if it's good to try to support that.
I mention it here, because I think it would be nice for people who use older devices to be able to use matrix through a ynh synapse server :-)

Admin User set During Installation

The admin user should be set during install. Forcing users to have to run the series of commands in the README is unorthodox and problematic.

This should be as simple as setting the option in the manifest and then running the command from the README with the info.

How to backup and reinstall synapse due to synapse issue

Hi,

I currently have a Synapse issue (everything works great except that nobody receive my messages but I have no error message...). The synapse community says that I can reinstall synapse to see if it can help.

So I am trying to do it but it doesn't seem to work.

What I did:

$ sudo yunohost backup create --apps synapse

Attention : could not change directory to "/home/yunohost.backup/tmp/20181004-101430/apps/synapse/backup": Permission non accordée

Succès ! Sauvegarde terminée
name: 20181004-101430
results:
  apps:
    synapse: Success
  system:
size: 511087167
$ sudo yunohost backup restore /home/yunohost.backup/archives/20181004-101430 --apps synapse

Erreur : L'archive locale de sauvegarde nommée « /home/yunohost.backup/archives/20181004-101430 » est inconnue

Thank you!

Error with the turnserver user

Hi

I have a problem when I upgrade synapse

The turnserver user is not created and I get this error

+ for dirname in '$file_to_set'
+ [[ -n yunohost ]]
+ test -f /etc/yunohost
+ path_to_set=/etc/yunohost
++ sudo -u turnserver test '!' -r /etc/yunohost
Warning: sudo: unknown user: turnserver
Warning: sudo: unable to initialize policy plugin

Thanks for your answers

[suggestion] Disable database backup when doing an upgrade

Each time I upgrade synapse on Yunohost, it takes a huge amount of time because of the database backup it makes just before the upgrade attempt.

However, as far as I know, upgrading synapse never alters the database, it only alters configuration files and synapse installation itself, right?

Therefore, I would suggest to find a way to disable entirely the database backup during the pre-upgrade backup, if that possible.

Your application has been elected to become official !

Hi,

The YunoHost Community has decided, and your app has been selected to become an official app \o/

Nevertheless, we need your approval since you're the maintainer of this app.

Adding your app in the official list comes with some rules.

  • All commits should be done on a new branch, then merge in the testing branch by a Pull Request validated by the apps group, following the standard reviewing rules.
  • Before merging in the master branch, the testing branch have to be tested by the community at least during 7 days without modifications.
  • Your app has to be maintain up to date, and follow the evolutions of packaging rules.
  • And you have to accept that, if necessary, members of apps group can merge pull request or make commit on your app.

No confirmation from you in the following 2 weeks means that you disagree with the decision of the community and another application will join the official group.

Thanks,
The Apps Group

cant upgrade

Can´t log in to matrix with my yunohot – the matrix-synapse is not running

If I look in yunohost under services – first it says martix-synapse is “acitve” but if I look up for details it shows “activating”

if I click on Log it does not show anything

I´m Unable to upgrade synapse by

yunohost app install https://github.com/YunoHost-Apps/synapse_ynh/

please look at the error log

https://paste.yunohost.org/raw/ajetuvipev 1

if I try:

yunohost app upgrade synapse -u https://github.com/YunoHost-Apps/synapse_ynh/tree/testing

I get this:

https://paste.yunohost.org/raw/gujafuweli

I´m on YunoHost 3.5.2.2 (stable).

Thanks for help

Installation failed on fresh Debian 8 (jessie)

Hi!

Just tried to install Synapse on a freshly spawned Debian 8 server, with a just as new Yunoshost.
Looking at the log, it rolls back towards the end of the install, and systemctl status matrix-synapse.service gives me the following stacktrace:

May 15 14:39:44 my.yuno.instance.tld systemd[1]: Starting Synapse Matrix homeserver...
May 15 14:39:44 my.yuno.instance.tld python[14364]: Traceback (most recent call last):
May 15 14:39:44 my.yuno.instance.tld python[14364]: File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
May 15 14:39:44 my.yuno.instance.tld python[14364]: "__main__", fname, loader, pkg_name)
May 15 14:39:44 my.yuno.instance.tld python[14364]: File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
May 15 14:39:44 my.yuno.instance.tld python[14364]: exec code in run_globals
May 15 14:39:44 my.yuno.instance.tld python[14364]: File "/opt/yunohost/matrix-synapse/lib/python2.7/site-packages/synapse/app/homeserver.py", line 31, in <module>
May 15 14:39:44 my.yuno.instance.tld python[14364]: from synapse.crypto import context_factory
May 15 14:39:44 my.yuno.instance.tld python[14364]: File "/opt/yunohost/matrix-synapse/local/lib/python2.7/site-packages/synapse/crypto/context_factory.py", line 17, in <module>
May 15 14:39:44 my.yuno.instance.tld python[14364]: from twisted.internet._sslverify import _OpenSSLECCurve, _defaultCurveName
May 15 14:39:44 my.yuno.instance.tld python[14364]: ImportError: cannot import name _OpenSSLECCurve
May 15 14:39:44 my.yuno.instance.tld systemd[1]: matrix-synapse.service: control process exited, code=exited status=1
May 15 14:39:44 my.yuno.instance.tld systemd[1]: Failed to start Synapse Matrix homeserver.

Any idea?

Integration level 8 - Congratulation

I have no idea if that has been done before but tonight I want to open an issue to congratulate @Josue-T and all contributors for their work.
Indeed, synapse package is one of the very rare package to have reach to the Yunohost Integration level 8.
🥇

So congrats and thank you!

You can close the issue any time you want 😉

Unable to access the fedration

Hi
I tired to access the federation.
I have set the SRV according to the description in the package readme. But I can not access the other matrix network.

Update fails

The update fails with :

The SSOwat configuration has been generated
+ sudo service nginx reload
+ sudo service matrix-synapse restart
Warning: Job for matrix-synapse.service failed. See 'systemctl status matrix-synapse.service' and 'journalctl -xn' for details.
Error: Unable to upgrade synapse
Error: No app to upgrade
ournalctl -xn
-- Logs begin at Mon 2017-03-27 23:44:55 IST, end at Mon 2017-07-24 02:14:16 IST
Jul 24 02:14:11 domain.org python[29546]: with open(tls_dh_params_path, "w") as
Jul 24 02:14:11 domain.org python[29546]: IOError: [Errno 13] Permission denied
Jul 24 02:14:11 domain.org systemd[1]: matrix-synapse.service: control process 
Jul 24 02:14:11 domain.org systemd[1]: Failed to start Synapse Matrix homeserve
-- Subject: Unit matrix-synapse.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit matrix-synapse.service has failed.
-- 
-- The result is failed.
Jul 24 02:14:11 domain.org systemd[1]: Unit matrix-synapse.service entered fail
Jul 24 02:14:15 domain.org systemd[1]: matrix-synapse.service holdoff time over
Jul 24 02:14:15 domain.org systemd[1]: Stopping Synapse Matrix homeserver...
-- Subject: Unit matrix-synapse.service has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit matrix-synapse.service has begun shutting down.
Jul 24 02:14:15 domain.org systemd[1]: Starting Synapse Matrix homeserver...
-- Subject: Unit matrix-synapse.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit matrix-synapse.service has begun starting up.
Jul 24 02:14:16 domain.org postfix/smtpd[28561]: Anonymous TLS connection estab
Jul 24 02:14:16 domain.org rmilter[29064]: <227237d7b1>; accepted connection fr

root@domain:~# service nginx restart 
root@domain:~# service matrix-synapse restart
Job for matrix-synapse.service failed. See 'systemctl status matrix-synapse.service' and 'journalctl -xn' for details.
systemctl status matrix-synapse.service
● matrix-synapse.service - Synapse Matrix homeserver
   Loaded: loaded (/lib/systemd/system/matrix-synapse.service; enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2017-07-24 02:15:40 IST; 309ms ago
  Process: 29681 ExecStartPre=/usr/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --generate-keys (code=exited, status=1/FAILURE)
 Main PID: 9829 (code=exited, status=0/SUCCESS)

Jul 24 02:15:40 domain.org systemd[1]: Unit matrix-synapse.service entered ....
Hint: Some lines were ellipsized, use -l to show in full
```.

choose server_name at installation

I was reading synapse documentation and I discovered that the server_name could be different than the real address of the server. It is explain here : https://github.com/matrix-org/synapse#setting-up-federation
So we can run a server at synapse.example.com, but have our Matrix user-ids look like @user:example.com instead of @user:synapse.example.com .
It could be pretty cool for yunohost admin to be able to choose the server_name before install and then when the install is finish, to get the correct SRV record to put in the DNS record of his/her registrar's interface. and also the homeserver.yaml being already set with the desired server_name.

I know I would have loved that!
Now, I don't dare to make the change of my homeserver.yaml because of that sentence : "If you've already started Synapse and a database has been created, you will have to recreate the database."
I'm afraid all users loose their data. I don't know what imply to recreate the database. Will users loose their data? the ID and key device check (for encryption...)?
And first of all, I don't know how to recreate this database.

I guess, this would be a very welcomed enhancement.

Error 502

Hello,

I can't access to my synapse server, the riot app report a «Error 502». I'm on Yunohost 3.0 and all other apps works fine.

Different riot client

Hi,

It seems that this conf disallow to connect from riots hosted on other servers than riot.im

I guess because of
trusted_third_party_id_servers

Do you thing you could whitelist everything ?

Thanks !

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.