Where did the status code 599 come from, and where is it used? #22
Comments
shrink commented Nov 7, 2015
The status code 599 is non-standard, it doesn’t exist in any RFC, but it appears to be quite widely used, it’s the 10th most popular status code on the website. The description I originally used came from wikipedia, now the wikipedia page has been updated with circular references, and my google searches aren’t returning much useful information on where the code came from, or who’s using it. but it must be someone!
Any research / input here is greatly appreciated.
The text was updated successfully, but these errors were encountered:
passcod commented Jul 20, 2016 •
Wikipedia source in October 2015 was https://github.com/serrynaimo/http-status-singlish#599-network-connect-timeout-error-unknown although that might also be circular as it was only [citation needed] in November 2014.
In fact, there is apparently a history of circular references for 599. Here’s another from 2011: https://www.flickr.com/photos/girliemac/6509400929/in/set-72157628409467125/
Here’s the Tornado server in 2009: tornadoweb/tornado@33c3f8d History beyond that is lost to us as it belongs in the closed-source history of Tornado, which we don’t have (access to).
HTTP error integer error code, e.g. 404. Error code 599 is used when no HTTP response was received, e.g. for a timeout.
That itself may be a reason it’s seen often in error aggregation services, as they report statuses seen from servers?
I have found no further reference to an HTTP error 599 before 2009 in google and mailing list archives.
[For 10.4] Set 599 HTTP code on error #36413
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
jvillafanez commented Nov 12, 2019 •
Description
web page shows a 200 status instead of a 500 (or similar) in case of error
Related Issue
Motivation and Context
How Has This Been Tested?
Load any ownCloud web page without having connection to the DB (ownCloud was installed but the DB connection was cut later)
Screenshots (if appropriate):
Types of changes
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Database schema changes (next release will require increase of minor version instead of patch)
- Breaking change (fix or feature that would cause existing functionality to change)
- Technical debt
- Tests only (no source changes)
Checklist:
- Code changes
- Unit tests added
- Acceptance tests added
- Documentation ticket raised:
- Changelog item, see TEMPLATE
codecov bot commented Nov 12, 2019 •
Codecov Report
Merging #36413 into master will decrease coverage by 0.02% .
The diff coverage is 0% .
Flag | Coverage Δ | Complexity Δ | |
---|---|---|---|
#javascript | 54% (ø) | 0 (ø) | ⬇️ |
#phpunit | 65.84% (-0.03%) | 19022 (-1) |
Impacted Files | Coverage Δ | Complexity Δ | |
---|---|---|---|
lib/private/Log/ErrorHandler.php | 8% (+1.75%) | 9 (-3) | ⬇️ |
lib/private/Setup.php | 24.68% (-0.11%) | 57 (ø) | |
public.php | 0% (ø) | 0 (ø) | ⬇️ |
status.php | 0% (ø) | 0 (ø) | ⬇️ |
index.php | 0% (ø) | 0 (ø) | ⬇️ |
remote.php | 0% (ø) | 0 (ø) | ⬇️ |
lib/base.php | 3.81% (-0.22%) | 151 (+2) | |
console.php | 0% (ø) | 0 (ø) | ⬇️ |
Legend — Click here to learn more
Δ = absolute (impact) , ø = not affected , ? = missing data
Powered by Codecov. Last update d1fe5d2. 3674fa0. Read the comment docs.
jvillafanez commented Nov 13, 2019
Summing up the changes:
- Shutdown log is removed due to unreliability. There is no guarantee the ownCloud’s logger will be available during the shutdown (seen when there is no connection to the DB)
- /favicon.ico route will be rewritten to /core/img/favicon.ico. This happens when there is no connection to the DB. The browser doesn’t load any page due to the server crash, and make a request to «/favicon.ico» to get the favicon. The change will make the favicon load properly under these circunstances.
- New logger for crashes and improved error handling on the endpoints.
Notes on the error handling:
The request processing goes as follows:
Try to process the request normally. If there isn’t any problem, this will generate a normal response.
In case the request isn’t handled properly and throws an exception that isn’t handled, the endpoint should try to log that exception using ownCloud’s logging facility and show a proper error message to the user.
This will likely depend on the endpoint, but generally, the expected HTTP status should be 500 and an error message should be presented to the user. ownCloud already provides some templates that can be used, such as OC_Template::printExceptionErrorPage . In this case, we can assume that ownCloud is working properly, and it’s an app the one that failed to process the request.
Note that this exception handling is expected to be light, mostly log the error and show a nice message to the user
In case we can’t handle the exception, this means that ownCloud is broken and we can’t report the error properly to the user. This has been seen if the connection to the DB is stopped, but there could be some additional scenarios.
In this case we assume that ownCloud is unreliable (we’ve decided to just log and show an error in step 2, but we couldn’t even do that). In order to provide a similar behaviour in all the endpoints, we’ll perform the following actions:
When the DB server goes away, HTTP Status code stays 200 and oC shows exception in browser #36072
Comments
enbrnz commented Aug 21, 2019
Steps to reproduce
- Install ownCloud
- Stop MySQL or MariaDB server
- Visit ownCloud URL
Expected behaviour
This should show a 500 Server Error
Actual behaviour
Webserver replies with HTTP Status code 200 and the following exception is shown to end users:
Server configuration
ownCloud version: 10.2.1
Web server access log
ownCloud log (data/owncloud.log)
The text was updated successfully, but these errors were encountered:
DeepDiver1975 commented Aug 21, 2019
What is displayed in the browser?
cdamken commented Aug 22, 2019
What is displayed in the browser?
This is what is displayed in the browser:
The whole Stacktrace
ho4ho commented Sep 1, 2019
jvillafanez commented Nov 12, 2019
@DeepDiver1975 @PVince81 It seems we need a «broken beyond repair» kind of log to be used in several endpoints, such as index.php, remote.php, public.php and others.
The main usage is to report broken installations / states such as the above, when the DB connection is down. The problem is that the ownCloud’s logger (and maybe other services such as the request) access to the DB because it needs to fetch the user. This makes ownCloud crash trying to handle the previous exception.
Expected code should be something like:
The challenge is that this «abnormalExceptionHandling» can’t rely on ownCloud.
We could send a 599 HTTP status with a plain text body, and log a message in a different file (we can’t log into the normal owncloud.log file because the logger could be broken, so we can’t format properly the log message)
At the moment, there are several unhandled exceptions in apache because we’re trying to log when the logger is broken inside the «normal» catch block.
Note that this should be as homogeneous as possible among all the endpoints
Owncloud Admin panel states, «no working internet connection» #19138
Comments
amc2002 commented Sep 17, 2015
I was trying to resolve this issue in the forum, and was informed I should open a bug for it. I am getting the notice in the admin panel, «This server has no working internet connection. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. We suggest to enable internet connection for this server if you want to have all features.»
My server appears in the hosts file as 127.0.0.1 and as its own IP. I have also confirmed everything suggested in the FAQ for solving this issue (see numbered items below). Looking for other suggestions to help resolve this issue. Thanks.
- «A broken, outgoing connection to the appstore (https://apps.owncloud.com)». The 443 port is opened, the wget example for apps.owncloud.com works correctly without issue (used wget, not ping).
- «Buggy versions of OpenSSL/NSS (oC 8.1.1 should show this in the admin backend).» There is no notification in the admin backend.
- «A missing config/ca-bundle.crt.» A file with this name is present in /config
- «A disabled appstore (‘appstoreenabled’ => false, in your config.php)». There is no such string in config.php — see below.
- «A wrong configured appstore URL (Remove ‘appstoreurl’ => from your config.php).» There is no such string in config.php
- «Empty or wrong configured ‘proxy’ => », in config.php.» There is no such string in config.php — see below
My config.php (private information noted by @@@@)
‘@@@@’, ‘passwordsalt’ => ‘@@@@’, ‘secret’ => ‘@@@@@@’, ‘trusted_domains’ => array ( 0 => ‘owncloud.@@@@.com’, ), ‘datadirectory’ => ‘/var/www/html/owncloud/data’, ‘overwrite.cli.url’ => ‘https://owncloud.@@@@.com/owncloud’, ‘dbtype’ => ‘mysql’, ‘version’ => ‘8.1.3.0’, ‘dbname’ => ‘ownCloud’, ‘dbhost’ => ‘localhost’, ‘dbtableprefix’ => ‘oc_’, ‘dbuser’ => ‘@@@@@@’, ‘dbpassword’ => ‘@@@@@’, ‘installed’ => true, ‘ldapIgnoreNamingRules’ => false, ‘mail_from_address’ => ‘webmaster’, ‘mail_smtpmode’ => ‘smtp’, ‘mail_domain’ => ‘@@@@.com’, ‘loglevel’ => 2, ‘forcessl’ => true, ‘forceSSLforSubdomains’ => true, ‘mail_smtpauthtype’ => ‘LOGIN’, ‘mail_smtpauth’ => 1, ‘mail_smtphost’ => ‘@@@@.com’, ‘mail_smtpport’ => ‘465’, ‘mail_smtpname’ => ‘sendmail@@@@@.com’, ‘mail_smtppassword’ => ‘@@@@@’, ‘mail_smtpsecure’ => ‘ssl’, ‘maintenance’ => false, );
The text was updated successfully, but these errors were encountered:
karlitschek commented Sep 17, 2015
LukasReschke commented Sep 17, 2015
amc2002 commented Sep 17, 2015
Hope this helps
Server configuration
Operating system: CentOS 7 (up-to-date) Linux ownCloud 3.10.0-229.4.2.el7.x86_64
Web server:: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips
Database:: mariadb-server-5.5.44-1.el7_1.x86_64
PHP version:: 5.4.16
ownCloud version: : 8.1.3 (stable)
Updated from an older ownCloud or fresh install: : Updated
List of activated apps:
Enabled:
- activity: 2.0.2
- files: 1.1.10
- files_external: 0.2.3
- files_locking:
- files_pdfviewer: 0.7
- files_sharing: 0.6.2
- files_texteditor: 0.4
- files_trashbin: 0.6.3
- files_versions: 1.0.6
- files_videoviewer: 0.1.3
- firstrunwizard: 1.1
- gallery: 0.6.0
- provisioning_api: 0.2
- templateeditor: 0.1
- user_ldap: 0.6.1
Disabled: - encryption
- external
- user_external
- user_webdavauth
The content of config/config.php: As above
**Are you using external storage: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP
LDAP configuration (delete this part if not used)
| Configuration | s01 |
+——————————-+—————————————————-+
| hasMemberOfFilterSupport | 1 |
| hasPagedResultSupport | |
| homeFolderNamingRule | |
| lastJpegPhotoLookup | 0 |
| ldapAgentName | CN=@@@@@@@@ |
| ldapAgentPassword | *** |
| ldapAttributesForGroupSearch | |
| ldapAttributesForUserSearch | |
| ldapBackupHost | |
| ldapBackupPort | |
| ldapBase | DC=@@@@ |
| ldapBaseGroups | DC=@@@@@ |
| ldapBaseUsers | DC=@@@@@ |
| ldapCacheTTL | 600 |
| ldapConfigurationActive | 1 |
| ldapEmailAttribute | mail |
| ldapExperiencedAdmin | 0 |
| ldapExpertUUIDGroupAttr | |
| ldapExpertUUIDUserAttr | |
| ldapExpertUsernameAttr | |
| ldapGroupDisplayName | cn |
| ldapGroupFilter | |
| ldapGroupFilterGroups | |
| ldapGroupFilterMode | 0 |
| ldapGroupFilterObjectclass | |
| ldapGroupMemberAssocAttr | uniqueMember |
| ldapHost | @@@@@ |
| ldapIgnoreNamingRules | |
| ldapLoginFilter | (&(&(|(objectclass=person)))(samaccountname=%uid)) |
| ldapLoginFilterAttributes | |
| ldapLoginFilterEmail | 0 |
| ldapLoginFilterMode | 1 |
| ldapLoginFilterUsername | 1 |
| ldapNestedGroups | 0 |
| ldapNoCase | 0 |
| ldapOverrideMainServer | 0 |
| ldapPagingSize | 500 |
| ldapPort | 389 |
| ldapQuotaAttribute | |
| ldapQuotaDefault | |
| ldapTLS | 0 |
| ldapUserDisplayName | displayname |
| ldapUserFilter | (&(|(objectclass=person))) |
| ldapUserFilterGroups | |
| ldapUserFilterMode | 1 |
| ldapUserFilterObjectclass | person |
| ldapUuidGroupAttribute | auto |
| ldapUuidUserAttribute | auto |
| turnOffCertCheck | 0 |
| useMemberOfToDetectMembership | 1
detector