Problems with code integrity and error while checking server setup

Hi, I installed Nextcloud 10 several times, with the same result.

In the top of the admin page:

There were problems with the code integrity check. More information…

When I click “More information…”, the link brings the Admin area, with the following:

The admin page shows:
Security & setup warnings

Error occurred while checking server setup
The “Strict-Transport-Security” HTTP header is not configured to at least “15552000” seconds. For enhanced security we recommend enabling HSTS as described in our security tips.

The log shows:
Error index

Exception: {"Exception":"GuzzleHttp\\Exception\\RequestException","Message":"cURL error 77: ","Code":0,"Trace":"#0 \/home\/treintaydosmx\/public_html\/cloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RequestFsm.php(103): GuzzleHttp\\Exception\\RequestException::wrapException(Object(GuzzleHttp\\Message\\Request), Object(GuzzleHttp\\Ring\\Exception\\RingException))\n#1 \/home\/treintaydosmx\/public_html\/cloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RequestFsm.php(132): GuzzleHttp\\RequestFsm->__invoke(Object(GuzzleHttp\\Transaction))\n#2 \/home\/treintaydosmx\/public_html\/cloud\/3rdparty\/react\/promise\/src\/FulfilledPromise.php(25): GuzzleHttp\\RequestFsm->GuzzleHttp\\{closure}(Array)\n#3 \/home\/treintaydosmx\/public_html\/cloud\/3rdparty\/guzzlehttp\/ringphp\/src\/Future\/CompletedFutureValue.php(55): React\\Promise\\FulfilledPromise->then(Object(Closure), NULL, NULL)\n#4 \/home\/treintaydosmx\/public_html\/cloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Message\/FutureResponse.php(43): GuzzleHttp\\Ring\\Future\\CompletedFutureValue->then(Object(Closure), NULL, NULL)\n#5 \/home\/treintaydosmx\/public_html\/cloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RequestFsm.php(134): GuzzleHttp\\Message\\FutureResponse::proxy(Object(GuzzleHttp\\Ring\\Future\\CompletedFutureArray), Object(Closure))\n#6 \/home\/treintaydosmx\/public_html\/cloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php(165): GuzzleHttp\\RequestFsm->__invoke(Object(GuzzleHttp\\Transaction))\n#7 \/home\/treintaydosmx\/public_html\/cloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php(125): GuzzleHttp\\Client->send(Object(GuzzleHttp\\Message\\Request))\n#8 \/home\/treintaydosmx\/public_html\/cloud\/lib\/private\/Http\/Client\/Client.php(137): GuzzleHttp\\Client->get('https:\/\/www.own...', Array)\n#9 \/home\/treintaydosmx\/public_html\/cloud\/settings\/Controller\/CheckSetupController.php(195): OC\\Http\\Client\\Client->get('https:\/\/www.own...')\n#10 \/home\/treintaydosmx\/public_html\/cloud\/settings\/Controller\/CheckSetupController.php(346): OC\\Settings\\Controller\\CheckSetupController->isUsedTlsLibOutdated()\n#11 [internal function]: OC\\Settings\\Controller\\CheckSetupController->check()\n#12 \/home\/treintaydosmx\/public_html\/cloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(160): call_user_func_array(Array, Array)\n#13 \/home\/treintaydosmx\/public_html\/cloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(90): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OC\\Settings\\Controller\\CheckSetupController), 'check')\n#14 \/home\/treintaydosmx\/public_html\/cloud\/lib\/private\/AppFramework\/App.php(111): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OC\\Settings\\Controller\\CheckSetupController), 'check')\n#15 \/home\/treintaydosmx\/public_html\/cloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php(47): OC\\AppFramework\\App::main('CheckSetupContr...', 'check', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#16 [internal function]: OC\\AppFramework\\Routing\\RouteActionHandler->__invoke(Array)\n#17 \/home\/treintaydosmx\/public_html\/cloud\/lib\/private\/Route\/Router.php(293): call_user_func(Object(OC\\AppFramework\\Routing\\RouteActionHandler), Array)\n#18 \/home\/treintaydosmx\/public_html\/cloud\/lib\/base.php(967): OC\\Route\\Router->match('\/settings\/ajax\/...')\n#19 \/home\/treintaydosmx\/public_html\/cloud\/index.php(48): OC::handleRequest()\n#20 {main}","File":"\/home\/treintaydosmx\/public_html\/cloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Exception\/RequestException.php","Line":51}

Any suggestion?

Regards

I could be steering you wrong as I am new to NC, but I am pretty certain you see that behavior in your install if there is even a single file added to the root folder (or any in your “lists” folders) for NC. Makes me think for good measure, since since you could be running this on Windows with many of the WAMP stacks available - imagine the OS making a simple hidden thumbnail that should not be there might even trigger this.

I had a php file and saw the same behavior. Hope this is some help.

1 Like

Sorry, and this should be self explanatory, set up HSTS as per tips or manual…

I am also lost here with the same issue. I already added some code to the htaccess but no :frowning:

Hi @develteam
I’m using CentOS 7.2
This is the contents of the Nextcloud folder:

drwxr-xr-x 15 inblaymx inblaymx  4096 Aug 30 10:23 ./
drwxr-x--- 14 inblaymx nobody    4096 Aug 29 17:49 ../
drwxr-xr-x 28 inblaymx inblaymx  4096 Aug 24 23:01 3rdparty/
drwxr-xr-x 36 inblaymx inblaymx  4096 Aug 24 23:00 apps/
-rw-r--r--  1 inblaymx inblaymx  8868 Aug 24 22:59 AUTHORS
drwxr-xr-x  2 inblaymx inblaymx    79 Aug 29 18:22 config/
-rw-r--r--  1 inblaymx inblaymx  3601 Aug 24 22:59 console.php
-rw-r--r--  1 inblaymx inblaymx 34520 Aug 24 22:59 COPYING-AGPL
drwxr-xr-x 17 inblaymx inblaymx  4096 Aug 24 23:01 core/
-rw-r--r--  1 inblaymx inblaymx  5017 Aug 24 22:59 cron.php
drwxr-xr-x  2 inblaymx inblaymx    75 Aug 29 18:23 data/
-rw-r--r--  1 inblaymx inblaymx 39782 Aug 24 22:59 db_structure.xml
-rw-r--r--  1 inblaymx inblaymx  2628 Aug 29 18:23 .htaccess
-rw-r--r--  1 inblaymx inblaymx   179 Aug 24 22:59 index.html
-rw-r--r--  1 inblaymx inblaymx  2617 Aug 24 22:59 index.php
drwxr-xr-x  3 inblaymx inblaymx    83 Aug 24 22:59 l10n/
drwxr-xr-x  6 inblaymx inblaymx   123 Aug 24 22:59 lib/
-rwxr-xr-x  1 inblaymx inblaymx   283 Aug 24 22:59 occ*
drwxr-xr-x  2 inblaymx inblaymx    69 Aug 24 22:59 ocs/
drwxr-xr-x  2 inblaymx inblaymx    22 Aug 24 22:59 ocs-provider/
-rw-r--r--  1 inblaymx inblaymx  3173 Aug 24 22:59 public.php
-rw-r--r--  1 inblaymx inblaymx  5420 Aug 24 22:59 remote.php
drwxr-xr-x  4 inblaymx inblaymx    49 Aug 24 22:59 resources/
-rw-r--r--  1 inblaymx inblaymx    26 Aug 24 22:59 robots.txt
drwxr-xr-x 12 inblaymx inblaymx  4096 Aug 24 22:59 settings/
-rw-r--r--  1 inblaymx inblaymx  1889 Aug 24 22:59 status.php
drwxr-xr-x  3 inblaymx inblaymx    45 Aug 24 22:59 themes/
drwxr-xr-x  7 inblaymx inblaymx  4096 Aug 24 23:01 updater/
-rw-r--r--  1 inblaymx inblaymx   163 Aug 26 17:49 .user.ini
-rw-r--r--  1 inblaymx inblaymx   233 Aug 24 23:01 version.php

Some servers write an error_log file in the root directory and, as it’s not part of Nextcloud, it makes the integrity check fail. It has happened to me a few times. Could you check if that is the issue?

@Manuel5cc good thinking about the error logs. There could be as many as three that I can think of.

Look @Manuel5cc’s
post below and also if you are having troubles in general with things working, make sure you have run the chown command for the HTTP user to whatever admin level account you are assigning to run on the server.
NextCloud is very picky about file permissions…

Hi @Manuel5cc,

Actually I have a file named error_log in the nextcloud root folder and a file named nextcloud.log in the data folder.

I tried after deleting both, with the same result.

I think the problem could be related to this message in nextcloud.log:

{"reqId":"V8XikKhlvOTs-z4pwLi8NQAAAU8","remoteAddr":"187.232.21.133","app":"index","message":"Exception: {\"Exception\":\"GuzzleHttp\\\\Exception\\\\RequestException\",\"Message\":\"cURL error 77: \",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(104): GuzzleHttp\\\\Exception\\\\RequestException::wrapException(Object(GuzzleHttp\\\\Message\\\\Request), Object(GuzzleHttp\\\\Ring\\\\Exception\\\\RingException))\\n#1 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(132): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#2 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/3rdparty\\\/react\\\/promise\\\/src\\\/FulfilledPromise.php(25): GuzzleHttp\\\\RequestFsm->GuzzleHttp\\\\{closure}(Array)\\n#3 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Future\\\/CompletedFutureValue.php(55): React\\\\Promise\\\\FulfilledPromise->then(Object(Closure), NULL, NULL)\\n#4 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Message\\\/FutureResponse.php(43): GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureValue->then(Object(Closure), NULL, NULL)\\n#5 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(135): GuzzleHttp\\\\Message\\\\FutureResponse::proxy(Object(GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureArray), Object(Closure))\\n#6 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(165): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#7 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(125): GuzzleHttp\\\\Client->send(Object(GuzzleHttp\\\\Message\\\\Request))\\n#8 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/lib\\\/private\\\/Http\\\/Client\\\/Client.php(137): GuzzleHttp\\\\Client->get('https:\\\/\\\/www.own...', Array)\\n#9 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/settings\\\/Controller\\\/CheckSetupController.php(195): OC\\\\Http\\\\Client\\\\Client->get('https:\\\/\\\/www.own...')\\n#10 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/settings\\\/Controller\\\/CheckSetupController.php(346): OC\\\\Settings\\\\Controller\\\\CheckSetupController->isUsedTlsLibOutdated()\\n#11 [internal function]: OC\\\\Settings\\\\Controller\\\\CheckSetupController->check()\\n#12 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(160): call_user_func_array(Array, Array)\\n#13 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(90): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OC\\\\Settings\\\\Controller\\\\CheckSetupController), 'check')\\n#14 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(111): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OC\\\\Settings\\\\Controller\\\\CheckSetupController), 'check')\\n#15 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main('CheckSetupContr...', 'check', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#16 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#17 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/lib\\\/private\\\/Route\\\/Router.php(293): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#18 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/lib\\\/base.php(967): OC\\\\Route\\\\Router->match('\\\/settings\\\/ajax\\\/...')\\n#19 \\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/index.php(48): OC::handleRequest()\\n#20 {main}\",\"File\":\"\\\/home\\\/inblaymx\\\/public_html\\\/cloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Exception\\\/RequestException.php\",\"Line\":51}","level":3,"time":"2016-08-30T19:46:25+00:00","method":"GET","url":"\/index.php\/settings\/ajax\/checksetup","user":"admin"}

The problem of integrity check seems to be related to this:

inblaymx@inblay.mx [~/public_html/cloud]# ./occ integrity:check-core
  - INVALID_HASH:
    - .htaccess:
      - expected: ab5f4c44ba2f9c66f2ed25c3ad3d84660b2808cca11ffa8fe2778a648a054d8ada495a0bf4715dc873aac1efe8dfd92a72f9a24441d8f5240834e639325fd892
      - current: 4a97aae4d05df89a28bf2e63fe2a31cdf2afe74d3c9f622afb581d6b0f1f4e001639c7c3a31d7aaa793c00d5f355e0bfaad62ec45507245de441cfc552115cd7
inblaymx@inblay.mx [~/public_html/cloud]#

Any idea on how to fix the .htaccess file?

The “Error occurred while checking server setup” problem seem to be related to my last post about the error in nextcloud.log

Regards.

Have you tried deleting the .htaccess file? Maybe Nextcloud will create a new one. You can try to get the .htaccess file from the original package too (in nextcloud.com / downloads).

After replacing the .htaccess file with the one included with the installation package of nextcloud, the “There were problems with the code integrity check” message is gone.

Now I only have the “Error occurred while checking server setup” error.

try
sudo -u www-data php occ maintenance:update:htaccess
in the Nextcloud folder

Also
sudo -u www-data php occ maintenance:repair
can be usefull

https://docs.nextcloud.com/server/10/admin_manual/configuration_server/occ_command.html?highlight=occ

Are you accessing with HTTPS?

Yes. I’m accessing with HTTPS.

Already tried that, same result.

The current problem is:
“Error occurred while checking server setup”

have the same issue:

“Error occurred while checking server setup”

Collabora Online unbekannter Fehler: cURL error 77:
Bitte kontaktieren Sie Ihren “https://127.0.0.1:9980”-Administrator.

any solution already?

It would be really nice to have something like a .gitignore right now.

Some things you cannot avoid having in the directory and either being able to disable the message, or .ignore files or something would be great.

Does this exist?

Thanks