Hello. Installed NextCloud 22 from Snapshot on Ubuntu 18.04. NextCloud worked. Switched the server to a closed network with no internet access. I got an error while starting the server.
Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the webserver log.
Log: /var/snap/nextcloud/current/logs/nextcloud.log
delta@nextcloud:~$ sudo less /var/snap/nextcloud/current/logs/nextcloud.log
Id":"0jPXfBADwQGhcmMDHh6B","level":2,"time":"2022-02-28T07:35:08+00:00","remoteAddr":"","user":"--"," app":"appstoreFetcher","method":"","url":"--","message":"Could not connect to appstore: cURL error 28: Connection timed out after 60001 milliseconds (see https:// curl.haxx.se/libcurl/c/libcurl-errors.html) for https://apps.nextcloud.com/api/v1/apps.json","userAgent":"--","version":" 22.2.3.0"} -bash: syntax error near unexpected token `('
Please tell me how to make Nextcloud work without connecting to the Internet and is it possible at all?
I hope the error does not belong to your actual problem. It was 2022-02-28
and not today
.
Sometime you can trigger errors on direct php execution. That is wrong but maybe we get some informations.
sudo -u www-data php /path/to/your/nextcloud-dir/index.php
Also you can post apache2-logs.
delta@nextcloud:/var/snap$ locate index.php
/snap/nextcloud/29223/htdocs/index.php
/snap/nextcloud/29223/htdocs/apps/dashboard/templates/index.php
/snap/nextcloud/29223/htdocs/apps/files/templates/index.php
/snap/nextcloud/29223/htdocs/apps/files_trashbin/templates/index.php
/snap/nextcloud/29223/htdocs/apps/logreader/templates/index.php
/snap/nextcloud/29223/htdocs/ocm-provider/index.php
/snap/nextcloud/29223/htdocs/ocs-provider/index.php
/snap/nextcloud/29223/htdocs/updater/index.php
delta@nextcloud:/var/snap$ sudo -u www-data php /snap/nextcloud/29223/htdocs/index.php
sudo: php: command not found
Спойлер
root@nextcloud:/var/snap/nextcloud/29223/logs# less apache_errors.log
[Sun Feb 27 00:00:24.766224 2022] [ssl:warn] [pid 2629:tid 140318749439168] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Feb 27 00:00:24.766306 2022] [lbmethod_heartbeat:notice] [pid 2629:tid 140318749439168] AH02282: No slotmem from mod_heartmonitor
[Sun Feb 27 00:00:24.777991 2022] [mpm_event:notice] [pid 2629:tid 140318749439168] AH00489: Apache/2.4.52 (Unix) OpenSSL/1.1.1 configured – resuming normal operations
[Sun Feb 27 00:00:24.778007 2022] [core:notice] [pid 2629:tid 140318749439168] AH00094: Command line: ‘httpd -d /snap/nextcloud/29223 -D FOREGROUND’
[Sun Feb 27 00:00:24.779299 2022] [unixd:alert] [pid 15413:tid 140318749439168] AH02155: getpwuid: couldn’t determine user name from uid 4294967295, you probably need to modify the User directive
[Sun Feb 27 00:00:24.780197 2022] [unixd:alert] [pid 15412:tid 140318749439168] AH02155: getpwuid: couldn’t determine user name from uid 4294967295, you probably need to modify the User directive
[Sun Feb 27 00:00:24.781132 2022] [unixd:alert] [pid 15411:tid 140318749439168] AH02155: getpwuid: couldn’t determine user name from uid 4294967295, you probably need to modify the User directive
[Sun Feb 27 00:00:25.048738 2022] [mpm_event:notice] [pid 2629:tid 140318749439168] AH00493: SIGUSR1 received. Doing graceful restart
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
[Sun Feb 27 00:00:25.054628 2022] [ssl:warn] [pid 2629:tid 140318749439168] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Feb 27 00:00:25.054701 2022] [lbmethod_heartbeat:notice] [pid 2629:tid 140318749439168] AH02282: No slotmem from mod_heartmonitor
[Sun Feb 27 00:00:25.054864 2022] [mpm_event:notice] [pid 2629:tid 140318749439168] AH00489: Apache/2.4.52 (Unix) OpenSSL/1.1.1 configured – resuming normal operations
[Sun Feb 27 00:00:25.054876 2022] [core:notice] [pid 2629:tid 140318749439168] AH00094: Command line: ‘httpd -d /snap/nextcloud/29223 -D FOREGROUND’
[Sun Feb 27 00:00:25.056712 2022] [unixd:alert] [pid 15566:tid 140318749439168] AH02155: getpwuid: couldn’t determine user name from uid 4294967295, you probably need to modify the User directive
[Sun Feb 27 00:00:25.057009 2022] [unixd:alert] [pid 15567:tid 140318749439168] AH02155: getpwuid: couldn’t determine user name from uid 4294967295, you probably need to modify the User directive
[Sun Feb 27 00:00:25.057923 2022] [unixd:alert] [pid 15565:tid 140318749439168] AH02155: getpwuid: couldn’t determine user name from uid 4294967295, you probably need to modify the User directive
Post:
which php
dpkg -l|grep php
Also Ubuntu 18.04 LTS is an old Ubuntu release. Upgrade to Ubuntu 20.04 LTS.
Also i do not like Snap. Perhaps you can install Nextcloud native.
Nextcloud on Debian 11 with Apache2
Nextcloud on Ubuntu 20.04 LTS with Nginx
(you can combine it to Ubuntu 20.04 LTS with Apache2)
Thanks! I started the installation following the instructions: Nextcloud on Ubuntu 20.04 LTS with Nginx.
Did steps 1 to 6 skipping 4 (I will NOT have a certificate and httpS, only http. I will connect to the site using the IP address: 10.238.31.141).
Got an error doing sudo nginx -t:
delta@cloud:/etc/nginx/sites-available$ sudo nginx -t
nginx: [emerg] no "ssl_certificate" is defined for the "listen ... ssl" directive in /etc/nginx/sites-enabled/nextcloud:14
nginx: configuration file /etc/nginx/nginx.conf test failed
Contents of /etc/nginx/sites-available/nextcloud:
upstream php-handler {
#server 127.0.0.1:9000;
server unix:/var/run/php/php7.4-fpm.sock;
}
server {
listen 80;
listen[::]:80;
server_name 10.238.31.141;
#enforcehttps
return 301 https://$server_name:443$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name 10.238.31.141;
# Use Mozilla's guidelines for SSL/TLS settings
# https://mozilla.github.io/server-side-tls/ssl-config-generator/
# NOTE: some settings below might be redundant
# ssl_certificate /etc/letsencrypt/live/cloud.hakase-labs.io/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/cloud.hakase-labs.io/privkey.pem;
...then everything is as in the instructions...
How to configure NextCloud to work without ssl?