Skip to content

Empty reply from server after setup #42

@funbotan

Description

@funbotan

General Description

Tried following the installation setup in README (both client and server) and didn't succeed in getting it working: the server returns an empty response. This is most likely not a bug, but rather me missing something due to the not-so-comprehensive documentation and no help from Stackoverflow and such.

How To Reproduce?

  1. Follow the setup instructions in README

Operating System

Ubuntu 20.04
nginx/1.18.0
Nextcloud 23.0.0

Systemd service

[Unit]
Description=talked
Requires=network.target
After=network.target

[Service]
WorkingDirectory=/opt/talked
User=talked
Group=talked
RuntimeDirectory=talked
Environment=TALKED_CONFIG_PATH=/opt/talked/config.toml
ProtectSystem=full
ProtectHome=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
PrivateTmp=yes
NoNewPrivileges=yes
SyslogIdentifier=talked
StandardOutput=syslog
StandardError=syslog
ExecStart=/opt/talked/talked/bin/uwsgi --socket 127.0.0.1:3031 --logto /opt/talked/uwsgi.log --master --manage-script-name --mount /=talked.main:app
Restart=always

[Install]
WantedBy=multi-user.target

Nginx config

location /talked {
        include uwsgi_params;
        uwsgi_pass 127.0.0.1:3031;
        auth_basic "Nothing to see here, move along";
        auth_basic_user_file /opt/talked/.htpasswd;
    }

Logs

The content of uwsgi log file after a couple of failed requests:

*** Starting uWSGI 2.0.20 (64bit) on [Sun Feb 20 16:17:51 2022] ***
compiled with version: 9.3.0 on 19 February 2022 14:31:49
os: Linux-5.4.0-100-generic #113-Ubuntu SMP Thu Feb 3 18:43:29 UTC 2022
nodename: nextcloud
machine: x86_64
clock source: unix
detected number of CPU cores: 2
current working directory: /opt/talked
detected binary path: /opt/talked/talked/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your processes number limit is 15188
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:3031 fd 3
Python version: 3.8.10 (default, Nov 26 2021, 20:14:08)  [GCC 9.3.0]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x557262ef09a0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 145840 bytes (142 KB) for 1 cores
*** Operational MODE: single process ***
mounting talked.main:app on /
WSGI app 0 (mountpoint='/') ready in 0 seconds on interpreter 0x557262ef09a0 pid: 13259 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 13259)
spawned uWSGI worker 1 (pid: 13278, cores: 1)
[pid: 13278|app: 0|req: 1/1] 23.88.50.247 () {38 vars in 430 bytes} [Sun Feb 20 16:18:14 2022] GET /talked => generated 232 bytes in 12 msecs (HTTP/1.1 404) 2 headers in 87 bytes (1 switches on core 0)
[pid: 13278|app: 0|req: 2/2] 23.88.50.247 () {38 vars in 430 bytes} [Sun Feb 20 16:19:07 2022] GET /talked => generated 232 bytes in 1 msecs (HTTP/1.1 404) 2 headers in 87 bytes (1 switches on core 0)
invalid request block size: 21573 (max 4096)...skip

Response

>> curl 127.0.0.1:3031
curl: (52) Empty reply from server
>> sudo -u www-data php occ talked:record 'xxxxxxxx' 'status'
An unhandled exception has been thrown:
TypeError: Return value of OCA\Talked\Command\Record::sendPostRequest() must be of the type string, null returned in /var/www/nextcloud/apps/talked/lib/Command/Record.php:207
Stack trace:
#0 /var/www/nextcloud/apps/talked/lib/Command/Record.php(109): OCA\Talked\Command\Record->sendPostRequest()
#1 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Talked\Command\Record->execute()
#2 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#3 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#4 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#5 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#6 /var/www/nextcloud/console.php(99): OC\Console\Application->run()
#7 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

Talked Version

Server: 0.3.1, installed through PIP according to the instructions in README
Client: 0.3.0, installed through Nextcloud apps

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions