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

OCC command returns an exit code without any message #27321

Closed
fourstepper opened this issue Jun 1, 2021 · 10 comments
Closed

OCC command returns an exit code without any message #27321

fourstepper opened this issue Jun 1, 2021 · 10 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@fourstepper
Copy link

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 everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Run the occ command, under the correct user
  2. Observe

Expected behaviour

the occ command should either stacktrace, or inform me about the possible options

Actual behaviour

it returns nothing, except for an exit code of 255

[test@test nextcloud]$ php occ
[test@test nextcloud]$ echo $?
255

Server configuration

Operating system:
CentOS 8

Web server:
Apache

Database:
MySQL

PHP version:
PHP 7.3.28 from the IUS repos

Nextcloud version: (see Nextcloud admin page)
Nextcloud 21.0.2

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

Signing status:

Signing status
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

No errors have been found.

@fourstepper fourstepper added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jun 1, 2021
@kesselb
Copy link
Contributor

kesselb commented Jun 1, 2021

Thank you for taking the time to report a problem 👍

Without configuration report and logs nothing we can do.

@kesselb kesselb closed this as completed Jun 1, 2021
@mritzmann
Copy link

mritzmann commented Jun 2, 2021

We have experienced the same behaviour after upgrading from Nextcloud 20.0.10 to 21.0.2. php occ returns nothing, except for an exit code of 255. As soon as we comment out memcache.local in config.php it works.

You might want to test that too @fourstepper.

Logs and Configuration:

At the moment, however, it is still unclear for us whether this is due to Nextcloud or APCu.

@fourstepper
Copy link
Author

this is exactly the same behaviour and local memcache configuration we have configured. thanks @mritzmann , as a temporary fix this is pretty good

@kesselb
Copy link
Contributor

kesselb commented Jun 2, 2021

#25742

@mritzmann
Copy link

Thanks @kesselb for the link to #25742!

My conclusion from this: Nextcloud 21 requires that apc is also enabled for the cli. For Nextcloud 20, this was not necessary or was not necessary in our setup (therefore not noticed before).

  • Quickfix: php --define apc.enable_cli=1 occ
  • Correct fix: add apc.enable_cli=1 to the php configuration

Thank you for your help, the problem is solved for me.

@mritzmann
Copy link

[..] or inform me about the possible options

But the point made in the opening post is still correct: it would be nice if occ output the reason why it doesn't work. But I understand that it is not always possible to catch all circumstances. :-)

@mritzmann
Copy link

By the way, setting apc.enable_cli to 0 by default seems to be normal.

  • 0 is the default for apc.enable_cli
  • 0 is recommended for apc.enable_cli
apc.enable_cli int
    Mostly for testing and debugging. Setting this enables APC for the CLI version of PHP.
    Under normal circumstances, it is not ideal to create, populate and destroy the APC cache on every CLI request,
    but for various test scenarios it is useful to be able to enable APC for the CLI version of PHP easily.

https://www.php.net/manual/de/apcu.configuration.php

But that's just a side note from me :)

@kesselb
Copy link
Contributor

kesselb commented Jun 2, 2021

#25742 / #25770

@kesselb
Copy link
Contributor

kesselb commented Jun 2, 2021

The next release will include a fix. I suggest to read the linked issue and the related pull request.

@mritzmann
Copy link

mritzmann commented Jun 2, 2021

#25742 has more comments and linked commits/PRs than I own socks, so I missed that....

Thanks for the info, i appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

3 participants