Skip to content

It is possible to create a s3 engine table and invalid credentials that then hangs when inserting data #62371

Closed

Description

@Beetelbrox

Describe the unexpected behaviour

It is possible to successfully create a table with s3 engine with invalid/no credentials even when the trace logs show a bunch of errors trying to connect to the object store. No warning/errors are shown. Then when trying to insert into the table the INSERT query hangs in a retry loop.

How to reproduce

Tested on head (24.4.1.1), found while implementing a fix.

  1. Create a table with S3 engine and no credentials:
CREATE TABLE s3_engine_table
(
    `name` String,
    `value` UInt32
)
ENGINE = S3('https://minio:6000/my-bucket/partition-overwrite/test-data.parquet.gz', 'Parquet')
PARTITION BY name

Query id: 4bfad5f0-ae3d-4aef-b4c0-9c5dea44d0df

Ok.

0 rows in set. Elapsed: 4.169 sec. 

The minio server expect (admin, password) as credentials but the table creation succeeds regardless. Takes ~5 seconds while if credentials are provided succeeds immediately.

The table indeed exists in the database:

DESCRIBE TABLE s3_engine_table

Query id: 5a493898-3081-4f46-b530-b96ae50fcc54

   ┌─name──┬─type───┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┐
1. │ name  │ String │              │                    │         │                  │                │
2. │ value │ UInt32 │              │                    │         │                  │                │
   └───────┴────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘

2 rows in set. Elapsed: 0.001 sec.

Then try to insert some data into it and it will hang:

INSERT INTO s3_engine_table FORMAT Values ('Alice', 0), ('Bob', 1), ('Alice', 2)

Query id: 772c9241-f6ad-4e30-8581-49c1d6961861

Expected behavior
Either s3 engine table creation fails if it's not able to get any credentials from the auth chain or if for some reason we don't want to block table creation we should show some sort of error/warning to the user explaining that the table doesn't have appropriate credentials and insertions will fail.

Error message and/or stacktrace
Stacktrace of the create table:

CREATE TABLE s3_engine_table
(
    `name` String,
    `value` UInt32
)
ENGINE = S3('https://minio:6000/my-bucket/partition-overwrite/test-data.parquet.gz', 'Parquet')
PARTITION BY name

Query id: e4b73ad9-7518-424e-a4f4-7638cd341df7

2024.04.07 09:44:04.398010 [ 1048257 ] {} <Trace> LOCAL-Session: 0176d551-4953-4e29-858e-ba068bb447d2 Creating query context from session context, user_id: 94309d50-4f52-5250-31bd-74fecac179db, parent context user: default
2024.04.07 09:44:04.398058 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Debug> executeQuery: (from 0.0.0.0:0, user: ) CREATE TABLE s3_engine_table ( `name` String, `value` UInt32 ) ENGINE = S3('https://minio:6000/my-bucket/partition-overwrite/test-data.parquet.gz', 'Parquet') PARTITION BY name (stage: Complete)
2024.04.07 09:44:04.398090 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Trace> ContextAccess (default): Access granted: CREATE TABLE ON default.s3_engine_table
2024.04.07 09:44:04.398095 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Trace> ContextAccess (default): Access granted: S3 ON *.*
2024.04.07 09:44:04.398105 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Trace> ContextAccess (default): Access granted: S3 ON *.*
2024.04.07 09:44:04.398183 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Trace> NamedCollectionsUtils: Loaded 0 collections from config
2024.04.07 09:44:04.398311 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Trace> NamedCollectionsUtils: Loaded 0 collections from SQL
2024.04.07 09:44:04.410168 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Warning> AwsAuthSTSAssumeRoleWebIdentityCredentialsProvider: Token file must be specified to use STS AssumeRole web identity creds provider.
2024.04.07 09:44:04.410197 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: SSOBearerTokenProvider: Setting sso bearerToken provider to read config from default
2024.04.07 09:44:04.410202 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Trace> SSOCredentialsProvider: Setting sso credentials provider to read config from default
2024.04.07 09:44:04.410205 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Debug> S3CredentialsProviderChain: The environment variable value AWS_CONTAINER_CREDENTIALS_RELATIVE_URI is 
2024.04.07 09:44:04.410306 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Debug> S3CredentialsProviderChain: The environment variable value AWS_CONTAINER_CREDENTIALS_FULL_URI is 
2024.04.07 09:44:04.410310 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Debug> S3CredentialsProviderChain: The environment variable value AWS_EC2_METADATA_DISABLED is 
2024.04.07 09:44:04.410336 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: AWSHttpResourceClient: Creating AWSHttpResourceClient with max connections 2 and scheme http
2024.04.07 09:44:04.410342 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSInstanceProfileCredentialsProvider: Creating Instance with injected EC2MetadataClient and refresh rate.
2024.04.07 09:44:04.410347 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> S3CredentialsProviderChain: Added EC2 metadata service credentials provider to the provider chain.
2024.04.07 09:44:04.410354 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: Aws::Config::AWSConfigFileProfileConfigLoader: Initializing config loader against fileName /Users/fjurado/.aws/credentials and using profilePrefix = 0
2024.04.07 09:44:04.410358 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: ProfileConfigFileAWSCredentialsProvider: Setting provider to read credentials from /Users/fjurado/.aws/credentials for credentials file and /Users/fjurado/.aws/config for the config file , for use with profile default
2024.04.07 09:44:04.410401 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSInstanceProfileCredentialsProvider: Credentials have expired attempting to repull from EC2 Metadata Service.
2024.04.07 09:44:04.410416 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Trace> AWSEC2InstanceProfileConfigLoader: Calling EC2MetadataService to get token.
2024.04.07 09:44:05.482329 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: Failed to make request to: http://169.254.169.254/latest/api/token: Poco::Exception. Code: 1000, e.code() = 0, Timeout: connect timed out: 169.254.169.254:80, Stack trace (when copying this message, always include the lines below):

0. Poco::Exception::Exception(String const&, String const&, int) @ 0x000000010b903e28
1. Poco::TimeoutException::TimeoutException(String const&, String const&, int) @ 0x000000010b9095ac
2. Poco::Net::SocketImpl::connect(Poco::Net::SocketAddress const&, Poco::Timespan const&) @ 0x000000010b7fc40c
3. Poco::Net::HTTPSession::connect(Poco::Net::SocketAddress const&) @ 0x000000010b7de19c
4. Poco::Net::HTTPClientSession::reconnect() @ 0x000000010b7ce2dc
5. DB::EndpointConnectionPool<Poco::Net::HTTPClientSession>::prepareNewConnection(DB::ConnectionTimeouts const&) @ 0x0000000104d4e0fc
6. DB::EndpointConnectionPool<Poco::Net::HTTPClientSession>::getConnection(DB::ConnectionTimeouts const&) @ 0x0000000104d4d7ec
7. DB::makeHTTPSession(DB::HTTPConnectionGroupType, Poco::URI const&, DB::ConnectionTimeouts const&, DB::ProxyConfiguration) @ 0x0000000104e26210
8. DB::S3::PocoHTTPClient::makeRequestInternalImpl(Aws::Http::HttpRequest&, DB::ProxyConfiguration const&, std::shared_ptr<DB::S3::PocoHTTPResponse>&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const @ 0x0000000104eead60
9. DB::S3::PocoHTTPClient::MakeRequest(std::shared_ptr<Aws::Http::HttpRequest> const&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const @ 0x0000000104ee9868
10. Aws::Internal::AWSHttpResourceClient::GetResourceWithAWSWebServiceResult(std::shared_ptr<Aws::Http::HttpRequest> const&) const @ 0x000000010ba40784
11. DB::S3::AWSEC2MetadataClient::getEC2MetadataToken(String const&) const @ 0x0000000104ed74e0
12. DB::S3::AWSEC2MetadataClient::getDefaultCredentialsSecurely() const @ 0x0000000104ed5b94
13. DB::S3::AWSEC2InstanceProfileConfigLoader::LoadInternal() @ 0x0000000104ed9688
14. Aws::Config::AWSProfileConfigLoader::Load() @ 0x000000010ba1a2b0
15. DB::S3::AWSInstanceProfileCredentialsProvider::Reload() @ 0x0000000104edad60
16. DB::S3::AWSInstanceProfileCredentialsProvider::refreshIfExpired() @ 0x0000000104edab18
17. DB::S3::AWSInstanceProfileCredentialsProvider::GetAWSCredentials() @ 0x0000000104eda920
18. Aws::Auth::AWSCredentialsProviderChain::GetAWSCredentials() @ 0x000000010b9cb430
19. Aws::Client::AWSAuthV4Signer::AWSAuthV4Signer(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, char const*, String const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool, Aws::Auth::AWSSigningAlgorithm) @ 0x000000010b9e1108
20. Aws::Auth::DefaultAuthSignerProvider::DefaultAuthSignerProvider(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, String const&, String const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool) @ 0x000000010b9d8f84
21. Aws::Auth::S3ExpressSignerProvider::S3ExpressSignerProvider(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, std::shared_ptr<Aws::S3::S3ExpressIdentityProvider> const&, String const&, String const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool) @ 0x000000010bb7b668
22. Aws::Auth::S3ExpressSignerProvider* std::construct_at[abi:v15000]<Aws::Auth::S3ExpressSignerProvider, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, std::shared_ptr<Aws::S3::DefaultS3ExpressIdentityProvider>, char const*&, String, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy&, bool, Aws::Auth::S3ExpressSignerProvider*>(Aws::Auth::S3ExpressSignerProvider*, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, std::shared_ptr<Aws::S3::DefaultS3ExpressIdentityProvider>&&, char const*&, String&&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy&, bool&&) @ 0x000000010bb19204
23. Aws::S3::S3Client::S3Client(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, Aws::Client::ClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool, Aws::S3::US_EAST_1_REGIONAL_ENDPOINT_OPTION) @ 0x000000010ba7982c
24. DB::S3::Client::Client(unsigned long, DB::S3::ServerSideEncryptionKMSConfig, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, DB::S3::PocoHTTPClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, DB::S3::ClientSettings const&) @ 0x0000000104eab814
25. DB::S3::Client::create(unsigned long, DB::S3::ServerSideEncryptionKMSConfig, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, DB::S3::PocoHTTPClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, DB::S3::ClientSettings const&) @ 0x0000000104eab634
26. DB::S3::ClientFactory::create(DB::S3::PocoHTTPClientConfiguration const&, DB::S3::ClientSettings, String const&, String const&, String const&, DB::S3::ServerSideEncryptionKMSConfig, std::vector<DB::HTTPHeaderEntry, std::allocator<DB::HTTPHeaderEntry>>, DB::S3::CredentialsConfiguration, String const&) @ 0x0000000104ec62ec
27. DB::StorageS3::Configuration::connect(std::shared_ptr<DB::Context const> const&) @ 0x0000000109eec924
28. DB::StorageS3::Configuration::update(std::shared_ptr<DB::Context const> const&) @ 0x0000000109eec024
29. DB::StorageS3::StorageS3(DB::StorageS3::Configuration const&, std::shared_ptr<DB::Context const> const&, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>, bool, std::shared_ptr<DB::IAST>) @ 0x0000000109ee7960
30. DB::StorageS3* std::construct_at[abi:v15000]<DB::StorageS3, DB::StorageS3::Configuration, std::shared_ptr<DB::Context>, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>&, bool, std::shared_ptr<DB::IAST>&, DB::StorageS3*>(DB::StorageS3*, DB::StorageS3::Configuration&&, std::shared_ptr<DB::Context>&&, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>&, bool&&, std::shared_ptr<DB::IAST>&) @ 0x0000000109f00054
31. std::shared_ptr<DB::StorageS3> std::allocate_shared[abi:v15000]<DB::StorageS3, std::allocator<DB::StorageS3>, DB::StorageS3::Configuration, std::shared_ptr<DB::Context>, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>&, bool, std::shared_ptr<DB::IAST>&, void>(std::allocator<DB::StorageS3> const&, DB::StorageS3::Configuration&&, std::shared_ptr<DB::Context>&&, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>&, bool&&, std::shared_ptr<DB::IAST>&) @ 0x0000000109effecc
 (version 24.4.1.1)
2024.04.07 09:44:05.482629 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: AWSHttpResourceClient: Http request to retrieve credentials failed
2024.04.07 09:44:05.482638 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: AWSHttpResourceClient: Request failed, now waiting 0 ms before attempting again.
2024.04.07 09:44:06.484732 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: Failed to make request to: http://169.254.169.254/latest/api/token: Poco::Exception. Code: 1000, e.code() = 0, Timeout: connect timed out: 169.254.169.254:80, Stack trace (when copying this message, always include the lines below):

0. Poco::Exception::Exception(String const&, String const&, int) @ 0x000000010b903e28
1. Poco::TimeoutException::TimeoutException(String const&, String const&, int) @ 0x000000010b9095ac
2. Poco::Net::SocketImpl::connect(Poco::Net::SocketAddress const&, Poco::Timespan const&) @ 0x000000010b7fc40c
3. Poco::Net::HTTPSession::connect(Poco::Net::SocketAddress const&) @ 0x000000010b7de19c
4. Poco::Net::HTTPClientSession::reconnect() @ 0x000000010b7ce2dc
5. DB::EndpointConnectionPool<Poco::Net::HTTPClientSession>::prepareNewConnection(DB::ConnectionTimeouts const&) @ 0x0000000104d4e0fc
6. DB::EndpointConnectionPool<Poco::Net::HTTPClientSession>::getConnection(DB::ConnectionTimeouts const&) @ 0x0000000104d4d7ec
7. DB::makeHTTPSession(DB::HTTPConnectionGroupType, Poco::URI const&, DB::ConnectionTimeouts const&, DB::ProxyConfiguration) @ 0x0000000104e26210
8. DB::S3::PocoHTTPClient::makeRequestInternalImpl(Aws::Http::HttpRequest&, DB::ProxyConfiguration const&, std::shared_ptr<DB::S3::PocoHTTPResponse>&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const @ 0x0000000104eead60
9. DB::S3::PocoHTTPClient::MakeRequest(std::shared_ptr<Aws::Http::HttpRequest> const&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const @ 0x0000000104ee9868
10. Aws::Internal::AWSHttpResourceClient::GetResourceWithAWSWebServiceResult(std::shared_ptr<Aws::Http::HttpRequest> const&) const @ 0x000000010ba40784
11. DB::S3::AWSEC2MetadataClient::getEC2MetadataToken(String const&) const @ 0x0000000104ed74e0
12. DB::S3::AWSEC2MetadataClient::getDefaultCredentialsSecurely() const @ 0x0000000104ed5b94
13. DB::S3::AWSEC2InstanceProfileConfigLoader::LoadInternal() @ 0x0000000104ed9688
14. Aws::Config::AWSProfileConfigLoader::Load() @ 0x000000010ba1a2b0
15. DB::S3::AWSInstanceProfileCredentialsProvider::Reload() @ 0x0000000104edad60
16. DB::S3::AWSInstanceProfileCredentialsProvider::refreshIfExpired() @ 0x0000000104edab18
17. DB::S3::AWSInstanceProfileCredentialsProvider::GetAWSCredentials() @ 0x0000000104eda920
18. Aws::Auth::AWSCredentialsProviderChain::GetAWSCredentials() @ 0x000000010b9cb430
19. Aws::Client::AWSAuthV4Signer::AWSAuthV4Signer(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, char const*, String const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool, Aws::Auth::AWSSigningAlgorithm) @ 0x000000010b9e1108
20. Aws::Auth::DefaultAuthSignerProvider::DefaultAuthSignerProvider(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, String const&, String const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool) @ 0x000000010b9d8f84
21. Aws::Auth::S3ExpressSignerProvider::S3ExpressSignerProvider(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, std::shared_ptr<Aws::S3::S3ExpressIdentityProvider> const&, String const&, String const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool) @ 0x000000010bb7b668
22. Aws::Auth::S3ExpressSignerProvider* std::construct_at[abi:v15000]<Aws::Auth::S3ExpressSignerProvider, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, std::shared_ptr<Aws::S3::DefaultS3ExpressIdentityProvider>, char const*&, String, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy&, bool, Aws::Auth::S3ExpressSignerProvider*>(Aws::Auth::S3ExpressSignerProvider*, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, std::shared_ptr<Aws::S3::DefaultS3ExpressIdentityProvider>&&, char const*&, String&&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy&, bool&&) @ 0x000000010bb19204
23. Aws::S3::S3Client::S3Client(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, Aws::Client::ClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool, Aws::S3::US_EAST_1_REGIONAL_ENDPOINT_OPTION) @ 0x000000010ba7982c
24. DB::S3::Client::Client(unsigned long, DB::S3::ServerSideEncryptionKMSConfig, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, DB::S3::PocoHTTPClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, DB::S3::ClientSettings const&) @ 0x0000000104eab814
25. DB::S3::Client::create(unsigned long, DB::S3::ServerSideEncryptionKMSConfig, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, DB::S3::PocoHTTPClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, DB::S3::ClientSettings const&) @ 0x0000000104eab634
26. DB::S3::ClientFactory::create(DB::S3::PocoHTTPClientConfiguration const&, DB::S3::ClientSettings, String const&, String const&, String const&, DB::S3::ServerSideEncryptionKMSConfig, std::vector<DB::HTTPHeaderEntry, std::allocator<DB::HTTPHeaderEntry>>, DB::S3::CredentialsConfiguration, String const&) @ 0x0000000104ec62ec
27. DB::StorageS3::Configuration::connect(std::shared_ptr<DB::Context const> const&) @ 0x0000000109eec924
28. DB::StorageS3::Configuration::update(std::shared_ptr<DB::Context const> const&) @ 0x0000000109eec024
29. DB::StorageS3::StorageS3(DB::StorageS3::Configuration const&, std::shared_ptr<DB::Context const> const&, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>, bool, std::shared_ptr<DB::IAST>) @ 0x0000000109ee7960
30. DB::StorageS3* std::construct_at[abi:v15000]<DB::StorageS3, DB::StorageS3::Configuration, std::shared_ptr<DB::Context>, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>&, bool, std::shared_ptr<DB::IAST>&, DB::StorageS3*>(DB::StorageS3*, DB::StorageS3::Configuration&&, std::shared_ptr<DB::Context>&&, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>&, bool&&, std::shared_ptr<DB::IAST>&) @ 0x0000000109f00054
31. std::shared_ptr<DB::StorageS3> std::allocate_shared[abi:v15000]<DB::StorageS3, std::allocator<DB::StorageS3>, DB::StorageS3::Configuration, std::shared_ptr<DB::Context>, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>&, bool, std::shared_ptr<DB::IAST>&, void>(std::allocator<DB::StorageS3> const&, DB::StorageS3::Configuration&&, std::shared_ptr<DB::Context>&&, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>&, bool&&, std::shared_ptr<DB::IAST>&) @ 0x0000000109effecc
 (version 24.4.1.1)
2024.04.07 09:44:06.485921 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: AWSHttpResourceClient: Http request to retrieve credentials failed
2024.04.07 09:44:06.485968 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: AWSHttpResourceClient: Can not retrieve resource from http://169.254.169.254/latest/api/token
2024.04.07 09:44:06.486034 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Trace> AWSEC2InstanceProfileConfigLoader: Calling EC2MetadataService to get token failed, falling back to less secure way. HTTP response code: REQUEST_NOT_MADE
2024.04.07 09:44:06.486052 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Trace> AWSEC2InstanceProfileConfigLoader: Getting default credentials for ec2 instance from http://169.254.169.254
2024.04.07 09:44:07.551573 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: Failed to make request to: http://169.254.169.254/latest/meta-data/iam/security-credentials: Poco::Exception. Code: 1000, e.code() = 0, Timeout: connect timed out: 169.254.169.254:80, Stack trace (when copying this message, always include the lines below):

0. Poco::Exception::Exception(String const&, String const&, int) @ 0x000000010b903e28
1. Poco::TimeoutException::TimeoutException(String const&, String const&, int) @ 0x000000010b9095ac
2. Poco::Net::SocketImpl::connect(Poco::Net::SocketAddress const&, Poco::Timespan const&) @ 0x000000010b7fc40c
3. Poco::Net::HTTPSession::connect(Poco::Net::SocketAddress const&) @ 0x000000010b7de19c
4. Poco::Net::HTTPClientSession::reconnect() @ 0x000000010b7ce2dc
5. DB::EndpointConnectionPool<Poco::Net::HTTPClientSession>::prepareNewConnection(DB::ConnectionTimeouts const&) @ 0x0000000104d4e0fc
6. DB::EndpointConnectionPool<Poco::Net::HTTPClientSession>::getConnection(DB::ConnectionTimeouts const&) @ 0x0000000104d4d7ec
7. DB::makeHTTPSession(DB::HTTPConnectionGroupType, Poco::URI const&, DB::ConnectionTimeouts const&, DB::ProxyConfiguration) @ 0x0000000104e26210
8. DB::S3::PocoHTTPClient::makeRequestInternalImpl(Aws::Http::HttpRequest&, DB::ProxyConfiguration const&, std::shared_ptr<DB::S3::PocoHTTPResponse>&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const @ 0x0000000104eead60
9. DB::S3::PocoHTTPClient::MakeRequest(std::shared_ptr<Aws::Http::HttpRequest> const&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const @ 0x0000000104ee9868
10. Aws::Internal::AWSHttpResourceClient::GetResourceWithAWSWebServiceResult(std::shared_ptr<Aws::Http::HttpRequest> const&) const @ 0x000000010ba40784
11. Aws::Internal::AWSHttpResourceClient::GetResourceWithAWSWebServiceResult(char const*, char const*, char const*) const @ 0x000000010ba4036c
12. DB::S3::AWSEC2MetadataClient::getDefaultCredentials() const @ 0x0000000104ed49cc
13. DB::S3::AWSEC2MetadataClient::getDefaultCredentialsSecurely() const @ 0x0000000104ed5e68
14. DB::S3::AWSEC2InstanceProfileConfigLoader::LoadInternal() @ 0x0000000104ed9688
15. Aws::Config::AWSProfileConfigLoader::Load() @ 0x000000010ba1a2b0
16. DB::S3::AWSInstanceProfileCredentialsProvider::Reload() @ 0x0000000104edad60
17. DB::S3::AWSInstanceProfileCredentialsProvider::refreshIfExpired() @ 0x0000000104edab18
18. DB::S3::AWSInstanceProfileCredentialsProvider::GetAWSCredentials() @ 0x0000000104eda920
19. Aws::Auth::AWSCredentialsProviderChain::GetAWSCredentials() @ 0x000000010b9cb430
20. Aws::Client::AWSAuthV4Signer::AWSAuthV4Signer(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, char const*, String const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool, Aws::Auth::AWSSigningAlgorithm) @ 0x000000010b9e1108
21. Aws::Auth::DefaultAuthSignerProvider::DefaultAuthSignerProvider(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, String const&, String const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool) @ 0x000000010b9d8f84
22. Aws::Auth::S3ExpressSignerProvider::S3ExpressSignerProvider(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, std::shared_ptr<Aws::S3::S3ExpressIdentityProvider> const&, String const&, String const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool) @ 0x000000010bb7b668
23. Aws::Auth::S3ExpressSignerProvider* std::construct_at[abi:v15000]<Aws::Auth::S3ExpressSignerProvider, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, std::shared_ptr<Aws::S3::DefaultS3ExpressIdentityProvider>, char const*&, String, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy&, bool, Aws::Auth::S3ExpressSignerProvider*>(Aws::Auth::S3ExpressSignerProvider*, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, std::shared_ptr<Aws::S3::DefaultS3ExpressIdentityProvider>&&, char const*&, String&&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy&, bool&&) @ 0x000000010bb19204
24. Aws::S3::S3Client::S3Client(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, Aws::Client::ClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool, Aws::S3::US_EAST_1_REGIONAL_ENDPOINT_OPTION) @ 0x000000010ba7982c
25. DB::S3::Client::Client(unsigned long, DB::S3::ServerSideEncryptionKMSConfig, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, DB::S3::PocoHTTPClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, DB::S3::ClientSettings const&) @ 0x0000000104eab814
26. DB::S3::Client::create(unsigned long, DB::S3::ServerSideEncryptionKMSConfig, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, DB::S3::PocoHTTPClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, DB::S3::ClientSettings const&) @ 0x0000000104eab634
27. DB::S3::ClientFactory::create(DB::S3::PocoHTTPClientConfiguration const&, DB::S3::ClientSettings, String const&, String const&, String const&, DB::S3::ServerSideEncryptionKMSConfig, std::vector<DB::HTTPHeaderEntry, std::allocator<DB::HTTPHeaderEntry>>, DB::S3::CredentialsConfiguration, String const&) @ 0x0000000104ec62ec
28. DB::StorageS3::Configuration::connect(std::shared_ptr<DB::Context const> const&) @ 0x0000000109eec924
29. DB::StorageS3::Configuration::update(std::shared_ptr<DB::Context const> const&) @ 0x0000000109eec024
30. DB::StorageS3::StorageS3(DB::StorageS3::Configuration const&, std::shared_ptr<DB::Context const> const&, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>, bool, std::shared_ptr<DB::IAST>) @ 0x0000000109ee7960
31. DB::StorageS3* std::construct_at[abi:v15000]<DB::StorageS3, DB::StorageS3::Configuration, std::shared_ptr<DB::Context>, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>&, bool, std::shared_ptr<DB::IAST>&, DB::StorageS3*>(DB::StorageS3*, DB::StorageS3::Configuration&&, std::shared_ptr<DB::Context>&&, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>&, bool&&, std::shared_ptr<DB::IAST>&) @ 0x0000000109f00054
 (version 24.4.1.1)
2024.04.07 09:44:07.551840 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: AWSHttpResourceClient: Http request to retrieve credentials failed
2024.04.07 09:44:07.551849 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: AWSHttpResourceClient: Request failed, now waiting 0 ms before attempting again.
2024.04.07 09:44:08.553368 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: Failed to make request to: http://169.254.169.254/latest/meta-data/iam/security-credentials: Poco::Exception. Code: 1000, e.code() = 0, Timeout: connect timed out: 169.254.169.254:80, Stack trace (when copying this message, always include the lines below):

0. Poco::Exception::Exception(String const&, String const&, int) @ 0x000000010b903e28
1. Poco::TimeoutException::TimeoutException(String const&, String const&, int) @ 0x000000010b9095ac
2. Poco::Net::SocketImpl::connect(Poco::Net::SocketAddress const&, Poco::Timespan const&) @ 0x000000010b7fc40c
3. Poco::Net::HTTPSession::connect(Poco::Net::SocketAddress const&) @ 0x000000010b7de19c
4. Poco::Net::HTTPClientSession::reconnect() @ 0x000000010b7ce2dc
5. DB::EndpointConnectionPool<Poco::Net::HTTPClientSession>::prepareNewConnection(DB::ConnectionTimeouts const&) @ 0x0000000104d4e0fc
6. DB::EndpointConnectionPool<Poco::Net::HTTPClientSession>::getConnection(DB::ConnectionTimeouts const&) @ 0x0000000104d4d7ec
7. DB::makeHTTPSession(DB::HTTPConnectionGroupType, Poco::URI const&, DB::ConnectionTimeouts const&, DB::ProxyConfiguration) @ 0x0000000104e26210
8. DB::S3::PocoHTTPClient::makeRequestInternalImpl(Aws::Http::HttpRequest&, DB::ProxyConfiguration const&, std::shared_ptr<DB::S3::PocoHTTPResponse>&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const @ 0x0000000104eead60
9. DB::S3::PocoHTTPClient::MakeRequest(std::shared_ptr<Aws::Http::HttpRequest> const&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const @ 0x0000000104ee9868
10. Aws::Internal::AWSHttpResourceClient::GetResourceWithAWSWebServiceResult(std::shared_ptr<Aws::Http::HttpRequest> const&) const @ 0x000000010ba40784
11. Aws::Internal::AWSHttpResourceClient::GetResourceWithAWSWebServiceResult(char const*, char const*, char const*) const @ 0x000000010ba4036c
12. DB::S3::AWSEC2MetadataClient::getDefaultCredentials() const @ 0x0000000104ed49cc
13. DB::S3::AWSEC2MetadataClient::getDefaultCredentialsSecurely() const @ 0x0000000104ed5e68
14. DB::S3::AWSEC2InstanceProfileConfigLoader::LoadInternal() @ 0x0000000104ed9688
15. Aws::Config::AWSProfileConfigLoader::Load() @ 0x000000010ba1a2b0
16. DB::S3::AWSInstanceProfileCredentialsProvider::Reload() @ 0x0000000104edad60
17. DB::S3::AWSInstanceProfileCredentialsProvider::refreshIfExpired() @ 0x0000000104edab18
18. DB::S3::AWSInstanceProfileCredentialsProvider::GetAWSCredentials() @ 0x0000000104eda920
19. Aws::Auth::AWSCredentialsProviderChain::GetAWSCredentials() @ 0x000000010b9cb430
20. Aws::Client::AWSAuthV4Signer::AWSAuthV4Signer(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, char const*, String const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool, Aws::Auth::AWSSigningAlgorithm) @ 0x000000010b9e1108
21. Aws::Auth::DefaultAuthSignerProvider::DefaultAuthSignerProvider(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, String const&, String const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool) @ 0x000000010b9d8f84
22. Aws::Auth::S3ExpressSignerProvider::S3ExpressSignerProvider(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, std::shared_ptr<Aws::S3::S3ExpressIdentityProvider> const&, String const&, String const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool) @ 0x000000010bb7b668
23. Aws::Auth::S3ExpressSignerProvider* std::construct_at[abi:v15000]<Aws::Auth::S3ExpressSignerProvider, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, std::shared_ptr<Aws::S3::DefaultS3ExpressIdentityProvider>, char const*&, String, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy&, bool, Aws::Auth::S3ExpressSignerProvider*>(Aws::Auth::S3ExpressSignerProvider*, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, std::shared_ptr<Aws::S3::DefaultS3ExpressIdentityProvider>&&, char const*&, String&&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy&, bool&&) @ 0x000000010bb19204
24. Aws::S3::S3Client::S3Client(std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, Aws::Client::ClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool, Aws::S3::US_EAST_1_REGIONAL_ENDPOINT_OPTION) @ 0x000000010ba7982c
25. DB::S3::Client::Client(unsigned long, DB::S3::ServerSideEncryptionKMSConfig, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, DB::S3::PocoHTTPClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, DB::S3::ClientSettings const&) @ 0x0000000104eab814
26. DB::S3::Client::create(unsigned long, DB::S3::ServerSideEncryptionKMSConfig, std::shared_ptr<Aws::Auth::AWSCredentialsProvider> const&, DB::S3::PocoHTTPClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, DB::S3::ClientSettings const&) @ 0x0000000104eab634
27. DB::S3::ClientFactory::create(DB::S3::PocoHTTPClientConfiguration const&, DB::S3::ClientSettings, String const&, String const&, String const&, DB::S3::ServerSideEncryptionKMSConfig, std::vector<DB::HTTPHeaderEntry, std::allocator<DB::HTTPHeaderEntry>>, DB::S3::CredentialsConfiguration, String const&) @ 0x0000000104ec62ec
28. DB::StorageS3::Configuration::connect(std::shared_ptr<DB::Context const> const&) @ 0x0000000109eec924
29. DB::StorageS3::Configuration::update(std::shared_ptr<DB::Context const> const&) @ 0x0000000109eec024
30. DB::StorageS3::StorageS3(DB::StorageS3::Configuration const&, std::shared_ptr<DB::Context const> const&, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>, bool, std::shared_ptr<DB::IAST>) @ 0x0000000109ee7960
31. DB::StorageS3* std::construct_at[abi:v15000]<DB::StorageS3, DB::StorageS3::Configuration, std::shared_ptr<DB::Context>, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>&, bool, std::shared_ptr<DB::IAST>&, DB::StorageS3*>(DB::StorageS3*, DB::StorageS3::Configuration&&, std::shared_ptr<DB::Context>&&, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>&, bool&&, std::shared_ptr<DB::IAST>&) @ 0x0000000109f00054
 (version 24.4.1.1)
2024.04.07 09:44:08.553764 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: AWSHttpResourceClient: Http request to retrieve credentials failed
2024.04.07 09:44:08.553781 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: AWSHttpResourceClient: Can not retrieve resource from http://169.254.169.254/latest/meta-data/iam/security-credentials
2024.04.07 09:44:08.553792 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: Aws::Config::AWSProfileConfigLoaderBase: Failed to reload configuration.
2024.04.07 09:44:08.553830 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: Aws::Config::AWSConfigFileProfileConfigLoader: Unable to open config file /Users/fjurado/.aws/credentials for reading.
2024.04.07 09:44:08.553837 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Information> AWSClient: Aws::Config::AWSProfileConfigLoaderBase: Failed to reload configuration.
2024.04.07 09:44:08.555289 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Trace> S3Client: Provider type: Unknown
2024.04.07 09:44:08.555299 [ 1048257 ] {e4b73ad9-7518-424e-a4f4-7638cd341df7} <Trace> S3Client: API mode of the S3 client: AWS
Ok.

0 rows in set. Elapsed: 4.157 sec. 

INSERT INTO query stacktrace:

INSERT INTO s3_engine_table FORMAT Values

Query id: 2598f3f5-debe-4f45-8ac8-2dffbcd72056

2024.04.07 09:45:13.308864 [ 1048257 ] {} <Trace> LOCAL-Session: 0176d551-4953-4e29-858e-ba068bb447d2 Creating query context from session context, user_id: 94309d50-4f52-5250-31bd-74fecac179db, parent context user: default
2024.04.07 09:45:13.308932 [ 1048257 ] {2598f3f5-debe-4f45-8ac8-2dffbcd72056} <Debug> executeQuery: (from 0.0.0.0:0, user: ) INSERT INTO s3_engine_table VALUES  (stage: Complete)
2024.04.07 09:45:13.309021 [ 1048257 ] {2598f3f5-debe-4f45-8ac8-2dffbcd72056} <Trace> ContextAccess (default): Access granted: INSERT(name, value) ON default.s3_engine_table
2024.04.07 09:45:13.384025 [ 1048257 ] {2598f3f5-debe-4f45-8ac8-2dffbcd72056} <Information> AWSClient: Failed to make request to: https://minio:6000/my-bucket/partition-overwrite/test-data.parquet.gz: Poco::Exception. Code: 1000, e.code() = 0, SSL Exception: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER, Stack trace (when copying this message, always include the lines below):

0. Poco::Exception::Exception(String const&, int) @ 0x000000010b903be0
1. Poco::IOException::IOException(String const&, int) @ 0x000000010b90e22c
2. Poco::Net::NetException::NetException(String const&, int) @ 0x000000010b7ee80c
3. Poco::Net::SSLException::SSLException(String const&, int) @ 0x000000010b7b3dac
4. Poco::Net::SecureSocketImpl::handleError(int) @ 0x000000010b7be570
5. Poco::Net::SecureSocketImpl::connectSSL(bool) @ 0x000000010b7bd864
6. Poco::Net::SecureSocketImpl::connect(Poco::Net::SocketAddress const&, Poco::Timespan const&, bool) @ 0x000000010b7bdc10
7. Poco::Net::SecureStreamSocketImpl::connect(Poco::Net::SocketAddress const&, Poco::Timespan const&) @ 0x000000010b7c26e4
8. Poco::Net::HTTPSession::connect(Poco::Net::SocketAddress const&) @ 0x000000010b7de19c
9. Poco::Net::HTTPSClientSession::connect(Poco::Net::SocketAddress const&) @ 0x000000010b7b02d0
10. Poco::Net::HTTPClientSession::reconnect() @ 0x000000010b7ce2dc
11. DB::EndpointConnectionPool<Poco::Net::HTTPSClientSession>::prepareNewConnection(DB::ConnectionTimeouts const&) @ 0x0000000104d4adfc
12. DB::EndpointConnectionPool<Poco::Net::HTTPSClientSession>::getConnection(DB::ConnectionTimeouts const&) @ 0x0000000104d4a4ec
13. DB::makeHTTPSession(DB::HTTPConnectionGroupType, Poco::URI const&, DB::ConnectionTimeouts const&, DB::ProxyConfiguration) @ 0x0000000104e26210
14. DB::S3::PocoHTTPClient::makeRequestInternalImpl(Aws::Http::HttpRequest&, DB::ProxyConfiguration const&, std::shared_ptr<DB::S3::PocoHTTPResponse>&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const @ 0x0000000104eead60
15. DB::S3::PocoHTTPClient::MakeRequest(std::shared_ptr<Aws::Http::HttpRequest> const&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const @ 0x0000000104ee9868
16. std::shared_ptr<Aws::Http::HttpResponse> smithy::components::tracing::TracingUtils::MakeCallWithTiming<std::shared_ptr<Aws::Http::HttpResponse>>(std::function<std::shared_ptr<Aws::Http::HttpResponse> ()>, String const&, smithy::components::tracing::Meter const&, std::map<String, String, std::less<String>, std::allocator<std::pair<String const, String>>>&&, String const&) @ 0x000000010b9f4b30
17. Aws::Client::AWSClient::AttemptOneRequest(std::shared_ptr<Aws::Http::HttpRequest> const&, Aws::AmazonWebServiceRequest const&, char const*, char const*, char const*) const @ 0x000000010b9ee758
18. Aws::Client::AWSClient::AttemptExhaustively(Aws::Http::URI const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod, char const*, char const*, char const*) const @ 0x000000010b9eac30
19. Aws::Client::AWSXMLClient::MakeRequest(Aws::Http::URI const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod, char const*, char const*, char const*) const @ 0x000000010b9ff7a8
20. Aws::Utils::Outcome<Aws::S3::Model::HeadObjectResult, Aws::S3::S3Error> std::__function::__policy_invoker<Aws::Utils::Outcome<Aws::S3::Model::HeadObjectResult, Aws::S3::S3Error> ()>::__call_impl<std::__function::__default_alloc_func<Aws::S3::S3Client::HeadObject(Aws::S3::Model::HeadObjectRequest const&) const::$_0, Aws::Utils::Outcome<Aws::S3::Model::HeadObjectResult, Aws::S3::S3Error> ()>>(std::__function::__policy_storage const*) @ 0x000000010bb4bd4c
21. Aws::Utils::Outcome<Aws::S3::Model::HeadObjectResult, Aws::S3::S3Error> smithy::components::tracing::TracingUtils::MakeCallWithTiming<Aws::Utils::Outcome<Aws::S3::Model::HeadObjectResult, Aws::S3::S3Error>>(std::function<Aws::Utils::Outcome<Aws::S3::Model::HeadObjectResult, Aws::S3::S3Error> ()>, String const&, smithy::components::tracing::Meter const&, std::map<String, String, std::less<String>, std::allocator<std::pair<String const, String>>>&&, String const&) @ 0x000000010bad3b58
22. Aws::S3::S3Client::HeadObject(Aws::S3::Model::HeadObjectRequest const&) const @ 0x000000010bad31b4
23. DB::S3::Client::HeadObject(DB::S3::ExtendedRequest<Aws::S3::Model::HeadObjectRequest>&) const @ 0x0000000104eaeac4
24. DB::S3::(anonymous namespace)::tryGetObjectInfo(DB::S3::Client const&, String const&, String const&, String const&, DB::S3Settings::RequestSettings const&, bool, bool) @ 0x0000000104eff4fc
25. DB::S3::objectExists(DB::S3::Client const&, String const&, String const&, String const&, DB::S3Settings::RequestSettings const&, bool) @ 0x0000000104eff844
26. DB::createStorageS3Sink(DB::StorageS3::Configuration const&, std::shared_ptr<DB::Context const> const&, DB::Block const&, std::optional<DB::FormatSettings>, DB::CompressionMethod, String const&, String const&) @ 0x0000000109eeac0c
27. DB::StorageS3::write(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::shared_ptr<DB::Context const>, bool) @ 0x0000000109eea84c
28. DB::buildPushingToViewsChain(std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::shared_ptr<DB::Context const>, std::shared_ptr<DB::IAST> const&, bool, std::shared_ptr<DB::ThreadStatusesHolder>, std::shared_ptr<DB::ThreadGroup>, std::atomic<unsigned long long>*, bool, DB::Block const&) @ 0x000000010a7e7264
29. DB::InterpreterInsertQuery::buildSink(std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::shared_ptr<DB::ThreadStatusesHolder>, std::shared_ptr<DB::ThreadGroup>, std::atomic<unsigned long long>*) @ 0x00000001094c6104
30. DB::InterpreterInsertQuery::execute() @ 0x00000001094c8860
31. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000001097f058c
 (version 24.4.1.1)
2024.04.07 09:45:13.384308 [ 1048257 ] {2598f3f5-debe-4f45-8ac8-2dffbcd72056} <Information> AWSClient: AWSXmlClient: HTTP response code: -1
Resolved remote host IP address: 
Request ID: 
Exception name: 
Error message: Poco::Exception. Code: 1000, e.code() = 0, SSL Exception: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER (version 24.4.1.1)
0 response headers:
2024.04.07 09:45:13.384331 [ 1048257 ] {2598f3f5-debe-4f45-8ac8-2dffbcd72056} <Information> AWSClient: If the signature check failed. This could be because of a time skew. Attempting to adjust the signer.
2024.04.07 09:45:13.384338 [ 1048257 ] {2598f3f5-debe-4f45-8ac8-2dffbcd72056} <Information> AWSClient: Request failed, now waiting 0 ms before attempting again.
2024.04.07 09:45:13.390609 [ 1048257 ] {2598f3f5-debe-4f45-8ac8-2dffbcd72056} <Information> AWSClient: Failed to make request to: https://minio:6000/my-bucket/partition-overwrite/test-data.parquet.gz: Poco::Exception. Code: 1000, e.code() = 0, SSL Exception: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER, Stack trace (when copying this message, always include the lines below):

0. Poco::Exception::Exception(String const&, int) @ 0x000000010b903be0
1. Poco::IOException::IOException(String const&, int) @ 0x000000010b90e22c
2. Poco::Net::NetException::NetException(String const&, int) @ 0x000000010b7ee80c
3. Poco::Net::SSLException::SSLException(String const&, int) @ 0x000000010b7b3dac
4. Poco::Net::SecureSocketImpl::handleError(int) @ 0x000000010b7be570
5. Poco::Net::SecureSocketImpl::connectSSL(bool) @ 0x000000010b7bd864
6. Poco::Net::SecureSocketImpl::connect(Poco::Net::SocketAddress const&, Poco::Timespan const&, bool) @ 0x000000010b7bdc10
7. Poco::Net::SecureStreamSocketImpl::connect(Poco::Net::SocketAddress const&, Poco::Timespan const&) @ 0x000000010b7c26e4
8. Poco::Net::HTTPSession::connect(Poco::Net::SocketAddress const&) @ 0x000000010b7de19c
9. Poco::Net::HTTPSClientSession::connect(Poco::Net::SocketAddress const&) @ 0x000000010b7b02d0
10. Poco::Net::HTTPClientSession::reconnect() @ 0x000000010b7ce2dc
11. DB::EndpointConnectionPool<Poco::Net::HTTPSClientSession>::prepareNewConnection(DB::ConnectionTimeouts const&) @ 0x0000000104d4adfc
12. DB::EndpointConnectionPool<Poco::Net::HTTPSClientSession>::getConnection(DB::ConnectionTimeouts const&) @ 0x0000000104d4a4ec
13. DB::makeHTTPSession(DB::HTTPConnectionGroupType, Poco::URI const&, DB::ConnectionTimeouts const&, DB::ProxyConfiguration) @ 0x0000000104e26210
14. DB::S3::PocoHTTPClient::makeRequestInternalImpl(Aws::Http::HttpRequest&, DB::ProxyConfiguration const&, std::shared_ptr<DB::S3::PocoHTTPResponse>&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const @ 0x0000000104eead60
15. DB::S3::PocoHTTPClient::MakeRequest(std::shared_ptr<Aws::Http::HttpRequest> const&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const @ 0x0000000104ee9868
16. std::shared_ptr<Aws::Http::HttpResponse> smithy::components::tracing::TracingUtils::MakeCallWithTiming<std::shared_ptr<Aws::Http::HttpResponse>>(std::function<std::shared_ptr<Aws::Http::HttpResponse> ()>, String const&, smithy::components::tracing::Meter const&, std::map<String, String, std::less<String>, std::allocator<std::pair<String const, String>>>&&, String const&) @ 0x000000010b9f4b30
17. Aws::Client::AWSClient::AttemptOneRequest(std::shared_ptr<Aws::Http::HttpRequest> const&, Aws::AmazonWebServiceRequest const&, char const*, char const*, char const*) const @ 0x000000010b9ee758
18. Aws::Client::AWSClient::AttemptExhaustively(Aws::Http::URI const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod, char const*, char const*, char const*) const @ 0x000000010b9eac30
19. Aws::Client::AWSXMLClient::MakeRequest(Aws::Http::URI const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod, char const*, char const*, char const*) const @ 0x000000010b9ff7a8
20. Aws::Utils::Outcome<Aws::S3::Model::HeadObjectResult, Aws::S3::S3Error> std::__function::__policy_invoker<Aws::Utils::Outcome<Aws::S3::Model::HeadObjectResult, Aws::S3::S3Error> ()>::__call_impl<std::__function::__default_alloc_func<Aws::S3::S3Client::HeadObject(Aws::S3::Model::HeadObjectRequest const&) const::$_0, Aws::Utils::Outcome<Aws::S3::Model::HeadObjectResult, Aws::S3::S3Error> ()>>(std::__function::__policy_storage const*) @ 0x000000010bb4bd4c
21. Aws::Utils::Outcome<Aws::S3::Model::HeadObjectResult, Aws::S3::S3Error> smithy::components::tracing::TracingUtils::MakeCallWithTiming<Aws::Utils::Outcome<Aws::S3::Model::HeadObjectResult, Aws::S3::S3Error>>(std::function<Aws::Utils::Outcome<Aws::S3::Model::HeadObjectResult, Aws::S3::S3Error> ()>, String const&, smithy::components::tracing::Meter const&, std::map<String, String, std::less<String>, std::allocator<std::pair<String const, String>>>&&, String const&) @ 0x000000010bad3b58
22. Aws::S3::S3Client::HeadObject(Aws::S3::Model::HeadObjectRequest const&) const @ 0x000000010bad31b4
23. DB::S3::Client::HeadObject(DB::S3::ExtendedRequest<Aws::S3::Model::HeadObjectRequest>&) const @ 0x0000000104eaeac4
24. DB::S3::(anonymous namespace)::tryGetObjectInfo(DB::S3::Client const&, String const&, String const&, String const&, DB::S3Settings::RequestSettings const&, bool, bool) @ 0x0000000104eff4fc
25. DB::S3::objectExists(DB::S3::Client const&, String const&, String const&, String const&, DB::S3Settings::RequestSettings const&, bool) @ 0x0000000104eff844
26. DB::createStorageS3Sink(DB::StorageS3::Configuration const&, std::shared_ptr<DB::Context const> const&, DB::Block const&, std::optional<DB::FormatSettings>, DB::CompressionMethod, String const&, String const&) @ 0x0000000109eeac0c
27. DB::StorageS3::write(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::shared_ptr<DB::Context const>, bool) @ 0x0000000109eea84c
28. DB::buildPushingToViewsChain(std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::shared_ptr<DB::Context const>, std::shared_ptr<DB::IAST> const&, bool, std::shared_ptr<DB::ThreadStatusesHolder>, std::shared_ptr<DB::ThreadGroup>, std::atomic<unsigned long long>*, bool, DB::Block const&) @ 0x000000010a7e7264
29. DB::InterpreterInsertQuery::buildSink(std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::shared_ptr<DB::ThreadStatusesHolder>, std::shared_ptr<DB::ThreadGroup>, std::atomic<unsigned long long>*) @ 0x00000001094c6104
30. DB::InterpreterInsertQuery::execute() @ 0x00000001094c8860
31. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000001097f058c
 (version 24.4.1.1)
2024.04.07 09:45:13.391266 [ 1048257 ] {2598f3f5-debe-4f45-8ac8-2dffbcd72056} <Information> AWSClient: AWSXmlClient: HTTP response code: -1
Resolved remote host IP address: 
Request ID: 
Exception name: 
Error message: Poco::Exception. Code: 1000, e.code() = 0, SSL Exception: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER (version 24.4.1.1)
0 response headers:
2024.04.07 09:45:13.391275 [ 1048257 ] {2598f3f5-debe-4f45-8ac8-2dffbcd72056} <Information> AWSClient: If the signature check failed. This could be because of a time skew. Attempting to adjust the signer.
2024.04.07 09:45:13.391280 [ 1048257 ] {2598f3f5-debe-4f45-8ac8-2dffbcd72056} <Information> AWSClient: Request failed, now waiting 50 ms before attempting again.
...

And it stays retrying forever

Additional context
It seems that when creating the table if no creds are provided it fallbacks to the AWS default credentials available in the machine. If those don't exist of are expired it tries to refresh them from the EC2 instance metadata service, which in the example above fails becasuse it's not running in EC2. This failure is only logged as INFO and the table creation "succeeds".

Activity

  1. added
    unexpected behaviour
    on Apr 7, 2024
  2. changed the title [-]It is possible to create a table with S3 engine and invalid credentials that then hangs when inserting data[/-] [+]It is possible to create a s3 engine table and invalid credentials that then hangs when inserting data[/+] on Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    unexpected behaviour

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions