"/var/www/nextcloud404" failed

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:
2019/09/03 22:31:55 [error] 1215#1215: *11 open() “/var/www/nextcloud404” failed (2: No such file or directory), client: xxx.xxx.xxx.xxx, server: xxxx.xxx, request: “GET /svg/core/actions/share?color=000&v=1 HTTP/1.1”, host: “xxxxx.xxx”

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 16.04
Operating system and version (eg, Ubuntu 17.04): 18.04
Apache or nginx version (eg, Apache 2.4.25): nginx 1.16.1
PHP version (eg, 7.1): 7.2 fpm

The issue you are facing:
please help me find a solution to my problem.
I can’t understand where I could make a mistake.
In the logs, nginx shows the following error.
2019/09/03 22:31:55 [error] 1215#1215: *11 open() “/var/www/nextcloud404” failed (2: No such file or directory), client: xxx.xxx.xxx.xxx, server: xxxx.xxx, request: “GET /svg/core/actions/share?color=000&v=1 HTTP/1.1”, host: “xxxx.xxx”

Is this the first time you’ve seen this error? (Y/N):

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Hi Vadmin,

Does the error have any impact on your Nextcloud for any of your users?

Should there be a folder called nextcloud404 under /var/www/ ?

To me this looks like someone or some script tried accessing this path but it doesn’t exist.

I checked my nextcloud config and unfortunately did not find any errors there. I have Ubuntu installed on 04/18/03, today an update has taken place, and it seems after it all started.
If you add the line to the config: if ($uri !~* (?:.(?:css|js|svg|gif|png|html|ttf|woff)$|^/(?:remote|public|cron|status|ocs/v1|ocs/v2).php|^/.well-known/acme-challenge/.*$)){
rewrite ^ /index.php last;
}
That everything works. But I don’t understand what this line is?
Yes, and the error affects, because I have lost the icons in the web interface of my Nextcloud

[index] Error: TypeError: Argument 5 passed to OC\Core\Controller\PreviewController::__construct() must be of the type string, null given at <>

  1. <>
    OC\Core\Controller\PreviewController->__construct(“core”, OC\AppFramework\Http\Request {}, OC\PreviewManager {}, OC\Files\Node\LazyRoot {}, null, OC\AppFramework\Utility\TimeFactory {})
  2. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 81
    ReflectionClass->newInstanceArgs([“core”,OC\AppFr … }])
  3. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 98
    OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionClass … "})
  4. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 119
    OC\AppFramework\Utility\SimpleContainer->resolve(“OC\Core\Controller\PreviewController”)
  5. /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php line 409
    OC\AppFramework\Utility\SimpleContainer->query(“OC\Core\Controller\PreviewController”)
  6. /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php line 382
    OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback(“OC\Core\Controller\PreviewController”)
  7. /var/www/nextcloud/lib/private/AppFramework/App.php line 113
    OC\AppFramework\DependencyInjection\DIContainer->query(“OC\Core\Controller\PreviewController”)
  8. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main(“OC\Core\Controller\PreviewController”, “getPreviewByFileId”, OC\AppFramework\ … {}, {_route: "core.P … "})
  9. <>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "core.P … "})
  10. /var/www/nextcloud/lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ … {}, {_route: "core.P … "})
  11. /var/www/nextcloud/lib/base.php line 975
    OC\Route\Router->match("/core/preview")
  12. /var/www/nextcloud/index.php line 42
    OC::handleRequest()

GET /index.php/core/preview?fileId=50024&x=32&y=32

There is still such an error in the logs

So you have Ubuntu installed and today you updated Ubuntu and since the update of Ubuntu you are experiencing this problem? Or was it a Nextcloud update which is causing this issue now?

In what config did you add this? Was it the config/config.php or did you add this to the htdocs/.htaccess ?

Do you mean the avatars of the users or all icons, such as folders, etc. ?

I have had a look on Github and found this issue, which looks similar to your error in your last reply.

This error appeared after updating Ubuntu. Although this is strange. I did not update nekstklood.

I added this to the nginx config, that is, not to the most important file, but I have created another nextcloud.conf.
I have a bunch of Ubuntu + Nginx + Php-fpm installed

The “search” icons, as well as the “users” are not displayed.
Unfortunately, the mistake that you found on the github does not suit me.

And in what file do the values that are indicated change? https://github.com/nextcloud/server/pull/16571/files

If you updated Ubuntu, there could be a certain package causing your issue. Please could you check your /var/log/apt/history.log to see what has been updated and maybe post it here?

I vaguely remember that someone on the forums had kind of a similar issue. He had done an OS update, which caused his Nextcloud to misbehave. He found out, that it was a PHP package causing it. I’ll have a look and see if I find it again.

The file in question is in htdocs/core/Controller/PreviewController.php of your Nextcloud installation. But if it doesn’t suit you, please refrain from changing it as it could cause more issues than you already have!

Unfortunately, the logs were not preserved.
I will try to change my config, in accordance with the official https://docs.nextcloud.com/server/13/admin_manual/installation/nginx.html it is possible that somewhere there was originally an error, but everything worked.

Who knows, maybe you’re right about the config :+1:t2: Try it (make a backup before though :wink:) and see how it goes.

Waiting for your reply.

Thank you very much for your help. As soon as I make the correct configuration and check, I’ll write right away.)