Resource icon

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

kwessel

Dabbler
Joined
Mar 30, 2015
Messages
44
I ran your script with Freenas 11.2-RC2. Nextcloud is working fine. I would like to upload documents to Nextcloud via webdav. When I enter https://domain.dlinkddns.com in an offsite browser I get the Nextcloud login screen. If I enter https://domain.dlinkddns.com/public.php/webdav I get this result:

upload_2018-11-29_10-25-50.png


The user name/password generated by the script for the Nextcloud login page does not work. Suggestions?

I get this error after entering a user/name password:


Unauthorized
Technical details
  • Remote Address: (my ip)
  • Request ID: S2Mp08CraVYIcNQxuYx8
 

Attachments

  • upload_2018-11-29_10-16-47.png
    upload_2018-11-29_10-16-47.png
    14.6 KB · Views: 384

danb35

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

Ashima

Dabbler
Joined
Apr 26, 2018
Messages
13
I get "Internal Server Error" when I try to web access nextcloud. I have installed nextcloud 14 using your script on Freenas 11.1 U5. Should I install Freenas 11.2 RC2 to make it work.

What changes should I do to make it work on Freenas 11.1 U5.

Please Help.
 

Ashima

Dabbler
Joined
Apr 26, 2018
Messages
13
Hi,
Since this is a test NAS box... I was using 4GB RAM. Can that be a cause for "Internal Server Error".

Also when I try to access the nextcloud using the IP, an entry is logged in nextcloud.log.

Any pointers ?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I was using 4GB RAM. Can that be a cause for "Internal Server Error".
It's sure not going to help, but the logs from inside the jail (most likely the apache logs) would likely show where the error is.

When did you create the jail. I put fixes in place about a week ago for issues running this on 11.1 versions, so if you ran the script before then, you might want to destroy the jail, clean out the files/ and db/ directories, update the script, and try again.
 

Ashima

Dabbler
Joined
Apr 26, 2018
Messages
13
The last line which is logged in /var/log/httpd-error.log is something like :

" /usr/local/bin/httpd DNOHTTPACCEPT"

Also I am not using ssl (as this is just a test server).
 

Ashima

Dabbler
Joined
Apr 26, 2018
Messages
13
When did you create the jail.

I have downloaded it 2 days back. Since then I must have reinstalled it dozen times.

In fact, I have destroyed the jail.... reinstalled the base freenas again... deleted the volume.... but nothing seems to solve it.
 

Dwight Turner

Explorer
Joined
Oct 13, 2014
Messages
76
This Install Worked perfectly , many thanks!:)
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I am only having an issue with webdav
Can you try creating another user in Nextcloud, and see if that user can log in?
 

Ashima

Dabbler
Joined
Apr 26, 2018
Messages
13
The httpd-error.conf shows :

[Fri Nov 30 12:57:22.285794 2018] [ssl:warn] [pid 2980:tid 34397577216] AH01873:
Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Nov 30 12:57:22.301365 2018] [mpm_event:notice] [pid 2980:tid 34397577216]
AH00489: Apache/2.4.33 (FreeBSD) OpenSSL/1.0.2k-freebsd configured -- resuming n
ormal operations
[Fri Nov 30 12:57:22.301436 2018] [core:notice] [pid 2980:tid 34397577216] AH000
94: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'



The httpd-access.conf shows :

6
192.168.1.3 - - [30/Nov/2018:12:57:41 +0530] "HEAD / HTTP/1.1" 500 -
192.168.1.3 - - [30/Nov/2018:12:57:42 +0530] "\x16\x03\x01\x01\x06\x01" 400 226
192.168.1.13 - - [30/Nov/2018:12:58:40 +0530] "GET / HTTP/1.1" 500 289
192.168.1.13 - - [30/Nov/2018:12:58:40 +0530] "GET /favicon.ico HTTP/1.1" 500 28
9


192.168.1.3 is the freenas box and 192.168.1.13 is my laptop. The nextcloud is 192.168.1.199


Does this ring any bell ? Any Clue.

Please help. I need to complete the testing.
Regards,
Ashima
 

Ashima

Dabbler
Joined
Apr 26, 2018
Messages
13
Latest update....
If I remove nextcloud.conf from /usr/local/etc/apache24/Includes , I get "It Works" page when I access 192.168.1.199 from a browser. This shows my apache24 is working fine. May be some misconfiguration in Nextcloud. Any guess ?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The httpd-error.conf shows :
There shouldn't be any such file; I assume you mean httpd-error.log? Are the lines you posted from there at the time that you tried to access nextcloud? Anything else surrounding them? Anything in /var/log/messages around that time?

If you aren't using SSL at all, the script uses a different nextcloud.conf file; I wonder if there's an error there. Can you try it with the self-signed cert instead and see if that works?

Edit: I've tried it with NO_CERT set under 11.2-RC2, and it works just fine. Haven't had a chance to try it under 11.1 that way yet, though.
 
Last edited:

Ashima

Dabbler
Joined
Apr 26, 2018
Messages
13
Yes, it is httpd-error.log Yes, these lines are posted when I access nextcloud. Also there is an entry in nextcloud.log when I access it. It's pretty long. I can't paste as I am not at location.

Yes I'll try with self signed certificate. Do I have to generate the certificate or the script does it.

PS: Yesterday during one of the installation I was able to access the nextcloud web once.. and then it was giving error in writing in database and my hard disk started showing CAM Status unreachable. So I replaced the hard disk and did the entire installation again. But afterthat never got till there. It gives Internal Server Error every time I try to access Nextcloud.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Yes I'll try with self signed certificate. Do I have to generate the certificate or the script does it.
The script does it.
Should it not be http://192.168.1.199 since I am right now using No-Cert
It probably should; I'll check that out.
Also there is an entry in nextcloud.log when I access it. It's pretty long. I can't paste as I am not at location.
It would probably be helpful to see what that line says when you get back to the location.
 

Ashima

Dabbler
Joined
Apr 26, 2018
Messages
13
Thank you danb for replying so patiently.


nextcloud.log is attached.

I tried with self certificate... still no success. I am getting same error.
Today when I enabled self certificate I got a nextcloud screen but then when I tried to login it said it cannot create the admin user n also some error in database. Also iocage console nextcloud wasn't allowing me in. It was giving libdl.so.1 missing. So I restarted the procedure... after that it is giving back Internal Server error.

Should I try with earlier versions of nextcloud.
 

Attachments

  • tmp.txt
    47.6 KB · Views: 3

Ashima

Dabbler
Joined
Apr 26, 2018
Messages
13
I was going through the nextcloud.log (attached in my prev reply) I guess it is not loading apcu module. Should I disable following command in nextcloud-jail.sh fie

iocage exec ${JAIL_NAME} su -m www -c 'php /usr/local/www/apache24/data/nextcloud/occ config:system:set memcache.local --value="\OC\Memcache\APCu"
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
It was giving libdl.so.1 missing.
That's the telltale sign of problems with the FreeBSD version mismatch, though I thought those were fixed in the script now.
 
Top