The conditional check '( objectstore_s3_key != '' )' failed.
jcklpe opened this issue · 3 comments
I decided to reinstall Nextcloud from scratch on my machine. Sorry to bother again but I ran into one small problem.
I commented out all the stuff related to Amazon s3 because I am not backing stuff up to a third party cloud location nor am I backing stuff elsewhere. I'm just running NC off my desktop in my closet, and I don't have room for all the restic updates or s3 redundant storage etc. I know that's not ideal but it's my current means.
So then, if I'm not going to use s3 etc what do I do about the parts the inventory related to it?
Here's the full error message for context:
TASK [nextcloud : check if config.php exists] ***********************************************************************************************
Wednesday 29 July 2020 04:24:50 -0500 (0:00:00.041) 0:02:11.711 ********
ok: [localhost]
TASK [nextcloud : define S3 as primary storage (only if config.php doesn't exist)] **********************************************************
Wednesday 29 July 2020 04:24:50 -0500 (0:00:00.172) 0:02:11.883 ********
fatal: [localhost]: FAILED! =>
msg: |-
The conditional check '( objectstore_s3_key != '' )' failed. The error was: error while evaluating conditional (( objectstore_s3_key != '' )): 'objectstore_s3_key' is undefined
The error appears to be in '/home/aslan/nextcloud/roles/nextcloud/tasks/configure/nextcloud.yml': line 10, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: define S3 as primary storage (only if config.php doesn't exist)
^ here
I went into the nextcloud "roles" and commented out all the stuff related to s3.
I also went and got rid of all the fail2ban stuff since it caused me problems last time. I think I've already accidentally hit the fail2ban limit though just in the process of running the install script a couple of times.
EDIT:
Well, I uninstalled fail2ban and purged it from the system and yet I'm still getting some sort of connection issue
If I try to connect at cloud.aslanfrench.work then I get
Internal Server Error
The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.
Technical details
Remote Address: 192.168.1.1
Request ID: D23BxEFGb82BG150Ykuo
Here's the last couple of errors in the error log:
2020/07/29 01:41:55 [error] 100872#100872: *215 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 01:41:55 [error] 100872#100872: *213 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 01:41:55 [error] 100872#100872: *212 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 01:41:55 [error] 100872#100872: *214 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 01:41:57 [error] 100872#100872: *224 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 01:44:52 [error] 100872#100872: *226 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 01:56:56 [error] 100872#100872: *228 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 01:57:07 [error] 100872#100872: *230 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 02:11:56 [error] 100872#100872: *233 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 02:12:15 [error] 100872#100872: *235 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 02:26:57 [error] 100872#100872: *237 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 02:27:22 [error] 100872#100872: *239 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 02:27:59 [error] 100872#100872: *241 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: cloud.aslanfrench.work, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "cloud.jackalope.tech"
2020/07/29 04:31:07 [error] 100872#100872: *381 FastCGI sent in stderr: "PHP message: PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 85PHP message: {"reqId":"wMVHWgr9aK8oHNBsC3KB","level":3,"time":"2020-07-29T09:31:07+00:00","remoteAddr":"190.57.134.22","user":"--","app":"PHP","method":"GET","url":"/","message":"session_start(): A session had already been started - ignoring at /var/www/nextcloud/lib/private/Session/Internal.php#209","userAgent":"Go-http-client/1.1","version":""}" while reading response header from upstream, client: 190.57.134.22, server: cloud.aslanfrench.work, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "136.49.174.165:443"
Looking at it, I think the issue might be with my DNS. I'm going to double check that real quick. Going to cloud.aslanfrench.work does work, but it's giving me an error code. I see a bunch of "cloud.jackalope.tech" though. That's my old website and I didn't include it at all in this nextcloud install inventory so I think it might be that cloud.aslanfrench.work just redirects to cloud.jackalope.tech and that's throwing the system for a loop.
Pretty sure I can just add extra domain names to the nginx confs but not sure.
EDIT2:
Nope, DNS stuff works fine. Using cloud.jackalope directs to the same IP as cloud.aslanfrench.work
EDIT3:
Okay I did some google and still not quite sure what the issue is. But here's some more info that might be helpful.
I can get to the nginx server via localhost no problem.
If I wget cloud.aslanfrench.work I get a Server 500 error.
My memory of ansible stuff was that it was supposed to be idempotent but perhaps it's not anymore? I see people mention that they had to reset their default config files, but I'm not sure which files they're referring to.
For reference here is what the latest attempt at installing hits an error:
TASK [check install status] *****************************************************************************************************************
Wednesday 29 July 2020 05:39:40 -0500 (0:00:00.026) 0:00:38.507 ********
fatal: [localhost]: FAILED! => changed=false
cache_control: no-store, no-cache, must-revalidate
connection: close
content: ''
content_security_policy: 'default-src ''self''; script-src ''self'' ''nonce-L3k2ZzVOeUZLMUg0UTdML0NFd08zdlFjeVFpdTlneHBTNDh5bnkvdkdUWT06alZUaml1blJhU21lQk11NVlqeGR1SmxyblgyV25FOE5MdVZvNnhmZmZsST0=''; style-src ''self'' ''unsafe-inline''; frame-src *; img-src * data: blob:; font-src ''self'' data:; media-src *; connect-src *; object-src ''none''; base-uri ''self'';'
content_type: text/html; charset=UTF-8
date: Wed, 29 Jul 2020 10:39:40 GMT
elapsed: 0
expires: Thu, 19 Nov 1981 08:52:00 GMT
msg: 'Status code was 500 and not [200]: HTTP Error 500: Internal Server Error'
pragma: no-cache
redirected: false
referrer_policy: no-referrer
server: nginx
set_cookie: __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
status: 500
transfer_encoding: chunked
url: https://cloud.aslanfrench.work/status.php
x_content_type_options: nosniff
x_download_options: noopen
x_frame_options: SAMEORIGIN
x_permitted_cross_domain_policies: none
x_robots_tag: none
x_xss_protection: 1; mode=block
I commented out all the stuff related to Amazon s3 because I am not backing stuff up to a third party cloud location nor am I backing stuff elsewhere. I'm just running NC off my desktop in my closet, and I don't have room for all the restic updates or s3 redundant storage etc. I know that's not ideal but it's my current means.
If you comment out a variable in athe inventory the playbook will fail. as you can see the playbook checks if objectstore_s3_key != ''
. But the complete playbooks fails if objectstore_s3_key is undefined. so leave objectstore_s3_key = ''
in the inventory.
Which branch you are using right now? master or nextcloud_reloaded?
@ReinerNippes It's actually working now!
I read a lot of issue tickets dealing with 500 errors and most of the time people said they had to revert their default config files. So I went in, changed the name of config.php to config.old.php and then reran the nextcloud.yml file and after that, it worked!