Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation fails due to "no app in context" #4186

Closed
nerdyscout opened this issue Apr 2, 2017 · 7 comments
Closed

installation fails due to "no app in context" #4186

nerdyscout opened this issue Apr 2, 2017 · 7 comments

Comments

@nerdyscout
Copy link

Steps to reproduce

happens to me during installation process

Expected behaviour

I use the webinstaller. After i put all my data into the field i hit ok, i can see the mysqldatabase is created, everything seems good. but the installer ends with an error.

Actual behaviour

installer aborts with "Internal server errror"

Server configuration

Operating system: self build openwrt 15.05.01
Web server: nginx 1.10.3
Database: mysql 14.14
PHP version: 7.1
Nextcloud version: 11.0.2
Updated from an older Nextcloud/ownCloud or fresh install:
no

Where did you install Nextcloud from:
webinstaller

Signing status:

Signing status
not possible

List of activated apps:

App list
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

The content of config/config.php:

Config report
<?php
$CONFIG = array (
  'instanceid' => 'oc1yhexj1mru',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (
    0 => '192.168.1.1',
  ),
  'datadirectory' => '/www/nginx/data',
  'overwrite.cli.url' => 'https://192.168.1.1',
  'dbtype' => 'mysql',
  'version' => '11.0.2.7',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_admin25',
  'dbpassword' => '',
  'logtimezone' => 'UTC',
  'installed' => true,
);

Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser: does not matter
Operating system: does not matter

Logs

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

{"reqId":"8MDx1zRLhOj\/yuCIFIyq","remoteAddr":"192.168.1.234","app":"no app in context","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotFoundException\",\"Message\":\"\\\/ not found while trying to get owner\",\"Code\":0,\"Trace\":\"#0 \\\/www\\\/nginx\\\/apps\\\/activity\\\/lib\\\/FilesHooks.php(520): OC\\\\Files\\\\View->getOwner('\\\/')\\n#1 \\\/www\\\/nginx\\\/apps\\\/activity\\\/lib\\\/FilesHooks.php(161): OCA\\\\Activity\\\\FilesHooks->getSourcePathAndOwner('\\\/')\\n#2 \\\/www\\\/nginx\\\/apps\\\/activity\\\/lib\\\/FilesHooks.php(117): OCA\\\\Activity\\\\FilesHooks->addNotificationsForFileAction('\\\/', 'file_created', 'created_self', 'created_by')\\n#3 \\\/www\\\/nginx\\\/apps\\\/activity\\\/lib\\\/FilesHooksStatic.php(45): OCA\\\\Activity\\\\FilesHooks->fileCreate('\\\/')\\n#4 \\\/www\\\/nginx\\\/lib\\\/private\\\/legacy\\\/hook.php(106): OCA\\\\Activity\\\\FilesHooksStatic::fileCreate(Array)\\n#5 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/View.php(1235): OC_Hook::emit('OC_Filesystem', 'post_create', Array)\\n#6 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/View.php(1163): OC\\\\Files\\\\View->runHooks(Array, '\\\/', true)\\n#7 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/View.php(266): OC\\\\Files\\\\View->basicOperation('mkdir', '\\\/admin\\\/files', Array)\\n#8 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Folder.php(149): OC\\\\Files\\\\View->mkdir('\\\/admin\\\/files')\\n#9 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Root.php(380): OC\\\\Files\\\\Node\\\\Folder->newFolder('\\\/admin\\\/files')\\n#10 [internal function]: OC\\\\Files\\\\Node\\\\Root->getUserFolder('admin')\\n#11 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/LazyRoot.php(65): call_user_func_array(Array, Array)\\n#12 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/LazyRoot.php(282): OC\\\\Files\\\\Node\\\\LazyRoot->__call('getUserFolder', Array)\\n#13 \\\/www\\\/nginx\\\/lib\\\/private\\\/Server.php(947): OC\\\\Files\\\\Node\\\\LazyRoot->getUserFolder('admin')\\n#14 \\\/www\\\/nginx\\\/lib\\\/private\\\/User\\\/Session.php(411): OC\\\\Server->getUserFolder('admin')\\n#15 \\\/www\\\/nginx\\\/lib\\\/private\\\/User\\\/Session.php(479): OC\\\\User\\\\Session->prepareUserLogin(true)\\n#16 \\\/www\\\/nginx\\\/lib\\\/private\\\/User\\\/Session.php(299): OC\\\\User\\\\Session->loginWithPassword(*** sensitive parameters replaced ***)\\n#17 \\\/www\\\/nginx\\\/lib\\\/private\\\/Setup.php(394): OC\\\\User\\\\Session->login(*** sensitive parameters replaced ***)\\n#18 \\\/www\\\/nginx\\\/core\\\/Controller\\\/SetupController.php(65): OC\\\\Setup->install(Array)\\n#19 \\\/www\\\/nginx\\\/lib\\\/base.php(957): OC\\\\Core\\\\Controller\\\\SetupController->run(Array)\\n#20 \\\/www\\\/nginx\\\/index.php(40): OC::handleRequest()\\n#21 {main}\",\"File\":\"\\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/View.php\",\"Line\":1640}","level":3,"time":"2017-04-02T11:20:21+00:00","method":"POST","url":"\/index.php","user":"admin","version":"11.0.2.7"}

{"reqId":"8MDx1zRLhOj\/yuCIFIyq","remoteAddr":"192.168.1.234","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotFoundException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(223): OC\\\\Files\\\\Node\\\\Node->getFileInfo()\\n#1 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(106): OC\\\\Files\\\\Node\\\\Node->getPermissions()\\n#2 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Folder.php(144): OC\\\\Files\\\\Node\\\\Node->checkPermissions(4)\\n#3 \\\/www\\\/nginx\\\/lib\\\/private\\\/legacy\\\/util.php(370): OC\\\\Files\\\\Node\\\\Folder->newFolder('Photos')\\n#4 \\\/www\\\/nginx\\\/lib\\\/private\\\/legacy\\\/util.php(343): OC_Util::copyr('\\\/www\\\/nginx\\\/core...', Object(OC\\\\Files\\\\Node\\\\Folder))\\n#5 \\\/www\\\/nginx\\\/lib\\\/private\\\/User\\\/Session.php(414): OC_Util::copySkeleton('admin', Object(OC\\\\Files\\\\Node\\\\Folder))\\n#6 \\\/www\\\/nginx\\\/lib\\\/private\\\/User\\\/Session.php(479): OC\\\\User\\\\Session->prepareUserLogin(true)\\n#7 \\\/www\\\/nginx\\\/lib\\\/private\\\/User\\\/Session.php(299): OC\\\\User\\\\Session->loginWithPassword(*** sensitive parameters replaced ***)\\n#8 \\\/www\\\/nginx\\\/lib\\\/private\\\/Setup.php(394): OC\\\\User\\\\Session->login(*** sensitive parameters replaced ***)\\n#9 \\\/www\\\/nginx\\\/core\\\/Controller\\\/SetupController.php(65): OC\\\\Setup->install(Array)\\n#10 \\\/www\\\/nginx\\\/lib\\\/base.php(957): OC\\\\Core\\\\Controller\\\\SetupController->run(Array)\\n#11 \\\/www\\\/nginx\\\/index.php(40): OC::handleRequest()\\n#12 {main}\",\"File\":\"\\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php\",\"Line\":86}","level":3,"time":"2017-04-02T11:20:21+00:00","method":"POST","url":"\/index.php","user":"admin","version":"11.0.2.7"}</summary>

PID PPID USER STAT VSZ %VSZ %CPU COMMAND
4124 3993 root R 1044 0% 0% top
2907 2905 daemon S 152m 15% 0% php-fpm: pool www
2906 2905 daemon S 152m 15% 0% php-fpm: pool www
2905 1 root S 151m 15% 0% php-fpm: master process (/etc/php7-fp
2849 1 root S 151m 15% 0% /usr/bin/php-fcgi -b 1026
3100 1 root S 42348 4% 0% /usr/bin/mysqld
2843 1 root S 7400 1% 0% /usr/bin/minidlna -f /tmp/minidlna.co
3208 1 root S 4632 0% 0% /usr/bin/aria2c --conf-path=/var/etc/
3929 3926 daemon S 4112 0% 0% nginx: worker process
3926 1 root S 3652 0% 0% nginx: master process /usr/sbin/nginx
2966 1 root S 2648 0% 0% /usr/sbin/nmbd -F
2965 1 root S 2624 0% 0% /usr/sbin/smbd -F
3975 3853 root S 1648 0% 0% nano nextcloud.log
2633 1 root S 1516 0% 0% /sbin/netifd
1 0 root S 1336 0% 0% /sbin/procd
2585 1 root S 1248 0% 0% /sbin/rpcd
3613 1 root S 1216 0% 0% {dynamic_dns_upd} /bin/sh /usr/lib/dd
2656 1 root S 1084 0% 0% /usr/sbin/odhcpd
3853 3852 root S 1048 0% 0% -ash
993 3992 root S 1044 0% 0% -ash

As you can see the nginx and php-fpm are running as user daemon.
This user also owns /www/nginx.

I suspect it is still somehow an user permission problem. but currently I am running out of ideas.

@ChristophWurst
Copy link
Member

How did you install the source on your server? Did you adjust the file permissions to your webserver's user, e.g. www-data on Debian?

@nerdyscout
Copy link
Author

sorry, I am not completly sure what you want to know.

basicly what i have done is this:

cd /WWW
wget https://download.nextcloud.com/server/installer/setup-nextcloud.php
chown -R daemon:daemon *

daemon is the user my webserver is running with

@ChristophWurst
Copy link
Member

That's about the information I wanted to get. Thanks 😉

cc @nickvergessen since the stack trace shows this could be related to activities.

@nerdyscout
Copy link
Author

I've just tried it another way:

cd /www
git clone https://github.com/nextcloud/server.git nginx
git submodule update --init
chown -R daemon:daemon nginx

after running through the wizard it ends still with an "Internal server error"

{"reqId":"KzPqS7UIDN0SNx2gJQDh","remoteAddr":"192.168.1.234","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotFoundException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(217): OC\\\\Files\\\\Node\\\\Node->getFileInfo()\\n#1 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(117): OC\\\\Files\\\\Node\\\\Node->getPermissions()\\n#2 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Folder.php(176): OC\\\\Files\\\\Node\\\\Node->checkPermissions(4)\\n#3 \\\/www\\\/nginx\\\/lib\\\/private\\\/legacy\\\/util.php(373): OC\\\\Files\\\\Node\\\\Folder->newFile('welcome.txt')\\n#4 \\\/www\\\/nginx\\\/lib\\\/private\\\/legacy\\\/util.php(343): OC_Util::copyr('\\\/www\\\/nginx\\\/core...', Object(OC\\\\Files\\\\Node\\\\Folder))\\n#5 \\\/www\\\/nginx\\\/lib\\\/private\\\/User\\\/Session.php(435): OC_Util::copySkeleton('admin', Object(OC\\\\Files\\\\Node\\\\Folder))\\n#6 \\\/www\\\/nginx\\\/lib\\\/private\\\/User\\\/Session.php(500): OC\\\\User\\\\Session->prepareUserLogin(true)\\n#7 \\\/www\\\/nginx\\\/lib\\\/private\\\/User\\\/Session.php(316): OC\\\\User\\\\Session->loginWithPassword(*** sensitive parameters replaced ***)\\n#8 \\\/www\\\/nginx\\\/lib\\\/private\\\/Setup.php(387): OC\\\\User\\\\Session->login(*** sensitive parameters replaced ***)\\n#9 \\\/www\\\/nginx\\\/core\\\/Controller\\\/SetupController.php(65): OC\\\\Setup->install(Array)\\n#10 \\\/www\\\/nginx\\\/lib\\\/base.php(918): OC\\\\Core\\\\Controller\\\\SetupController->run(Array)\\n#11 \\\/www\\\/nginx\\\/index.php(40): OC::handleRequest()\\n#12 {main}\",\"File\":\"\\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php\",\"Line\":97}","level":3,"time":"2017-04-03T19:53:24+00:00","method":"POST","url":"\/index.php","user":"admin","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko\/20100101 Firefox\/52.0","version":"12.0.0.13"}
{"reqId":"KzPqS7UIDN0SNx2gJQDh","remoteAddr":"192.168.1.234","app":"core","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotFoundException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(217): OC\\\\Files\\\\Node\\\\Node->getFileInfo()\\n#1 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(117): OC\\\\Files\\\\Node\\\\Node->getPermissions()\\n#2 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Folder.php(176): OC\\\\Files\\\\Node\\\\Node->checkPermissions(4)\\n#3 \\\/www\\\/nginx\\\/lib\\\/private\\\/legacy\\\/util.php(373): OC\\\\Files\\\\Node\\\\Folder->newFile('welcome.txt')\\n#4 \\\/www\\\/nginx\\\/lib\\\/private\\\/legacy\\\/util.php(343): OC_Util::copyr('\\\/www\\\/nginx\\\/core...', Object(OC\\\\Files\\\\Node\\\\Folder))\\n#5 \\\/www\\\/nginx\\\/lib\\\/private\\\/User\\\/Session.php(435): OC_Util::copySkeleton('admin', Object(OC\\\\Files\\\\Node\\\\Folder))\\n#6 \\\/www\\\/nginx\\\/lib\\\/private\\\/User\\\/Session.php(500): OC\\\\User\\\\Session->prepareUserLogin(true)\\n#7 \\\/www\\\/nginx\\\/lib\\\/private\\\/User\\\/Session.php(316): OC\\\\User\\\\Session->loginWithPassword(*** sensitive parameters replaced ***)\\n#8 \\\/www\\\/nginx\\\/lib\\\/private\\\/Setup.php(387): OC\\\\User\\\\Session->login(*** sensitive parameters replaced ***)\\n#9 \\\/www\\\/nginx\\\/core\\\/Controller\\\/SetupController.php(65): OC\\\\Setup->install(Array)\\n#10 \\\/www\\\/nginx\\\/lib\\\/base.php(918): OC\\\\Core\\\\Controller\\\\SetupController->run(Array)\\n#11 \\\/www\\\/nginx\\\/index.php(40): OC::handleRequest()\\n#12 {main}\",\"File\":\"\\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php\",\"Line\":97}","level":3,"time":"2017-04-03T19:53:24+00:00","method":"POST","url":"\/index.php","user":"admin","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko\/20100101 Firefox\/52.0","version":"12.0.0.13"}
{"reqId":"KzPqS7UIDN0SNx2gJQDh","remoteAddr":"192.168.1.234","app":"core","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotFoundException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(217): OC\\\\Files\\\\Node\\\\Node->getFileInfo()\\n#1 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(117): OC\\\\Files\\\\Node\\\\Node->getPermissions()\\n#2 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Folder.php(155): OC\\\\Files\\\\Node\\\\Node->checkPermissions(4)\\n#3 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/AppData\\\/AppData.php(92): OC\\\\Files\\\\Node\\\\Folder->newFolder('js')\\n#4 \\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/AppData\\\/AppData.php(112): OC\\\\Files\\\\AppData\\\\AppData->getAppDataFolder()\\n#5 \\\/www\\\/nginx\\\/lib\\\/private\\\/Template\\\/JSCombiner.php(83): OC\\\\Files\\\\AppData\\\\AppData->newFolder('core')\\n#6 \\\/www\\\/nginx\\\/lib\\\/private\\\/Template\\\/JSResourceLocator.php(96): OC\\\\Template\\\\JSCombiner->process('\\\/www\\\/nginx', 'core\\\/js\\\/merged-...', 'core')\\n#7 \\\/www\\\/nginx\\\/lib\\\/private\\\/Template\\\/JSResourceLocator.php(68): OC\\\\Template\\\\JSResourceLocator->cacheAndAppendCombineJsonIfExist('\\\/www\\\/nginx', 'core\\\/js\\\/merged-...')\\n#8 \\\/www\\\/nginx\\\/lib\\\/private\\\/Template\\\/ResourceLocator.php(75): OC\\\\Template\\\\JSResourceLocator->doFind('js\\\/merged-templ...')\\n#9 \\\/www\\\/nginx\\\/lib\\\/private\\\/TemplateLayout.php(255): OC\\\\Template\\\\ResourceLocator->find(Array)\\n#10 \\\/www\\\/nginx\\\/lib\\\/private\\\/TemplateLayout.php(132): OC\\\\TemplateLayout::findJavascriptFiles(Array)\\n#11 \\\/www\\\/nginx\\\/lib\\\/private\\\/legacy\\\/template.php(203): OC\\\\TemplateLayout->__construct('error', '')\\n#12 \\\/www\\\/nginx\\\/lib\\\/private\\\/Template\\\/Base.php(130): OC_Template->fetchPage()\\n#13 \\\/www\\\/nginx\\\/lib\\\/private\\\/legacy\\\/template.php(335): OC\\\\Template\\\\Base->printPage()\\n#14 \\\/www\\\/nginx\\\/index.php(59): OC_Template::printExceptionErrorPage(Object(OCP\\\\Files\\\\NotFoundException))\\n#15 {main}\",\"File\":\"\\\/www\\\/nginx\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php\",\"Line\":97}","level":3,"time":"2017-04-03T19:53:24+00:00","method":"POST","url":"\/index.php","user":"admin","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko\/20100101 Firefox\/52.0","version":"12.0.0.13"}

Interestingly it is still a NotFoundException, but seems to look a bit different.

@nickvergessen nickvergessen removed their assignment Apr 5, 2017
@nickvergessen
Copy link
Member

The activity part from the initial report is resolved in master/stable11 already.
That's why you get a different error now when you try to use master.

However we should look into the not found exception as well.

@nerdyscout
Copy link
Author

this occured to me more than a year ago in Nextcloud 11, I guess it will never be resolved.

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Dec 15, 2018
@ChristophWurst
Copy link
Member

@nextcloud nextcloud locked as resolved and limited conversation to collaborators Dec 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants