nextcloudpi icon indicating copy to clipboard operation
nextcloudpi copied to clipboard

Fresh install - no access

Open ambient-home-systems opened this issue 8 years ago • 15 comments

I am running a fresh install of Docker (CentOS) and a fresh install of NextCloudPi-x86.

I cannot access http://IP:80; https://IP:443 (getting forbidden), on :4443 I am getting a 404.

[Sun Apr 22 10:51:45.706904 2018] [authz_core:error] [pid 82:tid 140236639295232] [client 71.121.214.250:41855] AH01630: client denied by server configuration: /var/www/ncp-web/wizard

The logs are full of these "client denied by server config" messages. Any thoughts?

full log:

<--! Paste this in GitHub report -->

NextCloudPlus diagnostics

grep: /usr/local/etc/ncp-config.d/nc-automount.sh: No such file or directory
NextCloudPlus version  v0.53.28
NextCloudPlus image    NextCloudPlus_04-20-18
distribution           Debian GNU/Linux 9 \n \l
automount
USB devices            none
datadir                /data/app/data
data in SD             no
data filesystem        ext2/ext3
data disk usage        3.1G/48G
rootfs usage           908M/10G
swapfile               /dev/vda2
Nextcloud check        error
HTTPD service          up
PHP service            up
MariaDB service        up
Redis service          up
Postfix service        up
internet check         ok
port check 80          open
port check 443         open
IP                     172.17.0.3
gateway                172.17.0.1
interface              eth0
certificates           none
NAT loopback           no
uptime                 22:57

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "1": "172.17.0.3",
            "5": "nextcloudplus.local"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbtype": "mysql",
        "version": "13.0.1.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "mail_smtpmode": "php",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https"
    }
}

HTTPd logs

[Sun Apr 22 10:46:23.343416 2018] [ssl:error] [pid 45:tid 140236747736256] AH02604: Unable to configure certificate localhost:443:0 for stapling
[Sun Apr 22 10:46:24.012274 2018] [ssl:warn] [pid 49:tid 140236747736256] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Sun Apr 22 10:46:24.012414 2018] [ssl:error] [pid 49:tid 140236747736256] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=88a2bdb63ba5 / issuer: CN=88a2bdb63ba5 / serial: B1463512C4386778 / notbefore: Apr 20 11:27:05 2018 GMT / notafter: Apr 17 11:27:05 2028 GMT]
[Sun Apr 22 10:46:24.012424 2018] [ssl:error] [pid 49:tid 140236747736256] AH02604: Unable to configure certificate localhost:443:0 for stapling
[Sun Apr 22 10:46:25.002026 2018] [mpm_event:notice] [pid 49:tid 140236747736256] AH00489: Apache/2.4.25 (Debian) OpenSSL/1.0.2l configured -- resuming normal operations
[Sun Apr 22 10:46:25.002113 2018] [core:notice] [pid 49:tid 140236747736256] AH00094: Command line:'/usr/sbin/apache2'
[Sun Apr 22 10:46:25.667603 2018] [authz_core:error] [pid 82:tid 140236656080640] [client 71.121.214.250:41610] AH01630: client denied by server configuration: /var/www/ncp-web/
[Sun Apr 22 10:46:26.827699 2018] [authz_core:error] [pid 82:tid 140236647687936] [client 71.121.214.250:41610] AH01630: client denied by server configuration: /var/www/ncp-web/favicon.ico, referer: https://192.158.236.65/
[Sun Apr 22 10:47:19.286361 2018] [authz_core:error] [pid 81:tid 140236530190080] [client 71.121.214.250:41631] AH01630: client denied by server configuration: /var/www/ncp-web/
[Sun Apr 22 10:47:20.489415 2018] [authz_core:error] [pid 81:tid 140236521797376] [client 71.121.214.250:41631] AH01630: client denied by server configuration: /var/www/ncp-web/favicon.ico, referer: https://192.158.236.65/
[Sun Apr 22 10:51:45.706904 2018] [authz_core:error] [pid 82:tid 140236639295232] [client 71.121.214.250:41855] AH01630: client denied by server configuration: /var/www/ncp-web/wizard
[Sun Apr 22 10:51:46.957148 2018] [authz_core:error] [pid 82:tid 140236630902528] [client 71.121.214.250:41855] AH01630: client denied by server configuration: /var/www/ncp-web/favicon.ico, referer: https://192.158.236.65/wizard
[Sun Apr 22 10:51:52.312089 2018] [authz_core:error] [pid 82:tid 140236622509824] [client 71.121.214.250:41855] AH01630: client denied by server configuration: /var/www/ncp-web/jkl3r
[Sun Apr 22 10:51:53.342999 2018] [authz_core:error] [pid 81:tid 140236505011968] [client 71.121.214.250:41859] AH01630: client denied by server configuration: /var/www/ncp-web/favicon.ico, referer: https://192.158.236.65/jkl3r
[Sun Apr 22 10:51:58.215343 2018] [authz_core:error] [pid 81:tid 140236479833856] [client 71.121.214.250:41859] AH01630: client denied by server configuration: /var/www/ncp-web/
[Sun Apr 22 10:51:59.162707 2018] [authz_core:error] [pid 82:tid 140236614117120] [client 71.121.214.250:41867] AH01630: client denied by server configuration: /var/www/ncp-web/favicon.ico, referer: https://192.158.236.65/
[Sun Apr 22 11:04:22.313361 2018] [authz_core:error] [pid 82:tid 140236605724416] [client 71.121.214.250:42707] AH01630: client denied by server configuration: /var/www/ncp-web/
[Sun Apr 22 11:04:23.933403 2018] [authz_core:error] [pid 82:tid 140236597331712] [client 71.121.214.250:42710] AH01630: client denied by server configuration: /var/www/ncp-web/favicon.ico, referer: https://192.158.236.65/
[Sun Apr 22 11:12:28.449951 2018] [authz_core:error] [pid 81:tid 140236454655744] [client 71.121.214.250:43032] AH01630: client denied by server configuration: /var/www/ncp-web/
[Sun Apr 22 11:12:29.650465 2018] [authz_core:error] [pid 81:tid 140236656080640] [client 71.121.214.250:43032] AH01630: client denied by server configuration: /var/www/ncp-web/favicon.ico, referer: https://192.158.236.65/

Database logs

2018-04-22 10:46:24 140124282856000 [Note] InnoDB: Highest supported file format is Barracuda.
2018-04-22 10:46:24 140124282856000 [Note] InnoDB: The log sequence number 1616829 in ibdata file do not match the log sequence number 1616918 in the ib_logfiles!
2018-04-22 10:46:24 140124282856000 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
2018-04-22 10:46:24 140124282856000 [Note] InnoDB: 128 rollback segment(s) are active.
2018-04-22 10:46:24 140124282856000 [Note] InnoDB: Waiting for purge to start
2018-04-22 10:46:24 140124282856000 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.1 started; log sequence number 1616918
2018-04-22 10:46:24 140124282856000 [Note] Plugin 'FEEDBACK' is disabled.
2018-04-22 10:46:24 140124282856000 [Note] Recovering after a crash using tc.log
2018-04-22 10:46:24 140124282856000 [Note] Starting crash recovery...
2018-04-22 10:46:24 140124282856000 [Note] Crash recovery finished.
2018-04-22 10:46:24 140123664508672 [Note] InnoDB: Dumping buffer pool(s) not yet started
2018-04-22 10:46:24 140124282856000 [Note] Server socket created on IP: '127.0.0.1'.
2018-04-22 10:46:24 140124282856000 [ERROR] mysqld: Table './mysql/user' is marked as crashed and should be repaired
2018-04-22 10:46:24 140124282856000 [Warning] Checking table:   './mysql/user'
2018-04-22 10:46:24 140124282856000 [ERROR] mysql.user: 1 client is using or hasn't closed the table properly
2018-04-22 10:46:24 140124282856000 [ERROR] mysqld: Table './mysql/db' is marked as crashed and should be repaired
2018-04-22 10:46:24 140124282856000 [Warning] Checking table:   './mysql/db'
2018-04-22 10:46:24 140124282856000 [ERROR] mysql.db: 1 client is using or hasn't closed the table properly
2018-04-22 10:46:24 140124282856000 [Note] mysqld: ready for connections.
Version: '10.1.26-MariaDB-0+deb9u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Debian 9.1

Nextcloud logs


ambient-home-systems avatar Apr 22 '18 11:04 ambient-home-systems

what is the output of docker logs -f nextcloudplus

nachoparker avatar Apr 23 '18 12:04 nachoparker

I have the same issue.
Fresh VPN, Ubuntu 16.04.4 LTS

Initializing empty volume..
Making /usr/local/etc/ncp-config.d persistent ...
Making /etc/services-enabled.d persistent ...
Making /etc/shadow persistent ...
Making /etc/apache2 persistent ...
Starting PHP-fpm
Starting Apache
Starting mariaDB
2018-04-23 17:32:03 140243226780224 [Note] mysqld (mysqld 10.1.26-MariaDB-0+deb9u1) starting as process 51 ...
Provisioning
Provisioning Redis password
Provisioning MariaDB password
PHP threads set to 1
Starting Redis
Starting Cron
Starting Postfix
Uninitialized instance, running nc-init...
Activating nc-init
Setting up a clean Nextcloud instance... wait until message 'NC init done'
Setting up database...
Setting up Nextcloud...
Nextcloud is not installed - only a limited number of commands are available
Nextcloud was successfully installed
Set mode for background jobs to 'cron'
System config value mysql.utf8mb4 set to boolean true
System config value trusted_domains => 1 set to string 172.17.0.2
System config value trusted_domains => 5 set to string nextcloudplus.local
System config value mail_smtpmode set to string php
System config value mail_smtpauthtype set to string LOGIN
System config value mail_from_address set to string admin
System config value mail_domain set to string ownyourbits.com
calendar installed
contacts installed
notes installed
tasks installed
news installed
admin_notifications installed
calendar enabled
contacts enabled
notes enabled
tasks enabled
news enabled
admin_notifications enabled
System config value overwriteprotocol set to string https
NC init done
System config value trusted_domains => 1 set to string 172.17.0.2
System config value trusted_domains => 6 set to string 159.65.126.*
Init done

docker exec -it nextcloudpi sudo ncp-report <--! Paste this in GitHub report -->

NextCloudPlus diagnostics

grep: /usr/local/etc/ncp-config.d/nc-automount.sh: No such file or directory
NextCloudPlus version  v0.53.28
NextCloudPlus image    NextCloudPlus_04-20-18
distribution           Debian GNU/Linux 9 \n \l
automount
USB devices            none
datadir                /data/app/data
data in SD             yes
data filesystem        ext2/ext3
data disk usage        3.4G/25G
rootfs usage           3.4G/25G
swapfile               none
Nextcloud check        error
HTTPD service          up
PHP service            up
MariaDB service        up
Redis service          up
Postfix service        up
internet check         ok
port check 80          open
port check 443         open
IP                     172.17.0.2
gateway                172.17.0.1
interface              eth0
certificates           none
NAT loopback           no
uptime                 49min

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "1": "172.17.0.2",
            "5": "nextcloudplus.local",
            "6": "159.65.126.*"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbtype": "mysql",
        "version": "13.0.1.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "mail_smtpmode": "php",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https"
    }
}

HTTPd logs

[Mon Apr 23 17:32:02.562505 2018] [ssl:warn] [pid 45:tid 139735338083520] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 23 17:32:02.565725 2018] [ssl:error] [pid 45:tid 139735338083520] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=88a2bdb63ba5 / issuer: CN=88a2bdb63ba5 / serial: B1463512C4386778 / notbefore: Apr 20 11:27:05 2018 GMT / notafter: Apr 17 11:27:05 2028 GMT]
[Mon Apr 23 17:32:02.565755 2018] [ssl:error] [pid 45:tid 139735338083520] AH02604: Unable to configure certificate localhost:443:0 for stapling
[Mon Apr 23 17:32:03.110487 2018] [ssl:warn] [pid 49:tid 139735338083520] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 23 17:32:03.110979 2018] [ssl:error] [pid 49:tid 139735338083520] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=88a2bdb63ba5 / issuer: CN=88a2bdb63ba5 / serial: B1463512C4386778 / notbefore: Apr 20 11:27:05 2018 GMT / notafter: Apr 17 11:27:05 2028 GMT]
[Mon Apr 23 17:32:03.111001 2018] [ssl:error] [pid 49:tid 139735338083520] AH02604: Unable to configure certificate localhost:443:0 for stapling
[Mon Apr 23 17:32:04.004108 2018] [mpm_event:notice] [pid 49:tid 139735338083520] AH00489: Apache/2.4.25 (Debian) OpenSSL/1.0.2l configured -- resuming normal operations
[Mon Apr 23 17:32:04.004661 2018] [core:notice] [pid 49:tid 139735338083520] AH00094: Command line: '/usr/sbin/apache2'
[Mon Apr 23 18:01:10.623288 2018] [authz_core:error] [pid 75:tid 139735204464384] [client 178.43.75.11:62352] AH01630: client denied by server configuration: /var/www/ncp-web/

Database logs

2018-04-23 17:32:03 140243226780224 [Note] InnoDB: Highest supported file format is Barracuda.
2018-04-23 17:32:03 140243226780224 [Note] InnoDB: The log sequence number 1616829 in ibdata file do not match the log sequence number 1616918 in the ib_logfiles!
2018-04-23 17:32:03 140243226780224 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
2018-04-23 17:32:03 140243226780224 [Note] InnoDB: 128 rollback segment(s) are active.
2018-04-23 17:32:03 140243226780224 [Note] InnoDB: Waiting for purge to start
2018-04-23 17:32:04 140243226780224 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.1 started; log sequence number 1616918
2018-04-23 17:32:04 140242589804288 [Note] InnoDB: Dumping buffer pool(s) not yet started
2018-04-23 17:32:04 140243226780224 [Note] Plugin 'FEEDBACK' is disabled.
2018-04-23 17:32:04 140243226780224 [Note] Recovering after a crash using tc.log
2018-04-23 17:32:04 140243226780224 [Note] Starting crash recovery...
2018-04-23 17:32:04 140243226780224 [Note] Crash recovery finished.
2018-04-23 17:32:04 140243226780224 [Note] Server socket created on IP: '127.0.0.1'.
2018-04-23 17:32:04 140243226780224 [ERROR] mysqld: Table './mysql/user' is marked as crashed and should be repaired
2018-04-23 17:32:04 140243226780224 [Warning] Checking table:   './mysql/user'
2018-04-23 17:32:04 140243226780224 [ERROR] mysql.user: 1 client is using or hasn't closed the table properly
2018-04-23 17:32:04 140243226780224 [ERROR] mysqld: Table './mysql/db' is marked as crashed and should be repaired
2018-04-23 17:32:04 140243226780224 [Warning] Checking table:   './mysql/db'
2018-04-23 17:32:04 140243226780224 [ERROR] mysql.db: 1 client is using or hasn't closed the table properly
2018-04-23 17:32:04 140243226780224 [Note] mysqld: ready for connections.
Version: '10.1.26-MariaDB-0+deb9u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Debian 9.1

Nextcloud logs


Robert-turbo avatar Apr 23 '18 18:04 Robert-turbo

what command are you using to run the container?

nachoparker avatar Apr 23 '18 19:04 nachoparker

OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: "docker": executable file not found in $PATH": unknown

I'm installing using the command docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v ncdata:/data --name nextcloudpi ownyourbits/nextcloudpi-x86 domain.com

ambient-home-systems avatar Apr 23 '18 21:04 ambient-home-systems

docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v ncdata:/data --name nextcloudpi ownyourbits/nextcloudpi-x86

Just tested this command with the last container on my computer (after removing the container and the volume), and I could access localhost without problems. It must be something external to the container.

BTW, better to use ownyourbits/nextcloudplus-x86, because at some point the old name will stop being used.

nachoparker avatar Apr 23 '18 22:04 nachoparker

I used

docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v ncdata:/data --name nextcloudpi ownyourbits/nextcloudplus-x86 $DOMAIN

but i was using public IP addres/domain because VPS is on another network. Can you try to run it on server on some VPS?

Robert-turbo avatar Apr 24 '18 07:04 Robert-turbo

I tested it in my LAN network on another machine, it works.

I don't know if it might be some networking issue... it seems that all services are up, so you should be able to connect to the HTTPS port. This is no different than any other web service in that regard.

Run the container at home, forward ports and all that and check that you can connect both in the LAN and from outside. It should be the same situation.

nachoparker avatar Apr 24 '18 09:04 nachoparker

Is the admin interface only accessible via lan with a default configuration? I am installing this via a Docker on a VPS. I have my firewall wide open both ways to my VPS IP, but I'm not even getting to the activation page and my httpd logs are saying access denied by server conf.

ambient-home-systems avatar Apr 26 '18 14:04 ambient-home-systems

Is the admin interface only accessible via lan with a default configuration?

that's right. You can use ncp-config which has the same functionality ( or update the apache configuration )

nachoparker avatar Apr 27 '18 15:04 nachoparker

I got the same problem as @joshuamallow.

Though, I can access it when I deactivate the forced https and use the http link. Obviously that is not ideal.

@nachoparker My guess is, that when we first try to access the nextcloudpi running on a VPS, it tries to reroute us to the admin page. But since were not in the same network, it will give us 403.

Is there any way to prevent this reroute?

LukasWerfel avatar Dec 26 '18 19:12 LukasWerfel

@LukasWerfel can you describe your situation? what are you able to reach and what not? ncp-web? Nextcloud?

nachoparker avatar Dec 27 '18 14:12 nachoparker

I have NCP running on a VPS. But I cannot access Nextcloud unless I deactivate nc-httpsonly. Both tell me "Forbidden". If I deactivate httpsonly I can acces the nextcloud, but ncp-web still requires https.

LukasWerfel avatar Dec 29 '18 21:12 LukasWerfel

I managed to fix it. I had to setup a VPN server on the VPS. Then I could go to the nextcloud and click activate (on the page where it tells you the passwords).

Would be nice if you could activate the nextcloud via the console (and therefore ssh). is that possible?

LukasWerfel avatar Dec 29 '18 22:12 LukasWerfel

yes, if you run nc-passwd and nc-admin that is equivalent to activation

nachoparker avatar Dec 30 '18 21:12 nachoparker

@nachoparker I got the same problem and after running nc-password and nc-admin I can reach the :443 interface but not ncp-web at :4443 (403). I'm running NCP in a docker image (easier to encrypt) on a VPS and the external IP is in the trusted Domains List. Any idea or is it only possible via VPN?

JEK58 avatar Feb 07 '19 09:02 JEK58