How to install NextCloud 12.3 on FreeNAS 11 with all checks passed

twsps

Contributor
Joined
Jul 10, 2018
Messages
113
This is the log when I start mysql-server
Code:
2018-08-04 15:25:14 34424840192 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2018-08-04 15:25:14 34424840192 [Note] InnoDB: Uses event mutexes

2018-08-04 15:25:14 34424840192 [Note] InnoDB: Compressed tables use zlib 1.2.11

2018-08-04 15:25:14 34424840192 [Note] InnoDB: Number of pools: 1

2018-08-04 15:25:14 34424840192 [Note] InnoDB: Using SSE2 crc32 instructions

2018-08-04 15:25:14 34424840192 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M

2018-08-04 15:25:14 34424840192 [Note] InnoDB: Completed initialization of buffer pool

2018-08-04 15:25:15 34424840192 [Note] InnoDB: Highest supported file format is Barracuda.

2018-08-04 15:25:15 34424840192 [Note] InnoDB: Starting crash recovery from checkpoint LSN=49472

2018-08-04 15:25:15 34424840192 [Note] InnoDB: Starting final batch to recover 13 pages from redo log.

2018-08-04 15:25:15 34424840192 [Note] InnoDB: 128 out of 128 rollback segments are active.

2018-08-04 15:25:15 34424840192 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"

2018-08-04 15:25:15 34424840192 [Note] InnoDB: Creating shared tablespace for temporary tables

2018-08-04 15:25:15 34424840192 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wai$

2018-08-04 15:25:15 34424840192 [Note] InnoDB: File './ibtmp1' size is now 12 MB.

2018-08-04 15:25:15 34424840192 [Note] InnoDB: Waiting for purge to start

2018-08-04 15:25:15 34424840192 [Note] InnoDB: 5.7.22 started; log sequence number 1603465

2018-08-04 15:25:15 34586206464 [Note] InnoDB: Loading buffer pool(s) from /var/db/mysql/ib_buffer_pool

2018-08-04 15:25:15 34586206464 [Note] InnoDB: Cannot open '/var/db/mysql/ib_buffer_pool' for reading: No such file or directory

/usr/local/libexec/mysqld: Undefined symbol "fdatasync"
 

crunchy

Cadet
Joined
Aug 11, 2018
Messages
2
Hi, im really new to this. With that said in using the guide i hit a snag. when doing pkg install nano wget sudo i get this.
[root@freenas11 ~]# pkg install nano wget sudo
Updating local repository catalogue...
pkg: Repository local load error: access repo file(/var/db/pkg/repo-local.sqlite
) failed: No such file or directory
pkg: file:///usr/ports/packages/meta.txz: No such file or directory
repository local has no meta file, using default settings
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory
Unable to update repository local
Error updating repositories!

And apache 2.4 will not install. Im using freenas 11 non beta not on a vm. any thoughts?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

crunchy

Cadet
Joined
Aug 11, 2018
Messages
2
Yes, you should be running those commands inside the jail, not at the FreeNAS shell prompt.
heh noobie mistake thanks
okay new problem.
root@nextcloud:/ # mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mys
ql.sock' (2 "No such file or directory")
Enter current password for root (enter for none):

sorry in advance im learning and i have been googling first before asking for help.
 
Last edited:

keboose

Explorer
Joined
Mar 5, 2016
Messages
92
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mys
ql.sock' (2 "No such file or directory")
Enter current password for root (enter for none): [/cmd]
sorry in advance im learning and i have been googling first before asking for help.

Just to be sure, did you start the mysql server with this command?
Code:
service mysql-server start
 

carleycr

Patron
Joined
May 2, 2014
Messages
233
I got to the step of downloading nextcloud and adding the domain information, but I don't see nextcloud installed. I just signed up for a domain through google domains, and I'm assuming I need to setup something in FreeNAS or my network to relate my domain to those components? When I navigate to my jail IP after those steps it still says "It Works".

I also haven't forwarded any ports to my nextcloud jail. I'm assuming this is another prerequisite?
 

keboose

Explorer
Joined
Mar 5, 2016
Messages
92
When I navigate to my jail IP after those steps it still says "It Works".

That means that Apache is likely not set up correctly. Make sure you created the 'yourdomain.com' file in the /usr/local/etc/apache24/Includes directory. The file can have any name, really, just as long as you replace the examples of 'YOURSITE.com' with your actual domain, and the directory /usr/local/www/apache24/data/nextcloud/ is where you extracted the Nextcloud archive.

As for your domain, that is a bit more involved. You will have to get the public IP address of your Freenas computer, then point your domain to that address in the Google control panel. If your server is on your home network, you will also have to forward ports 80 and 443 (if you intend to set up HTTPS) to your jail IP enable access from outside your home network. Be warned that some ISP's block port 80 on residential connections, more or less to discourage us from doing exactly what we're doing here.
 

carleycr

Patron
Joined
May 2, 2014
Messages
233
That means that Apache is likely not set up correctly. Make sure you created the 'yourdomain.com' file in the /usr/local/etc/apache24/Includes directory. The file can have any name, really, just as long as you replace the examples of 'YOURSITE.com' with your actual domain
Thanks for the help. I do have my domain file and the domain.conf file. Still getting error. Would it be advisable to remove those files and re-create?

and the directory /usr/local/www/apache24/data/nextcloud/ is where you extracted the Nextcloud archive.
I understand thats where the files were extracted, but why is the plugin not showing up in FreeNAS GUI? Is there another step I need to do for it to actually install?

As for your domain, that is a bit more involved. You will have to get the public IP address of your Freenas computer, then point your domain to that address in the Google control panel. If your server is on your home network, you will also have to forward ports 80 and 443 (if you intend to set up HTTPS) to your jail IP enable access from outside your home network. Be warned that some ISP's block port 80 on residential connections, more or less to discourage us from doing exactly what we're doing here.
I got my public IP for freenas and applied to my registered hosts in the Google control panel. I forwarded ports on my router. Do I need to do something in my modem settings as well/instead?
 

retoucher

Cadet
Joined
Aug 19, 2018
Messages
2
I am on the 13.0.6 in iocage jail. Would like to update to 14.0.0, but internal updater shows 13.0.6 as the latest. Is manual installation required?
 

keboose

Explorer
Joined
Mar 5, 2016
Messages
92
I understand thats where the files were extracted, but why is the plugin not showing up in FreeNAS GUI?

As far as I'm aware (I never checked mine,) there is no plugin that will appear in the FreeNas GUI. That is reserved for software installed via the plugins tab. Once you are able to access the nextcloud page by visiting your jail's IP, you will be prompted to completed the setup there.

I do have my domain file and the domain.conf file. Still getting error.
Are you saying there are two files in the /usr/local/etc/apache24/Includes directory? There should be only one, with the data mentioned in the guide.

I'm afraid I can't help you any more with your network setup, I have never used the Google DNS service before. As long as you have an A-record set up to point the domain to your public IP, and forward ports 80 and 443 on your local router to your jail, you should be fine. I would also absolutely make sure to set up HTTPS after getting the software going.
 

ric

Contributor
Joined
Dec 22, 2013
Messages
180
So, Im getting following error "/usr/local/bin/mysql: Undefined symbol "fdatasync" if I hit enter for none:

[root@freenas ~]# jexec 8 tcsh
root@owncloud_1:/ # mysql_secure_installation


NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
/usr/local/bin/mysql: Undefined symbol "fdatasync"
Enter current password for root (enter for none):
/usr/local/bin/mysql: Undefined symbol "fdatasync"
Enter current password for root (enter for none):
"
Enter current password for root (enter for none):
/usr/local/bin/mysql: Undefined symbol "fdatasync"
Enter current password for root (enter for none):
 

Loren Zimmer

Dabbler
Joined
May 6, 2017
Messages
25
I've tried installing nextcloud on freenas a couple of times. The first couple I realized that I made some errors on while going through the tutorial. This past time I'm fairly certain that I didn't make any errors along the way however I'm not able to access next cloud after preparing the secure portion of next cloud. This is the text that is displayed by entering the local ip of the jail as well as fqdn:

Code:
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 server log.


This is what I've found in the /var/log/httpd-error.log file:

Code:
[Sat Nov 24 23:49:05.272465 2018] [ssl:warn] [pid 75541] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Nov 24 23:49:05.324397 2018] [mpm_prefork:notice] [pid 75541] AH00163: Apache/2.4.35 (FreeBSD) OpenSSL/1.0.2o-freebsd PHP/7.1.24 configured -- resuming normal operations
[Sat Nov 24 23:49:05.324426 2018] [core:notice] [pid 75541] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Sat Nov 24 23:51:01.514652 2018] [mpm_prefork:notice] [pid 75541] AH00169: caught SIGTERM, shutting down


Does anyone have suggestions on what I need to do to track down the problem?

Thanks,

Loren
 

onur

Dabbler
Joined
Feb 16, 2016
Messages
14
thanks to this guide/previous sources, I am using Nextcloud 15 under jail @ Freenas 11.2 :) Nextcloud suggests to install "imagick". Anyone know how to do it? My php is 7.1, but could not find a guide on the net. Thank you.
just found the solution:
Code:
pkg install php71-pecl-imagick


from https://www.freshports.org/graphics/pecl-imagick
 
Last edited:

geekmiki

Dabbler
Joined
Mar 10, 2015
Messages
13
I've tried installing nextcloud on freenas a couple of times. The first couple I realized that I made some errors on while going through the tutorial. This past time I'm fairly certain that I didn't make any errors along the way however I'm not able to access next cloud after preparing the secure portion of next cloud. This is the text that is displayed by entering the local IP of the jail as well as fqdn:

Code:
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 server log.


This is what I've found in the /var/log/httpd-error.log file:

Code:
[Sat Nov 24 23:49:05.272465 2018] [ssl:warn] [pid 75541] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Nov 24 23:49:05.324397 2018] [mpm_prefork:notice] [pid 75541] AH00163: Apache/2.4.35 (FreeBSD) OpenSSL/1.0.2o-freebsd PHP/7.1.24 configured -- resuming normal operations
[Sat Nov 24 23:49:05.324426 2018] [core:notice] [pid 75541] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Sat Nov 24 23:51:01.514652 2018] [mpm_prefork:notice] [pid 75541] AH00169: caught SIGTERM, shutting down


Does anyone have suggestions on what I need to do to track down the problem?

Thanks,

Loren

Exact same problem here. Any help would be appeciated.
 

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
I've tried installing nextcloud on freenas a couple of times. The first couple I realized that I made some errors on while going through the tutorial. This past time I'm fairly certain that I didn't make any errors along the way however I'm not able to access next cloud after preparing the secure portion of next cloud. This is the text that is displayed by entering the local IP of the jail as well as fqdn:

Code:
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 server log.


This is what I've found in the /var/log/httpd-error.log file:

Code:
[Sat Nov 24 23:49:05.272465 2018] [ssl:warn] [pid 75541] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Nov 24 23:49:05.324397 2018] [mpm_prefork:notice] [pid 75541] AH00163: Apache/2.4.35 (FreeBSD) OpenSSL/1.0.2o-freebsd PHP/7.1.24 configured -- resuming normal operations
[Sat Nov 24 23:49:05.324426 2018] [core:notice] [pid 75541] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Sat Nov 24 23:51:01.514652 2018] [mpm_prefork:notice] [pid 75541] AH00169: caught SIGTERM, shutting down


Does anyone have suggestions on what I need to do to track down the problem?

Thanks,

Loren
Check the Nextcloud log file not the apache log file; my bet is that you haven't configured Redis properly. from memory it should be in /var/log/nextcloud/nextcloud.log, or something similar
 

geekmiki

Dabbler
Joined
Mar 10, 2015
Messages
13
Check the Nextcloud log file not the apache log file; my bet is that you haven't configured Redis properly. from memory it should be in /var/log/nextcloud/nextcloud.log, or something similar

nextcloud.log is in /usr/local/www/apache24/data/nextcloud/data (nothing in /var/log/) and the log is empty, so no clues to get there.
I've just followed the guide on the first page, so if Redis is not configured properly, something is missing in the guide. The redis.log doesn't report any errors.
 

tamilmad

Dabbler
Joined
Oct 20, 2015
Messages
36
Thanks for the guide. I used the same and installed nextcloud 15.0.5 without any problems including https access. Thanks once again. But a litle bit of juggling of the steps are needed specially for https access. For example the steps of certbot and certificate generation has to be done before the Virtual host 443 configuration.

Also I had errors in configuring redis cache (this step
su -m www -c 'php /usr/local/www/apache24/data/nextcloud/occ config:system:set redis host --value="/tmp/redis.sock"')
So I am using APCu cache and not redis cache. I do not know the effect of the same but the nextcloud is running fine.
 
Last edited:

tamilmad

Dabbler
Joined
Oct 20, 2015
Messages
36
I've tried installing nextcloud on freenas a couple of times. The first couple I realized that I made some errors on while going through the tutorial. This past time I'm fairly certain that I didn't make any errors along the way however I'm not able to access next cloud after preparing the secure portion of next cloud. This is the text that is displayed by entering the local IP of the jail as well as fqdn:

Code:
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 server log.


This is what I've found in the /var/log/httpd-error.log file:

Code:
[Sat Nov 24 23:49:05.272465 2018] [ssl:warn] [pid 75541] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Nov 24 23:49:05.324397 2018] [mpm_prefork:notice] [pid 75541] AH00163: Apache/2.4.35 (FreeBSD) OpenSSL/1.0.2o-freebsd PHP/7.1.24 configured -- resuming normal operations
[Sat Nov 24 23:49:05.324426 2018] [core:notice] [pid 75541] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Sat Nov 24 23:51:01.514652 2018] [mpm_prefork:notice] [pid 75541] AH00169: caught SIGTERM, shutting down


Does anyone have suggestions on what I need to do to track down the problem?

Thanks,

Loren
I also faced this error. In my case this error was due to errors while configuring redis cache. So I have let the cache in config.php as APUc only and restarted Apache24 and I was able to access Nextcloud
 

tamilmad

Dabbler
Joined
Oct 20, 2015
Messages
36
thanks to this guide/previous sources, I am using Nextcloud 15 under jail @ Freenas 11.2 :) Nextcloud suggests to install "imagick". Anyone know how to do it? My php is 7.1, but could not find a guide on the net. Thank you.
just found the solution:
Code:
pkg install php71-pecl-imagick


from https://www.freshports.org/graphics/pecl-imagick
Thanks. I also had the same issue and was struggling to find the pkg.
 
Top