Jump to content

Unable to access ACP after switching to using IPv6

Recommended Posts


We've switched our server from IPv4 to IPv6 and now when trying to log in to ACP, we get a timeout 504. Error -200 happens on file upload (actual timeout error 504 on dev console), so we suspect it's solely related to S3.

Turning on slow log for php-fpm produced the following:

script_filename = /var/www/forum/admin/index.php
[0x00007ff526213af0] curl_multi_select() /var/www/forum/system/Http/Request/Curl.php:448
[0x00007ff526213a20] _executeMh() /var/www/forum/system/Http/Request/Curl.php:496
[0x00007ff526213930] _executeAndFollowRedirects() /var/www/forum/system/Http/Request/Curl.php:363
[0x00007ff5262138a0] __call() /var/www/forum/system/File/Amazon.php:776
[0x00007ff5262136a0] makeRequest() /var/www/forum/system/File/Amazon.php:77
[0x00007ff5262135d0] testSettings() /var/www/forum/applications/core/sources/Setup/Upgrade.php:75
[0x00007ff526213460] systemRequirements() /var/www/forum/applications/core/extensions/core/AdminNotifications/ConfigurationError.php:73
[0x00007ff526213370] runChecksAndSendNotifications() /var/www/forum/applications/core/modules/admin/system/login.php:202
[0x00007ff5262132a0] _doLogin() /var/www/forum/applications/core/modules/admin/system/login.php:113
[0x00007ff5262131a0] manage() /var/www/forum/system/Dispatcher/Controller.php:118
[0x00007ff5262130f0] execute() /var/www/forum/system/Dispatcher/Dispatcher.php:153
[0x00007ff526213080] run() /var/www/forum/admin/index.php:13

We're using an Amazon S3 bucket for uploads and apparently the s3.amazonaws.com needs to be replaced with s3.dualstack.[location].amazonaws.com (Using Amazon S3 dual-stack endpoints - Amazon Simple Storage Service)

curl -v http://s3.amazonaws.com/

*   Trying

curl -v http://s3.dualstack.us-east-1.amazonaws.com/

 Trying 2600:1fa0:816f:96e8:34d9:7530:::80...
* Connected to s3.dualstack.us-east-1.amazonaws.com (2600:1fa0:816f:96e8:34d9:7530::) port 80 (#0)
> GET / HTTP/1.1
> Host: s3.dualstack.us-east-1.amazonaws.com
> User-Agent: curl/7.68.0
> Accept: */*
* Mark bundle as not supporting multiuse
< HTTP/1.1 307 Temporary Redirect
< x-amz-id-2: [replaced]
< x-amz-request-id: [replaced]
< Date: Fri, 01 Dec 2023 16:36:58 GMT
< Location: https://aws.amazon.com/s3/
< Server: AmazonS3
< Content-Length: 0
* Connection #0 to host s3.dualstack.us-east-1.amazonaws.com left intact

So i did this:

UPDATE core_file_storage 
SET configuration = JSON_SET(configuration, '$.endpoint', 's3.dualstack.us-east-1.amazonaws.com') 
WHERE id = 2;

Didn't work, so I replaced every instance of s3.amazonaws.com with s3.dualstack.us-east-1.amazonaws.com in /var/www/forum/system/File/Amazon.php

That also didn't work. in constants.php i've tried:

\define( 'CP_DIRECTORY', 'admin123');
\define( 'BYPASS_ACP_IP_CHECK', 'true' );
\define( 'DISABLE_MFA', 'true');
\define( 'RECOVERY_MODE', 'true');

That also hasn't worked. Help 😞

Link to comment
Share on other sites

If you have changed your server configuration and now things aren't working you would need to double check your server configuration. It looks like you're unable to connect to Amazon S3 and that is the root of your problems. I'm afraid, this is outside our scope of software support. You may wish to revert your changes and/or contact a server administrator for assistance.

Link to comment
Share on other sites

We solved it by simply restoring a backup copy of the files and the issue was caused by either corrupted files during the snapshot or caching (the caching method was changed from redis -> file cache before the snapshot). I suspect caching. Anyway, this issue was resolved and sorry for wasting your time.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...