Resource icon

Scripted installation of Nextcloud 28 in iocage jail 2018-03-23

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
This is strange, more so because I can't reproduce it myself under 11.2-BETA3. But @ilkor's testing suggests it might be somehow related to the random admin password. Can you try change line 35 to read ADMIN_PASSWORD="password", and see if that helps?
 

Troels

Cadet
Joined
Mar 24, 2017
Messages
6
I get the same errors as before.

Code:
* Stopping nextcloud
  + Running prestop OK
  + Stopping services OK
  + Removing jail process OK
  + Running poststop OK
* Starting nextcloud
  + Started OK
  + Starting services OK


Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "maintenance:update" namespace.

  Did you mean this?
	  maintenance



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "config:system" namespace.



Nextcloud is not installed - only a limited number of commands are available


  Command "app:enable" is not defined.

  Did you mean this?
	  app:check-code



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "encryption" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "encryption" namespace.



Nextcloud is not installed - only a limited number of commands are available


  There are no commands defined in the "background" namespace.


When I try to login after I filled out the admin pwd, db pwd, etc. it just says:
Code:
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
 
Last edited by a moderator:

Troels

Cadet
Joined
Mar 24, 2017
Messages
6
It is not related to random number generation, I've just run some tests to verify.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Reminder:

[CODE][/CODE] tags for all console output please!
 

ilkor

Dabbler
Joined
Sep 19, 2018
Messages
13
If I change the database password I get an error - this means that the link to the database is successful with the correct password.
Тhe admin password can be changed without any problem, however, the installation problem remains



Code:
[root@nextcloud ~]# su -m www -c "php /usr/local/www/apache24/data/nextcloud/occ maintenance:install -vv -n --database=\"mysql\" --database-name=\"nextcloud\" --database-user=\"nextcloud\" --database-pass=\"1234\" --database-host=\"localhost:/tmp/mysql.sock\" --admin-user=\"admin\" --admin-pass=\"1234\" --data-dir=\"/mnt/files\""
Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'nextcloud'@'localhost' (using password: YES)
 ->
[root@nextcloud ~]# su -m www -c "php /usr/local/www/apache24/data/nextcloud/occ maintenance:install -vvv --database=\"mysql\" --database-name=\"nextcloud\" --database-user=\"nextcloud\" --database-pass=\"gy9XRbTYrNGPWrCx91XotQ==\" --database-host=\"localhost:/tmp/mysql.sock\" --admin-user=\"admin\" --admin-pass=\"1234\" --data-dir=\"/mnt/files\""
[root@nextcloud ~]#
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
When I try to login after I filled out the admin pwd, db pwd, etc.
I think I've mentioned it before, but just to be clear: if the page you get when you browse to the jail is asking for database information, stop. The script didn't work, and we need to figure out why. It's looking like the occ maintenance:install command isn't working for some folks. I'm not sure why that is at this point, and its output isn't helping. But I have one or two ideas of things to try.
 

Troels

Cadet
Joined
Mar 24, 2017
Messages
6
I think it's happening before, something goes wrong at an earlier point, I'm working on tracking it down.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I think it's happening before, something goes wrong at an earlier point, I'm working on tracking it down.
Certainly possible. It's definitely the case that occ maintenance:install is failing silently (which isn't a good thing at all), but the cause may appear earlier in the script output. If you can show the entire output in code tags (or on pastebin.com if it's too long to go here), I might spot something else.
 

Scrat_

Explorer
Joined
May 3, 2018
Messages
95
I don't know if it's worth mentioning, but when I did my initial "git clone..." to pull to a folder, the install process seemed to go so quick, that it never actually downloaded NextCloud. Probably more also.

My observation.

Sent from my SM-N950W using Tapatalk
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
That's right, the git clone command doesn't download Nextcloud--it downloads my script. Running my script downloads Nextcloud (among many other things).
 

Scrat_

Explorer
Joined
May 3, 2018
Messages
95
With my internet connection, it would take about 15min to download NextCloud. The install process took maybe 2min.

Sent from my SM-N950W using Tapatalk
 

CHAiNSAW

Cadet
Joined
Sep 19, 2018
Messages
7
Hi danb35,

I don't know why but since today I receive the following error when trying to install nextcloud

Code:
WARNING: FreeBSD 11.1-RELEASE is approaching its End-of-Life date.
It is strongly recommended that you upgrade to a newer
release within the next 1 week.
src component not installed, skipped
Installing updates... done.
nextcloud successfully created!
Testing SRV response to FreeBSD
jexec: jail_attach(1): Not a directory
{repo} could not be reached, please check your DNS
jexec: jail_attach(1): Not a directory



the
Code:
jexec: jail_attach(1): Not a directory
repeats after every following command.

any idea whats going wrong ?

I stumbled upon this, when I was trying to create the output from the nextcloud install for you
 

ilkor

Dabbler
Joined
Sep 19, 2018
Messages
13
Several unsuccessful attempts, but finally everything got OK.

Code:
[Thu Sep 20 17:47:41 EEST 2018] Your cert is in  /root/.acme.sh/XXXXXX.XX/XXXXXX.XX.cer
[Thu Sep 20 17:47:41 EEST 2018] Your cert key is in  /root/.acme.sh/XXXXXX.XX/XXXXXX.XX.key
[Thu Sep 20 17:47:41 EEST 2018] The intermediate CA cert is in  /root/.acme.sh/XXXXXX.XX/ca.cer
[Thu Sep 20 17:47:41 EEST 2018] And the full chain certs is there:  /root/.acme.sh/XXXXXX.XX/fullchain.cer
[Thu Sep 20 17:47:42 EEST 2018] Installing key to:/usr/local/etc/pki/tls/private/privkey.pem
[Thu Sep 20 17:47:42 EEST 2018] Installing full chain to:/usr/local/etc/pki/tls/certs/fullchain.pem
[Thu Sep 20 17:47:42 EEST 2018] Run reload cmd: service apache24 reload
Performing sanity check on apache24 configuration:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
apache24 not running? (check /var/run/httpd.pid).
[Thu Sep 20 17:47:42 EEST 2018] Reload error for :













* Stopping nextcloud
  + Running prestop OK
  + Stopping services OK
  + Removing jail process OK
  + Running poststop OK
* Starting nextcloud
  + Started OK
  + Starting services OK













Nextcloud was successfully installed

System config value logtimezone set to string Europe/Sofia

System config value log_type set to string file

System config value logfile set to string /var/log/nextcloud.log

System config value loglevel set to string 2

System config value logrotate_size set to string 104847600

System config value memcache.local set to string \OC\Memcache\APCu

System config value redis => host set to string /tmp/redis.sock

System config value redis => port set to integer 0

System config value memcache.locking set to string \OC\Memcache\Redis

System config value overwrite.cli.url set to string https://XXXXXX.XX/

System config value htaccess.RewriteBase set to string /

.htaccess has been updated

System config value trusted_domains => 1 set to string XXXXXX.XX

System config value trusted_domains => 2 set to string 10.0.0.110

encryption enabled

Encryption enabled

Default module: OC_DEFAULT_MODULE

Encryption disabled

Set mode for background jobs to 'cron'


Successfully removed mount from nextcloud's fstab
Installation complete!

upload_2018-9-20_18-24-12.png
 
Last edited:

CHAiNSAW

Cadet
Joined
Sep 19, 2018
Messages
7
Several unsuccessful attempts, but finally everything got OK.

Code:
[Thu Sep 20 17:47:41 EEST 2018] Your cert is in  /root/.acme.sh/XXXXXX.XX/XXXXXX.XX.cer
[Thu Sep 20 17:47:41 EEST 2018] Your cert key is in  /root/.acme.sh/XXXXXX.XX/XXXXXX.XX.key
[Thu Sep 20 17:47:41 EEST 2018] The intermediate CA cert is in  /root/.acme.sh/XXXXXX.XX/ca.cer
[Thu Sep 20 17:47:41 EEST 2018] And the full chain certs is there:  /root/.acme.sh/XXXXXX.XX/fullchain.cer
[Thu Sep 20 17:47:42 EEST 2018] Installing key to:/usr/local/etc/pki/tls/private/privkey.pem
[Thu Sep 20 17:47:42 EEST 2018] Installing full chain to:/usr/local/etc/pki/tls/certs/fullchain.pem
[Thu Sep 20 17:47:42 EEST 2018] Run reload cmd: service apache24 reload
Performing sanity check on apache24 configuration:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
apache24 not running? (check /var/run/httpd.pid).
[Thu Sep 20 17:47:42 EEST 2018] Reload error for :













* Stopping nextcloud
  + Running prestop OK
  + Stopping services OK
  + Removing jail process OK
  + Running poststop OK
* Starting nextcloud
  + Started OK
  + Starting services OK













Nextcloud was successfully installed

System config value logtimezone set to string Europe/Sofia

System config value log_type set to string file

System config value logfile set to string /var/log/nextcloud.log

System config value loglevel set to string 2

System config value logrotate_size set to string 104847600

System config value memcache.local set to string \OC\Memcache\APCu

System config value redis => host set to string /tmp/redis.sock

System config value redis => port set to integer 0

System config value memcache.locking set to string \OC\Memcache\Redis

System config value overwrite.cli.url set to string https://XXXXXX.XX/

System config value htaccess.RewriteBase set to string /

.htaccess has been updated

System config value trusted_domains => 1 set to string XXXXXX.XX

System config value trusted_domains => 2 set to string 10.0.0.110

encryption enabled

Encryption enabled

Default module: OC_DEFAULT_MODULE

Encryption disabled

Set mode for background jobs to 'cron'


Successfully removed mount from nextcloud's fstab
Installation complete!

View attachment 25777

well, congratz :)
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Several unsuccessful attempts, but finally everything got OK.
Did you change anything between attempts, or just keep trying it over and over? If you changed something, what did you change?
 

ilkor

Dabbler
Joined
Sep 19, 2018
Messages
13
Did you change anything between attempts, or just keep trying it over and over? If you changed something, what did you change?
I did not change anything, just after every attempt I deleted everything, including the script directory
Unfortunately I was not able to make a complete log of the output as was my goal.
 

Scrat_

Explorer
Joined
May 3, 2018
Messages
95
Last night I invaded the personal space of root on my server from Terminal on my Mac. A lil rm -r on freenas-iocages-nextcloud, deleted the nextcloud listing under jails or iocages (I don't remeber), and did a fresh pull off Guthub. As Terminal progressed, I could see the light. Nextcloud now is fully functional for me!

Thanks for everything, DanB35!

Sent from my SM-N950W using Tapatalk
 
Top