Nextcloud internal server error after upgrade

How to use GitHub Please use the 👍 reaction to show that you are affected by the same issue. Please don't comment if you have no relevant information to add. It's just extra noise for every...

Thanks for your feedback 👍

I simply decided it wasn’t worth it to continue (or to sift through a 40MB log file with several lines of sensitive information), after reading text like the quoted text above

@rolandixor you are referring to «Reports without logs might be closed as unqualified reports!»? I agree with you to use a better wording. I added the comment because many people just ignore this part of the issue template. It was my intention to point out how important logs are.

Obviously, people are going to head over to the bug tracker, thinking that at least they may be able to simultaneously get assistance while helping to improve the project by smashing another previously unnoticed bug.

@rolandixor I’m glad that people are reporting bugs. Triaging issue reports is hard. I don’t have access to your machine. We have to work with the information provided by you. The information you provided is: Internal server error after upgrading from Nextcloud 18 to 19. It’s not possible to reproduce this error without more context.

But the language that you encounter at various points basically gives the impression that if you’re not a big company with money to burn, you better be an expert developer who knows what they’re doing, or just simply don’t use the product at all.

@rolandixor Mind to link some examples? I’m sure we can improve the used language.

Yes you did by quoting the template «requires the log», which contains sensitive information according to the GDPR. Update that to «the according error message within the log» and I wouldn’t jump on you.

@Pingger Fine by me. Mind to suggest a improved version? https://github.com/nextcloud/server/edit/master/.github/ISSUE_TEMPLATE/Bug_report.md

specifically you are one time asking for an «error log» and one time just for the «log», which heavily implies you mean the entire log in that case. I also don’t see any reminder, that one should remove any sensitive information contained in that log.

@Pingger Also fine by me. A better issue template helps everyone. My impression is that the majority of users understand what we are asking for. For most issues the actual error message should be enough. It’s unusual (and unnecessary in most cases) to upload the complete log. What most people do: Open the log, look for repeating entries, remove sensitive information and post it. It’s your responsibility to remove sensitive information if you share logs.

Additionally your issue template asks for far too many irrelevant information! The Client OS and Browser as well as the Browser-Logs are entirely irrelevant for an «Internal Server Error». you ONLY allowed to delete the LDAP section.

@Pingger The issue template is a starting point. It’s there to help you (and us). You are free to use a different version. That’s actually happening every day. For example:

  • https://github.com/nextcloud/server/issues/22152 I find it a bit harder to read (as the other reports) because the format is different (or unexpected to me) but it’s fine.
  • https://github.com/nextcloud/server/issues/22127 In this case the image makes it much easier to understand the problem. For such a report logs are not required.

I guess there is not the perfect issue template. It always depends on the issue itself. A good report is usually (a clear description what is wrong or a error message) and steps how to reproduce.

And how the F are you supposed to report the signing status if you can’t access the nextcloud?!

@Pingger Most people write something like «I’m unable to login and cannot access the signing status».

A It looks more like a «we don’t care and we make up arbitrary rules to more easily close important issues without actually acknowleding the bugs behind them»

@Pingger Asking for error messages is not arbitrary. As said above without more context it’s hard to judge if a bug is important or not (like this report).

just so we have less issues to deal with

@Pingger Why do you think the number of open issues is important? It does not matter if there are 2400 or 3000 open issues. But I don’t see the point to keep issues open we are unable to reproduce because the context is missing.

but honestly a bit more information would have been nice. e.g. the list of «activated apps» command should return something and the «config report» should also return something. The questions for encryption and external storage might also be relevant to the issue.

@Pingger fine by me. I’m not sure how to add this and the other points we talked about to the issue template. Often people complain about the issue template because it’s to many text already. If we add comments to each point that’s even more text. Unfortunately the issue templates on GitHub are not flexible. But some comments like <!-- If the issue happens in Firefox and Chrome skip Client configuration section --> might be a start. I’m looking forward to your suggestions.

many questions posted on the forums simply get ignored or never get answers.

https://help.nextcloud.com/t/how-much-the-support-forum-could-improve/88399 seems a discussion about this topic.

the behaviour of the contributors in other issues and the behaviour in the forums you mentioned: You don’t at all feel welcome.

@rolandixor @Pingger Sorry to hear that. Many (including me) contribute to Nextcloud in their spare time. A few people also work for Nextcloud GmbH (a company offering support for Nextcloud). About two weeks ago I had a similar encounter on GitHub. I was not friendly enough and things escalated. As said I contribute to Nextcloud in my spare time and I’m not looking for trouble in my spare time. After this encounter I decided to changed my strategy. Before I often responded to issues, asked for additional information, reminded people to use the issue template or closed issues if they are not reproducible (like in your case). I’m not doing this anymore. If a report does not contain clear steps how to reproduce and/or other information required to reproduce a problem I go ahead. That’s much easier and less trouble for me.

@rolandixor if it’s important to you I can reopen this issue or you create another one. But with the provided information it’s definitely not possible to triage it.

@Pingger I’m not sure why you joined this discussion. If you have a problem feel to create a issue. It’s fine to adjust the issue template for your problem and remove all sensitive information from the logs.

Содержание

  1. Internal Server Error в Nextcloud
  2. Nextcloud 13 — New Instalation 500 Internal Server Error #8406
  3. Comments
  4. Steps to reproduce
  5. Expected behaviour
  6. Actual behaviour
  7. Server configuration
  8. Internal Server Error #13597
  9. Comments
  10. Steps to reproduce
  11. Expected behaviour
  12. Actual behaviour
  13. Server configuration
  14. Client configuration
  15. Web server error log
  16. Nextcloud log (data/nextcloud.log)
  17. Browser log
  18. [Nextcloud 14] Internal Server Error #11205
  19. Comments
  20. Internal Server Error #911
  21. Comments

Internal Server Error в Nextcloud

Убрать ошибку “Internal Server Error” в Nextcloud

Уже сталкивался с ошибкой в статье “Ошибка nextcloud — 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.

Немного информации о сервере:

  • FreeBSD 13.0 release p4
  • Nginx 1.20.1
  • PHP 8.0.11
  • MariaDB 10.5.12
  • Redis 6.0.15
  • memcached
  • APCu
  • OPcache

Кеширование Nextcloud (часть конфига nextcloud)

Я сразу проверил службы отвечающие за кеш

Проверяем конфиг Редиса

Проверяем лог Redis

Файлы .rdb – это дампы на диске для резервного копирования или сохранения. Их можно безопасно удалить, конечно в рамках решения проблем c nextcloud, ну а сама база данных Redis полностью находится в памяти.

Удаляем файлы и пробуем запустить

Как видим, dump файл заново создался. Проверяем работу Nextcloud, всё работает

Источник

Nextcloud 13 — New Instalation 500 Internal Server Error #8406

Steps to reproduce

I’ve installed Nextcloud 13 with the following procedure:

apt-get install apache2 mariadb-server -y
systemctl start apache2
systemctl enable apache2
systemctl start mysql
systemctl enable mysql
apt-get install php7.1-xml php7.1 php7.1-cgi php7.1-cli php7.1-gd php7.1-curl php7.1-zip php7.1-mysql php7.1-mbstring wget unzip -y
mysql_secure_installation

created a database named «nextclouddb» and a user ‘nextcloud’@’localhost’.
Downloaded and unpacked nextcloud 13 then:

chown -R www-data:www-data /var/www/html/nextcloud/

sudo -u www-data php7.1 occ maintenance:install —database mysql —database-name nextclouddb —database-user nextcloud —admin-user admin

configured config.php and then:

sudo -u www-data php /var/www/html/nextcloud/occ maintenance:update:htaccess
sudo systemctl restart apache2

Expected behaviour

When I connect from my browser to http://127.0.0.1/nextcloud or http://localhost/nextcloud I should see the nextcloud start page.

Actual behaviour

Here is the error on the browser:

  • @author Joas Schilling * @author Jörn Friedrich Dreyer * @author Lukas Reschke * @author Morris Jobke * @author Robin Appelman * @author Sergio Bertolín * @author Thomas Müller * @author Vincent Petry * * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see * */ require_once DIR . ‘/lib/versioncheck.php’; try < require_once DIR . ‘/lib/base.php’; OC::handleRequest(); > catch(OCServiceUnavailableException $ex) < OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’)); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); OC_Template::printExceptionErrorPage($ex); > catch (OCHintException $ex) < OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); try < OC_Template::printErrorPage($ex->getMessage(), $ex->getHint()); > catch (Exception $ex2) < OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’)); OC::$server->getLogger()->logException($ex2, array(‘app’ => ‘index’)); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); > > catch (OCUserLoginException $ex) < OC_Response::setStatus(OC_Response::STATUS_FORBIDDEN); OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage()); > catch (Exception $ex) < OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’)); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); > catch (Error $ex) < try < OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’)); > catch (Error $e) < $claimedProtocol = strtoupper($_SERVER[‘SERVER_PROTOCOL’]); $validProtocols = [ ‘HTTP/1.0’, ‘HTTP/1.1’, ‘HTTP/2’, ]; $protocol = ‘HTTP/1.1’; if(in_array($claimedProtocol, $validProtocols, true)) < $protocol = $claimedProtocol; >header($protocol . ‘ 500 Internal Server Error’); header(‘Content-Type: text/plain; charset=utf-8’); print(«Internal Server Errornn»); print(«The server encountered an internal error and was unable to complete your request.n»); print(«Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.n»); print(«More details can be found in the webserver log.n»); throw $e; > OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); >

Server configuration

Here is my config.php:

Operating system:

Web server:
Apache 2

Database:

PHP version:

Nextcloud version: (see Nextcloud admin page)

Updated from an older Nextcloud/ownCloud or fresh install:

The text was updated successfully, but these errors were encountered:

Источник

Internal Server Error #13597

Steps to reproduce

Visit your website

Expected behaviour

I expect a login screen.

Actual behaviour

I get this error:

The file /var/www/nextcloud/lib/private/Files/Node/Node.php exists.

Server configuration

Operating system: Ubuntu 16.04

Web server: Apache2

Database: mariaDB (& redis)

PHP version: 7.0.32

Nextcloud version: 15

Updated from an older Nextcloud/ownCloud or fresh install: from 14

Where did you install Nextcloud from: What does this question mean?

Signing status: What does this question mean?

I can’t do that because I can’t log in.

List of activated apps:

Nextcloud configuration:

Are you using external storage, if yes which one: local/smb/sftp/.

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/.

Client configuration

Browser:

Operating system:

Web server error log

Nextcloud log (data/nextcloud.log)

Browser log

The text was updated successfully, but these errors were encountered:

Same issue here, I first upgraded from Ubuntu 16.04 to 18.04 then used the upgrader in nextcloud web to upgrade from 13 to 14. I now have exactly the same issues. My mobile nextcloud app although still works fine. So I guess it has something to do with the changes from PHP 7.0 to 7.2.

I’m still stuck. Did you already found a solution?

Nextcloud
Interne serverfout

De server was niet in staat je aanvraag te verwerken.

Stuur de hieronder afgebeelde technische details naar de server beheerder wanneer dit opnieuw gebeurt.

Meer details in de serverlogging,
Technische details

Источник

[Nextcloud 14] Internal Server Error #11205

I have installed Nextcloud and was working for a few hours and then it’s showing an Internal Server Error. I have checked the server log and haven’t found what’s the problem.

BTW, I have other apps working fine. The issue is just with nextcloud 14.

Client Error

Server Log

The text was updated successfully, but these errors were encountered:

Your server log is incomplete. Can you please post more content of your server log?
Have a look at it with «less» or «cat» and not with «vi».

And check first that your database is reachable if you use MySQL or PostgreSQL.

This also happens for me, during first time LDAP login. The error logs are:

$ name = $ user -> getBackendClassName ();

GitMate.io thinks possibly related issues are #6839 (Nextcloud got internal Server error after update APP:OnlyOFFICE, need to remove this APP completely), #2741 (Calendar app: internal server error after upgrading to Nextcloud 11), #7622 (NextCloud Server Listener ), #8326 (Internal Server Error (Template not found) when loading Calendar after upgrade to Nextcloud 13.x), and #5056 (nextcloud 12 upgrade error).

I’m pretty sure I stumbled across this issue this morning. I had added a user through the IMAP verification, and then it disappeared from the users list and when I try logging in to the account, it errors. There is no sign of the account in the users list or under occ user:info [username] .

Источник

Internal Server Error #911

Running Docker container latest . Everything was working fine (apps installed, mobile connected, etc), until I moved the volume files to a larger volume 10GB to 50GB, and then:

Pretty useless error message and I have NO idea where to find server log . I’m not even sure what filename I’m looking for. There is a file under nextcloud_nextcloud/_data named nextcloud.log . Is that the server log ? I’ve tried removing that file to see if it would be re-created and/or update after a restart of the container and a refresh of the error page, but nothing.

sure I could just start all over again, but fyi, this is the second time I’ve tried using Nextcloud (the first was a few years ago) and I recall having the same issue back then; Internal Server Error and nothing else in terms of error details. I guess this is fine for the end-user, they just call the admin, but where’s the support for the admin? I would love nothing more than for this open-source cloud solution to work, but if nextcloud is really this fragile, then I guess its just not the solution I’m looking for. Back to Google?? (ugh!)

Obviously pretty disappointed by this, but any and all support are very much appreciated.
Cheers!

EDIT:
Went back through the docs to find mention of a Nextcloud Server Log File. Does this file NOT exist unless its enabled in the Admin Page??

Also, when I connect to the container and try to view the Webserver Log Files, this is what I get:

Does this get written somewhere on the host? This could just be a docker thing, I’m really not sure, but either way, it would be nice to find these log files, and eventually solve «Internal Server Error».

The text was updated successfully, but these errors were encountered:

Источник

I upgraded my server today from Debian 9 to Debian 10 and installed PHP 7.3 with all modules needed for NC but when I try to open the website I get «internal server error. More details can be found in the server log» but there is nothing helpful (for me).

So please tell me where I can find information what problem my Nextcloud has. Other PHP based sites on same server are working fine.
Here some details and log entrys from the server:

  • PHP 7.3.24
  • OS Debian 10.6
  • Apache 2.4.38
  • Nextcloud 16.0.11

nextcloud error log (debug level):

[Sat Nov 14 12:39:40.862690 2020] [proxy:debug] [pid 30052:tid 140451933021952] proxy_util.c(2406): [client 87.172.229.216:64468] AH02545: fcgi: has determined UDS as /run/php/php7.3-fpm.sock, referer: https://myDomain.de/
[Sat Nov 14 12:39:40.862857 2020] [proxy:debug] [pid 30052:tid 140451933021952] proxy_util.c(2578): [client 87.172.229.216:64468] AH00947: connected /var/www/html/nextcloud/index.php to httpd-UDS:0, referer: https://myDomain.de/
[Sat Nov 14 12:39:40.862916 2020] [proxy:debug] [pid 30052:tid 140451933021952] proxy_util.c(2949): AH02823: FCGI: connection established with Unix domain socket /run/php/php7.3-fpm.sock (*)
[Sat Nov 14 12:39:40.874073 2020] [proxy:debug] [pid 30052:tid 140451933021952] proxy_util.c(2331): AH00943: FCGI: has released connection for (*)
[Sat Nov 14 12:39:40.874123 2020] [http2:debug] [pid 30052:tid 140451933021952] h2_task.c(87): [client 87.172.229.216:64468] AH03348: h2_task(64-15): open output to GET myDomain.de /index.php
[Sat Nov 14 12:39:40.874262 2020] [http2:debug] [pid 30052:tid 140451916187392] h2_session.c(1387): [client 87.172.229.216:64468] AH03073: h2_stream(64-15,HALF_CLOSED_REMOTE): submit response 500, REMOTE_WINDOW_SIZE=12582912
[Sat Nov 14 12:39:40.874298 2020] [http2:debug] [pid 30052:tid 140451916187392] h2_session.c(1541): [client 87.172.229.216:64468] AH02936: h2_stream(64-15,HALF_CLOSED_REMOTE): resumed
[Sat Nov 14 12:39:40.874326 2020] [http2:debug] [pid 30052:tid 140451916187392] h2_session.c(593): [client 87.172.229.216:64468] AH03068: h2_session(64,BUSY,1): sent FRAME[HEADERS[length=67, hend=1, stream=15, eos=0]], frames=10/4 (r/s)
[Sat Nov 14 12:39:40.874369 2020] [http2:debug] [pid 30052:tid 140451916187392] h2_session.c(593): [client 87.172.229.216:64468] AH03068: h2_session(64,BUSY,1): sent FRAME[DATA[length=289, flags=1, stream=15, padlen=0]], frames=10/5 (r/s)
[Sat Nov 14 12:39:40.874484 2020] [http2:debug] [pid 30052:tid 140451916187392] h2_bucket_beam.c(1279): [client 87.172.229.216:64468] beam(64-15,output,closed=1,aborted=1,empty=1,buf=0): AH03385: h2_task_destroy, reuse secondary
[Sat Nov 14 12:39:40.874545 2020] [http2:debug] [pid 30052:tid 140451916187392] h2_session.c(1698): [client 87.172.229.216:64468] AH03078: h2_session(64,IDLE,0): transit [BUSY] -- no io (keepalive) --> [IDLE]
[Sat Nov 14 12:39:40.879559 2020] [http2:debug] [pid 30052:tid 140451899385600] h2_session.c(341): [client 87.172.229.216:64468] AH03066: h2_session(64,IDLE,0): recv FRAME[SETTINGS[ack=1, stream=0]], frames=10/5 (r/s)
[Sat Nov 14 12:39:45.879604 2020] [http2:debug] [pid 30052:tid 140451907786496] h2_session.c(593): [client 87.172.229.216:64468] AH03068: h2_session(64,IDLE,0): sent FRAME[GOAWAY[error=0, reason='timeout', last_stream=15]], frames=11/6 (r/s)
[Sat Nov 14 12:39:45.879797 2020] [http2:debug] [pid 30052:tid 140451907786496] h2_session.c(753): [client 87.172.229.216:64468] AH03069: h2_session(64,IDLE,0): sent GOAWAY, err=0, msg=timeout
[Sat Nov 14 12:39:45.879838 2020] [http2:debug] [pid 30052:tid 140451907786496] h2_session.c(1698): [client 87.172.229.216:64468] AH03078: h2_session(64,DONE,0): transit [IDLE] -- local goaway --> [DONE]
[Sat Nov 14 12:39:45.879849 2020] [http2:debug] [pid 30052:tid 140451907786496] h2_session.c(1698): [client 87.172.229.216:64468] AH03078: h2_session(64,CLEANUP,0): transit [DONE] -- pre_close --> [CLEANUP]
[Sat Nov 14 12:39:45.880031 2020] [ssl:debug] [pid 30052:tid 140451907786496] ssl_engine_io.c(1106): [client 87.172.229.216:64468] AH02001: Connection closed to child 65 with standard shutdown (server myDomain.de:443)

Nextcloud access log

[14/Nov/2020:12:35:09 +0100] "GET /status.php HTTP/1.1" 500 -
[14/Nov/2020:12:35:09 +0100] "GET /status.php HTTP/1.1" 500 -
[14/Nov/2020:12:35:41 +0100] "GET /status.php HTTP/1.1" 500 -
[14/Nov/2020:12:35:41 +0100] "GET /status.php HTTP/1.1" 500 -


Description


O. Hartmann



2021-07-13 17:47:04 UTC

running www/nextcloud (php74) on FreeBSD 12.2-RELENG-p9. System is mainatined with official FreeBSD packages (nothing home-brewn).

After the recent upgrade of the ports (including php74, Apache and Nextcloud (from21.X.X to 22.0.0), the nextcloud service is corrupted: the Apache server reports the request could not served, contact administrator. Checking the log /var/log/httpd-error.log when requesting I see

[...]
[Tue Jul 13 17:22:15.847179 2021] [authz_core:error] [pid 71606] [client xxx.xxx.xxx.xxx:48910] AH01630: client denied by server configuration: /usr/local/www/apache24/data/csrftoken
[Tue Jul 13 17:22:16.110620 2021] [authz_core:error] [pid 66249] [client xxx.xxx.xxx.xxx:11753] AH01630: client denied by server configuration: /usr/local/www/apache24/data/login
[...]

and /var/log/httpd-access.log

[...]
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:41 +0000] "GET /cloud/index.php/login HTTP/1.1" 500 16855
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/core/js/dist/files_fileinfo.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/apps-pkg/files_sharing/l10n/de_DE.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/core/l10n/de_DE.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/core/js/dist/files_client.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/core/js/dist/main.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/apps/apporder/l10n/de_DE.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/apps-pkg/files_sharing/js/dist/main.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/apps/apporder/js/apporder.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/apps/epubreader/l10n/de_DE.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/apps/epubreader/js/plugin.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/apps-pkg/files_videoplayer/js/main.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/apps-pkg/files_rightclick/l10n/de_DE.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/apps-pkg/files_rightclick/js/script.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/apps-pkg/files_rightclick/js/files.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/apps-pkg/theming/l10n/de_DE.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/apps-pkg/theming/js/theming.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/core/js/dist/login.js?v=1db512a4-5 HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/core/img/loading-dark.gif HTTP/1.1" 304 -
xxx.xxx.xxx.xxx - - [13/Jul/2021:17:43:43 +0000] "GET /cloud/core/img/actions/toggle.svg HTTP/1.1" 304 -
[...]


It looks like the documentroot is some kind of weird, since the nextcloud's document root is located not in /usr/local/www/apache24/data!

Anyway, when upgrading nextcloud via

su -m www -c 'php ./occ upgrade'

nothing unusual has been observed except the fact that when it came to updating apps, the connection to the app store seemed to have timed out, there was a further unnoticed error of the php script and I simply restarted the procedure as shown above and then it went through all steps. After that, restarting Apache, the server quit the request with not servicing nextcloud content. I checked the log and revealed the above and issued the command:

root@websrv:/usr/local/www/nextcloud # su -m www -c "php ./occ maintenance:update:htaccess"
Error updating .htaccess file, not enough permissions or "overwrite.cli.url" set to an invalid URL?

I searched the web for this error and found that one has to set overwrite.cli.url to the URL in config/config.php, but this object has never been set before and even setting it either to the local (IP based) or fully qualified URL doe not solve anything. Further, some tell that the access rights need to be adjusted to the owner of the running apache (www:www) but on which .htaccess file and where is a big mystery of internet sloppyness. Most of them are not usefull.


The access rights of .htaccess file located in the data folder for nextcloud is www:www and untouched, also the .htaccess file located in /usr/local/www/nextcloud/config.

/usr/local/etc/apache24/httpd.conf is untouched, so the (prior to the update working) .conf file in  /usr/local/etc/apache24/Includes.


Now, with this next painin the arse, I'mfloating like a deadman in the water with nextcloud on freeBSD :-(


Comment 1


Thibault Payet



2021-07-13 17:52:57 UTC

I think this is due to the auto plist
 * Auto-generate plist

Normally nextcloud install with user www, but now it is with root


Comment 2


Bernard Spil


freebsd_committer


2021-07-13 18:28:45 UTC

Hi,

This is not a result of the plist changes, it has never been writable for WWWOWN or WWWGROUP (see e.g. 2021Q2 branch). What changes in that no .htaccess is supplied by default.

> @(,%%NEXTCLOUD_GROUPNAME%%,644) %%WWWDIR%%/.htaccess

The nextcloud directory is also not writable, trying to create .htaccess will therefore fail. Apart from the apps, config and data dirs are also writable, and have been from before I took maintainership.

11.0.1 in 2017:
https://github.com/freebsd/freebsd-ports/blob/3c92fae2de5ab542780f9b2b466fa58855301ab0/www/nextcloud/pkg-plist#L1
https://github.com/freebsd/freebsd-ports/blob/3c92fae2de5ab542780f9b2b466fa58855301ab0/www/nextcloud/pkg-plist#L10787

The whole purpose of the Nextcloud port in FreeBSD is that your webserver (or FastCGI/PHP binaries) should NOT have write-access to anything it serves. Any write access is thus considered a security issue. I revoke write access to htaccess and config on my local install, and allow write only when it's required, data is stored outside of WWWDIR.

If you have no issue with these things being writable, I encourage you to download the tarball, unpack it into /usr/local/www/nextcloud and `chown -R www` the nextcloud dir. This will also enable the bundled app install and updater to work as expected.

With kind regards, Bernard.


Comment 3


O. Hartmann



2021-07-13 19:16:04 UTC

(In reply to Bernard Spil from comment #2)


I beg your pardon, please? Why are you closing this PR? This is not about an ACL that is mssing, not set or something similar, it is about an upgrade from a former, WORKING! installation towards a regular FreeBSD-pkg based update that wrecks an installation!
If this is "works as intended/expected", then I'd like to feel free to call it sabotage.


Comment 4


O. Hartmann



2021-07-13 19:24:20 UTC

I have no intention to make the port's installation directory writeable as this is considered a serious security issue. The standard is fine for me.

I try to figure out what the differences are between 22.0.0.11 and its predecessor, 21.0.2.1. Something must have changed, otherwise the upgrade wouldn't end up in a nonworking installation and the maintenance script in question could fix the problem - which it does not. So I consider this a bug - not a work as intended.


Comment 5


Bernard Spil


freebsd_committer


2021-07-13 20:29:00 UTC

This probably violates the principal of least astonishment, but is intended. The "upgrade" pkg message reflects this.

> After a version migration you should upgrade your nextcloud instance
> using command line:
>
>   cd %%WWWDIR%%
>   su -m www -c "php ./occ upgrade"
>
> Merge any changes to %%WWWDIR%%/.htaccess.dist into .htaccess (above the
> '#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####' divider if it exists)
> and update the dynamic part of the file using the commandline:
> 
>  su -m www -c "php ./occ maintenance:update:htaccess"

21.0.3: .htaccess is created, has uid 0, gid WWWGRP, mode 644
22.0.0: .htaccess is no longer created

> su -m www -c "php ./occ maintenance:update:htaccess"

can only have succeeded if in 21.0.3 your .htaccess was either owned by WWWOWN, writable by WWWGRP, or writable for all.

To test, create the .htaccess file with the appropriate permissions as for 21.0.3

> install -o 0 -g 80 -m 644 /dev/null /usr/local/www/nextcloud/.htaccess

then run the maintenance:update:htaccess command again. This should fail on permissions.

This patch restores the old behavior:

diff --git a/www/nextcloud/pkg-plist b/www/nextcloud/pkg-plist
index 91918518542f..7b8a705bcc95 100644
--- a/www/nextcloud/pkg-plist
+++ b/www/nextcloud/pkg-plist
@@ -1,3 +1,3 @@
-@(,%%NEXTCLOUD_GROUPNAME%%,644) %%WWWDIR%%/.htaccess.dist
+@sample(,%%NEXTCLOUD_GROUPNAME%%,644) %%WWWDIR%%/.htaccess.dist %%WWWDIR%%/.htaccess
 @(%%NEXTCLOUD_USERNAME%%,%%NEXTCLOUD_GROUPNAME%%,664) %%WWWDIR%%/.user.ini
 @sample %%WWWDIR%%/config/config.sample.php %%WWWDIR%%/config/config.php


Comment 7


Bernard Spil


freebsd_committer


2021-07-13 20:36:07 UTC

There will be an .htaccess at install now,
and it will not clobber modified .htaccess on uninstall


Comment 8


O. Hartmann



2021-07-13 20:55:14 UTC

(In reply to Bernard Spil from comment #7)

F... mid-air collision ...


Comment 9


O. Hartmann



2021-07-13 21:00:10 UTC

The problem is NOT the missing .htaccess (sorry, I have mistaken the hint of nextcloud's php framework as the source of the problem).

The problem is, after an successful upgrade, a non working nextcloud instance, giving the error:

[...]
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
[some cryptic hash]
[...]

The log then states for the hashcode:

[...]


Comment 10


O. Hartmann



2021-07-13 21:05:13 UTC

[...]
{"reqId":"sOt2yLAvU7VezWeqnemo","level":3,"time":"2021-07-13T21:01:31+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"--","app":"index","method":"GET","url":"/cloud/index.php/login","messa
ge":"Class 'OCP\User' not found","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:90.0) Gecko/20100101 Firefox/90.0","version":"22.0.0.11","exception":{"Exception":"Error","Message":"C
lass 'OCP\User' not found","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps/epubreader/lib/Hooks.php","line":41,"function":"get","class":"OCA\Epubreader\Config","type":"::"},
{"file":"/usr/local/www/nextcloud/lib/private/legacy/OC_Hook.php","line":106,"function":"announce_settings","class":"OCA\Epubreader\Hooks","type":"::"},{"file":"/usr/local/www/nextclo
ud/lib/private/Template/JSConfigHelper.php","line":323,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/usr/local/www/nextcloud/lib/private/TemplateLayout.php","line":220,"fun
ction":"getConfig","class":"OC\Template\JSConfigHelper","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/legacy/OC_Template.php","line":182,"function":"__construct","class":
"OC\TemplateLayout","type":"->"},{"file":"/usr/local/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php","line":204,"function":"fetchPage","class":"OC_Template","type":"->
"},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":171,"function":"render","class":"OCP\AppFramework\Http\TemplateResponse","type":"->"},{"file
":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/usr/local/www/nextclou
d/lib/private/Route/Router.php","line":301,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1000,"function":"match",
"class":"OC\Route\Router","type":"->"},{"file":"/usr/local/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/local/www/nextcloud/ap
ps/epubreader/lib/config.php","Line":28,"CustomMessage":"--"}}
[...]


Hopefully, this will point to the problem, not that .htaccess incident, which is something I probably messed up with by the headline (changed).


Comment 11


O. Hartmann



2021-07-13 21:29:35 UTC

Problem identified and solved. 

Please revert the revert of the patch for .htaccess, since it is not causing the problem.

The problem has been caused by a rogue app.


Comment 12


Bernard Spil


freebsd_committer


2021-07-14 18:01:15 UTC

Thanks for the confirmation.

As the .htaccess file is not writable by WWWOWN or WWWGRP, I see no need to revert the change. May prevent some issues and the having dist as sample makes some sense.

Cheers, Bernard.

Hello,

I can’t get nextcloud work anymore. Have read the wiki again and again. But there are so many things remaining unclear.
I’m trying to setup nextcloud with apache, php-fpm and postgresql.
Maybe its a problem of my bad english …

After updating to nextcloud 21.0.1 I changed the owner my data and config directory

# chown -R nextcloud:nextcloud /data/nextcloud/ 
# chown -R nextcloud:nextcloud /etc/webapps/nextcloud/config/

The /etc/php/php-fpm.conf contains only a few lines …

[global]
error_log = syslog
include=/etc/php/php-fpm.d/*.conf

My /etc/php/phg-fpm.d/nextcloud.conf contains this:

[nextcloud]
user = nextcloud
group = nextcloud
listen = /run/nextcloud/nextcloud.sock
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp

; should be accessible by your web server
listen.owner = http
listen.group = http

pm = dynamic
pm.max_children = 15
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

The php-fpm service is updated too.

### Editing /etc/systemd/system/php-fpm.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file

[Service]

ReadWritePaths=/usr/share/webapps/nextcloud/config/
ReadWritePaths=/etc/webapps/nextcloud/
ReadWritePaths=/data/nextcloud/
ReadWritePaths=/usr/share/webapps/nextcloud/
ReadWritePaths=/usr/share/webapps/nextcloud/wapps/

### Lines below this comment will be discarded

My /etc/httpd/conf/extra/http-nextcloud.conf is this:

<IfModule mod_alias.c>
    Alias /nextcloud /usr/share/webapps/nextcloud/
</IfModule>

<Directory /usr/share/webapps/nextcloud>
    Options FollowSymlinks
    AllowOverride ALL
    Require all granted
	DirectoryIndex index.php index.html
	<FilesMatch .php$>
		SetHandler "proxy:unix:/run/nextcloud/nextcloud.sock|fcgi://localhost/"
	</FilesMatch>
</Directory>

<VirtualHost *:80>
    ServerAdmin foo@mydom.xa
    DocumentRoot /usr/share/webapps/nextcloud
    ServerName nextcloud.mydom.xa
    ErrorLog /var/log/httpd/nextcloud.info-error_log
    CustomLog /var/log/httpd/nextcloud.info-access_log common
</VirtualHost>

After restarting php-fpm and httpd I get an error message

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.

In /var/log/http I found this:

# cat access_log 
::1 - - [30/Apr/2021:19:02:25 +0200] "GET /nextcloud/status.php HTTP/1.1" 500 -
127.0.0.1 - - [30/Apr/2021:19:02:34 +0200] "GET /nextcloud/ HTTP/1.1" 500 289
# cat error_log 
[Fri Apr 30 19:02:23.416681 2021] [ssl:warn] [pid 43434:tid 139732082326848] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Apr 30 19:02:23.416766 2021] [ssl:warn] [pid 43434:tid 139732082326848] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Apr 30 19:02:23.441627 2021] [ssl:warn] [pid 43434:tid 139732082326848] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Apr 30 19:02:23.441664 2021] [ssl:warn] [pid 43434:tid 139732082326848] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Apr 30 19:02:23.443656 2021] [mpm_event:notice] [pid 43434:tid 139732082326848] AH00489: Apache/2.4.46 (Unix) OpenSSL/1.1.1k configured -- resuming normal operations
[Fri Apr 30 19:02:23.443690 2021] [core:notice] [pid 43434:tid 139732082326848] AH00094: Command line: '/usr/bin/httpd -D FOREGROUND'

But no hint what is going wrong.

Here is my nextcloud config.php

# cat config.php 
<?php
$CONFIG = array (
  'config_is_read_only' => true,
  'datadirectory' => '/data/nextcloud/',
  'loglevel' => 0,
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'apps_paths' =>  array (
        0 =>  array (
                  'path' => '/usr/share/webapps/nextcloud/wapps',
                  'url' => '/wapps',
                  'writable' => true,
        ),
        1 =>  array (
                   'path' => '/usr/share/webapps/nextcloud/apps',
                   'url' => '/apps',
                   'writable' => false,
        ),
  ),
  'instanceid' => 'ociv1f1j5gwk',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' =>  array (
        0 => 'localhost',
        1 => '192.168.200.100',
        2 => 'Falcon',
  ),
  'dbtype' => 'pgsql',
  'overwrite.cli.url' => 'http://localhost/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'XXX',
  'installed' => true,
  'version' => '21.0.1.1',
  'maintenance' => false,
  'theme' => '',
  'default_language' => 'de',
  'default_locale' => 'de_DE',
  'trashbin_retention_obligation' => 'auto, 7',
  'updater.release.channel' => 'stable',
  'app_install_overwrite' =>  array (
       0 => 'emlviewer',
       1 => 'files_fulltextsearch',
       2 => 'fulltextsearch_elasticsearch',
       3 => 'fulltextsearch',
       4 => 'files_fulltextsearch_tesseract',
       5 => 'calendar',
  ),
);

Can anbody help?

Понравилась статья? Поделить с друзьями:
  • Next rp ошибка cd48
  • Next rp ошибка cd20
  • Next rp очистка памяти процесса gta sa как исправить
  • Next rp как изменить имя
  • Next js prerender error