Not able to log in in SNOWSQL using windows console - snowflake-cloud-data-platform
I'm trying to access Snowflake using SNOWSQL in windows console.
While doing this, I give full credentials, including region:
snowsql -a XXXXXX.europe-west4.gcp -u XXXXX;
When asked for password, I enter the correct password (double checked this in the Snowflake web UI).
After confirming, I get the error message:
250001 (08001): Failed to connect to DB:
XXXXXXX.europe-west4.gcp.snowflakecomputing.com:443. Incorrect
username or password was specified.
This morning, I was still able to log in using the above statement. Can this be related to setting, incorrect closing,...?
I pasted the content of my log file below
2022-04-11 08:08:03,136 (10772/MainThread) snowflake.cli.common.util_cli DEBUG util_cli:686 - Initialized logging. Log file 'C:\\Users\\Bounce\\.snowsql\\log', Namespaces: ['snowflake.cli', 'snowflake.connector', 'botocore', 'azure', '__main__', 'eventloop', 'sqlexecute']
2022-04-11 08:08:03,136 (10772/MainThread) snowflake.cli.common.util_cli INFO util_cli:722 - REQUESTS_CA_BUNDLE is already set to C:\Users\Bounce\AppData\Local\Temp\_MEI100082\certifi\cacert.pem
2022-04-11 08:08:03,136 (10772/MainThread) __main__ DEBUG eventloop:209 - is_terminal: True, is_interactive: True
2022-04-11 08:08:03,152 (10772/MainThread) snowflake.cli.sqlexecute DEBUG sqlexecute:163 - starting sqlexecute
2022-04-11 08:08:03,152 (10772/MainThread) snowflake.cli.common.config DEBUG config:87 - Reading cnf: C:\Users\Bounce\.snowsql\1.2.21\snowsql.cnf
2022-04-11 08:08:03,152 (10772/MainThread) snowflake.cli.common.config DEBUG config:87 - Reading cnf: /etc/snowsql.cnf
2022-04-11 08:08:03,152 (10772/MainThread) snowflake.cli.common.config DEBUG config:87 - Reading cnf: /etc/snowflake/snowsql.cnf
2022-04-11 08:08:03,152 (10772/MainThread) snowflake.cli.common.config DEBUG config:87 - Reading cnf: /usr/local/etc/snowsql.cnf
2022-04-11 08:08:03,152 (10772/MainThread) snowflake.cli.common.config DEBUG config:87 - Reading cnf: C:\Users\Bounce\.snowsql.cnf
2022-04-11 08:08:03,152 (10772/MainThread) snowflake.cli.common.config DEBUG config:87 - Reading cnf: C:\Users\Bounce\.snowsql\config
2022-04-11 08:08:03,152 (10772/MainThread) __main__ DEBUG eventloop:353 - [None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None]
2022-04-11 08:08:03,152 (10772/MainThread) __main__ DEBUG eventloop:359 - fallback to config values only if user did not specify a value and sqlexecute is connecting for the first time.
2022-04-11 08:08:03,152 (10772/MainThread) __main__ DEBUG eventloop:407 - host=None, port: + None
2022-04-11 08:08:03,152 (10772/MainThread) __main__ DEBUG eventloop:446 - prompting user, password and account if still missing
2022-04-11 08:08:10,693 (10772/MainThread) __main__ DEBUG eventloop:501 - init sqlexecute
2022-04-11 08:08:10,693 (10772/MainThread) snowflake.cli.sqlexecute DEBUG sqlexecute:254 - Connection DB Params: database: None, warehouse: None, user: xxxxxxxxx;, host: xxxxxxx.europe-west4.gcp.snowflakecomputing.com, port: 443, region: None, account: xxxxxxx.europe-west4.gcp, protocol: https, schema: None, role: None, ocsp_fail_open: True, insecure_mode: None, proxy_host: None, proxy_port: None, proxy_user: None, authenticator: SNOWFLAKE, session_parameters: {'ABORT_DETACHED_QUERY': False}, login_timeout: 120, client_session_keep_alive: False, disable_request_pooling: None, client_store_temporary_credential: None
2022-04-11 08:08:10,693 (10772/MainThread) snowflake.connector.connection INFO connection:272 - Snowflake Connector for Python Version: 2.7.1, Python Version: 3.6.8, Platform: Windows-8.1-6.3.9600-SP0
2022-04-11 08:08:10,693 (10772/MainThread) snowflake.connector.connection DEBUG connection:489 - connect
2022-04-11 08:08:10,693 (10772/MainThread) snowflake.connector.connection DEBUG connection:754 - __config
2022-04-11 08:08:10,693 (10772/MainThread) snowflake.connector.connection INFO connection:879 - This connection is in OCSP Fail Open Mode. TLS Certificates would be checked for validity and revocation status. Any other Certificate Revocation related exceptions or OCSP Responder failures would be disregarded in favor of connectivity.
2022-04-11 08:08:10,693 (10772/MainThread) snowflake.connector.connection INFO connection:896 - Setting use_openssl_only mode to False
2022-04-11 08:08:10,693 (10772/MainThread) snowflake.connector.converter DEBUG converter:142 - use_numpy: False
2022-04-11 08:08:10,693 (10772/MainThread) snowflake.connector.connection DEBUG connection:657 - REST API object was created: xxxxxxx.europe-west4.gcp.snowflakecomputing.com:443
2022-04-11 08:08:10,709 (10772/MainThread) snowflake.connector.auth DEBUG auth:170 - authenticate
2022-04-11 08:08:10,709 (10772/MainThread) snowflake.connector.auth DEBUG auth:200 - assertion content: *********
2022-04-11 08:08:10,709 (10772/MainThread) snowflake.connector.auth DEBUG auth:212 - account=xxxxxxx, user=xxxxxxxxx;, database=None, schema=None, warehouse=None, role=None, request_id=3799c227-4d7b-4773-a536-acda88856c54
2022-04-11 08:08:10,709 (10772/MainThread) snowflake.connector.auth DEBUG auth:238 - body['data']: {'CLIENT_APP_ID': 'SnowSQL', 'CLIENT_APP_VERSION': '1.2.21', 'SVN_REVISION': None, 'ACCOUNT_NAME': 'xxxxxxx', 'LOGIN_NAME': 'xxxxxxxxx;', 'CLIENT_ENVIRONMENT': {'APPLICATION': 'SnowSQL', 'OS': 'Windows', 'OS_VERSION': 'Windows-8.1-6.3.9600-SP0', 'PYTHON_VERSION': '3.6.8', 'PYTHON_RUNTIME': 'CPython', 'PYTHON_COMPILER': 'MSC v.1916 64 bit (AMD64)', 'OCSP_MODE': 'FAIL_OPEN', 'TRACING': 10, 'LOGIN_TIMEOUT': 120, 'NETWORK_TIMEOUT': None}, 'SESSION_PARAMETERS': {'ABORT_DETACHED_QUERY': False, 'AUTOCOMMIT': True, 'CLIENT_SESSION_KEEP_ALIVE': False, 'CLIENT_PREFETCH_THREADS': 4}}
2022-04-11 08:08:10,709 (10772/MainThread) snowflake.connector.auth DEBUG auth:254 - Timeout set to 120
2022-04-11 08:08:10,709 (10772/MainThread) snowflake.connector.vendored.urllib3.util.retry DEBUG retry:333 - Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
2022-04-11 08:08:10,709 (10772/MainThread) snowflake.connector.vendored.urllib3.util.retry DEBUG retry:333 - Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
2022-04-11 08:08:10,709 (10772/MainThread) snowflake.connector.network DEBUG network:1117 - Session status for SessionPool 'xxxxxxx.europe-west4.gcp.snowflakecomputing.com', SessionPool 1/1 active sessions
2022-04-11 08:08:10,709 (10772/MainThread) snowflake.connector.network DEBUG network:826 - remaining request timeout: 120, retry cnt: 1
2022-04-11 08:08:10,709 (10772/MainThread) snowflake.connector.network DEBUG network:804 - Request guid: 9fb618c7-60d4-45fb-8107-b409d048ba8c
2022-04-11 08:08:10,709 (10772/MainThread) snowflake.connector.network DEBUG network:973 - socket timeout: 60
2022-04-11 08:08:10,725 (10772/MainThread) snowflake.connector.vendored.urllib3.connectionpool DEBUG connectionpool:975 - Starting new HTTPS connection (1): xxxxxxx.europe-west4.gcp.snowflakecomputing.com:443
2022-04-11 08:08:10,881 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:464 - cache directory: C:\Users\Bounce\AppData\Local\Snowflake\Caches
2022-04-11 08:08:10,990 (10772/MainThread) snowflake.connector.ssl_wrap_socket DEBUG ssl_wrap_socket:86 - OCSP Mode: FAIL_OPEN, OCSP response cache file name: None
2022-04-11 08:08:10,990 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:506 - ocsp_response_cache_uri: file://C:/Users/Bounce/AppData/Local/Snowflake/Caches/ocsp_response_cache.json
2022-04-11 08:08:10,990 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:507 - OCSP_VALIDATION_CACHE size: 0
2022-04-11 08:08:10,990 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:290 - OCSP response cache server is enabled: http://ocsp.snowflakecomputing.com/ocsp_response_cache.json
2022-04-11 08:08:10,990 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:325 - OCSP dynamic cache server RETRY URL: None
2022-04-11 08:08:11,006 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2025-05-12 23:58:59+00:00
2022-04-11 08:08:11,006 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2024-05-12 02:43:45+00:00
2022-04-11 08:08:11,021 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2024-05-12 02:47:38+00:00
2022-04-11 08:08:11,021 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2025-05-12 23:58:59+00:00
2022-04-11 08:08:11,037 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2025-05-12 23:58:59+00:00
2022-04-11 08:08:11,115 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2022-05-15 00:00:00+00:00
2022-04-11 08:08:11,131 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 20:00:20+00:00
2022-04-11 08:08:11,146 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,146 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,146 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,162 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,162 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 20:00:20+00:00
2022-04-11 08:08:11,178 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,178 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 20:00:20+00:00
2022-04-11 08:08:11,178 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,193 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 20:00:20+00:00
2022-04-11 08:08:11,193 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,193 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,209 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,209 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 20:00:20+00:00
2022-04-11 08:08:11,209 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,225 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,225 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,225 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 20:00:20+00:00
2022-04-11 08:08:11,240 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:236 - Verifying the attached certificate is signed by the issuer. Valid Not After: 2023-01-25 19:35:21+00:00
2022-04-11 08:08:11,256 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:545 - Read OCSP response cache file: C:/Users/Bounce/AppData/Local/Snowflake/Caches/ocsp_response_cache.json, count=172
2022-04-11 08:08:11,256 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:1063 - validating certificate: xxxxxxx.europe-west4.gcp.snowflakecomputing.com
2022-04-11 08:08:11,256 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:434 - # of certificates: 3
2022-04-11 08:08:11,256 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:440 - subject: OrderedDict([('country_name', 'US'), ('state_or_province_name', 'California'), ('locality_name', 'San Mateo'), ('organization_name', 'Snowflake Inc.'), ('common_name', '*.europe-west4.gcp.snowflakecomputing.com')]), issuer: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert TLS RSA SHA256 2020 CA1')])
2022-04-11 08:08:11,256 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:440 - subject: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert TLS RSA SHA256 2020 CA1')]), issuer: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('organizational_unit_name', 'www.digicert.com'), ('common_name', 'DigiCert Global Root CA')])
2022-04-11 08:08:11,271 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:440 - subject: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('organizational_unit_name', 'www.digicert.com'), ('common_name', 'DigiCert Global Root CA')]), issuer: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('organizational_unit_name', 'www.digicert.com'), ('common_name', 'DigiCert Global Root CA')])
2022-04-11 08:08:11,271 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:682 - hit cache for subject: OrderedDict([('country_name', 'US'), ('state_or_province_name', 'California'), ('locality_name', 'San Mateo'), ('organization_name', 'Snowflake Inc.'), ('common_name', '*.europe-west4.gcp.snowflakecomputing.com')])
2022-04-11 08:08:11,271 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:682 - hit cache for subject: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert TLS RSA SHA256 2020 CA1')])
2022-04-11 08:08:11,287 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:682 - hit cache for subject: OrderedDict([('country_name', 'US'), ('state_or_province_name', 'California'), ('locality_name', 'San Mateo'), ('organization_name', 'Snowflake Inc.'), ('common_name', '*.europe-west4.gcp.snowflakecomputing.com')])
2022-04-11 08:08:11,287 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:1237 - using OCSP response cache
2022-04-11 08:08:11,287 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:329 - Certificate is NOT attached in Basic OCSP Response. Using issuer's certificate
2022-04-11 08:08:11,287 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:336 - Verifying the OCSP response is signed by the issuer.
2022-04-11 08:08:11,350 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:682 - hit cache for subject: OrderedDict([('country_name', 'US'), ('organization_name', 'DigiCert Inc'), ('common_name', 'DigiCert TLS RSA SHA256 2020 CA1')])
2022-04-11 08:08:11,365 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:1237 - using OCSP response cache
2022-04-11 08:08:11,365 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:329 - Certificate is NOT attached in Basic OCSP Response. Using issuer's certificate
2022-04-11 08:08:11,365 (10772/MainThread) snowflake.connector.ocsp_asn1crypto DEBUG ocsp_asn1crypto:336 - Verifying the OCSP response is signed by the issuer.
2022-04-11 08:08:11,365 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:604 - writing OCSP response cache file to C:/Users/Bounce/AppData/Local/Snowflake/Caches/ocsp_response_cache.json
2022-04-11 08:08:11,365 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:1715 - encoding OCSP response cache to JSON
2022-04-11 08:08:11,443 (10772/MainThread) snowflake.connector.ocsp_snowflake DEBUG ocsp_snowflake:1115 - ok
2022-04-11 08:08:11,490 (10772/MainThread) snowflake.connector.vendored.urllib3.connectionpool DEBUG connectionpool:461 - https://xxxxxxx.europe-west4.gcp.snowflakecomputing.com:443 "POST /session/v1/login-request?request_id=3799c227-4d7b-4773-a536-acda88856c54&request_guid=9fb618c7-60d4-45fb-8107-b409d048ba8c HTTP/1.1" 200 427
2022-04-11 08:08:11,490 (10772/MainThread) snowflake.connector.network DEBUG network:1002 - SUCCESS
2022-04-11 08:08:11,490 (10772/MainThread) snowflake.connector.network DEBUG network:1123 - Session status for SessionPool 'xxxxxxx.europe-west4.gcp.snowflakecomputing.com', SessionPool 0/1 active sessions
2022-04-11 08:08:11,490 (10772/MainThread) snowflake.connector.network DEBUG network:713 - ret[code] = 390100, after post request
2022-04-11 08:08:11,490 (10772/MainThread) snowflake.connector.auth DEBUG auth:370 - completed authentication
2022-04-11 08:08:11,506 (10772/MainThread) __main__ ERROR eventloop:547 - Database connection failed: 250001 (08001): None: Failed to connect to DB: xxxxxxx.europe-west4.gcp.snowflakecomputing.com:443. Incorrect username or password was specified..
Traceback (most recent call last):
File "cli\eventloop.py", line 540, in connect
File "lib\site-packages\snowflake\cli\sqlexecute.py", line 296, in push_connection
File "lib\site-packages\snowflake\connector\__init__.py", line 50, in Connect
File "lib\site-packages\snowflake\connector\connection.py", line 283, in __init__
File "lib\site-packages\snowflake\connector\connection.py", line 494, in connect
File "lib\site-packages\snowflake\connector\connection.py", line 733, in __open_connection
File "lib\site-packages\snowflake\connector\connection.py", line 994, in _authenticate
File "lib\site-packages\snowflake\connector\connection.py", line 1026, in __authenticate
File "lib\site-packages\snowflake\connector\auth.py", line 409, in authenticate
File "lib\site-packages\snowflake\connector\errors.py", line 273, in errorhandler_wrapper
File "lib\site-packages\snowflake\connector\errors.py", line 327, in hand_to_other_handler
File "lib\site-packages\snowflake\connector\errors.py", line 210, in default_errorhandler
snowflake.connector.errors.DatabaseError: 250001 (08001): None: Failed to connect to DB: xxxxxxx.europe-west4.gcp.snowflakecomputing.com:443. Incorrect username or password was specified.
2022-04-11 08:08:11,506 (10772/MainThread) __main__ INFO eventloop:567 - rollback
2022-04-11 08:08:11,506 (10772/MainThread) snowflake.cli.sqlexecute INFO sqlexecute:368 - rollback
2022-04-11 08:08:11,506 (10772/MainThread) __main__ ERROR eventloop:1248 - 250001 (08001): None: Failed to connect to DB: xxxxxxx.europe-west4.gcp.snowflakecomputing.com:443. Incorrect username or password was specified.
Traceback (most recent call last):
File "cli\eventloop.py", line 1183, in cli
File "cli\eventloop.py", line 554, in connect
File "cli\eventloop.py", line 540, in connect
File "lib\site-packages\snowflake\cli\sqlexecute.py", line 296, in push_connection
File "lib\site-packages\snowflake\connector\__init__.py", line 50, in Connect
File "lib\site-packages\snowflake\connector\connection.py", line 283, in __init__
File "lib\site-packages\snowflake\connector\connection.py", line 494, in connect
File "lib\site-packages\snowflake\connector\connection.py", line 733, in __open_connection
File "lib\site-packages\snowflake\connector\connection.py", line 994, in _authenticate
File "lib\site-packages\snowflake\connector\connection.py", line 1026, in __authenticate
File "lib\site-packages\snowflake\connector\auth.py", line 409, in authenticate
File "lib\site-packages\snowflake\connector\errors.py", line 273, in errorhandler_wrapper
File "lib\site-packages\snowflake\connector\errors.py", line 327, in hand_to_other_handler
File "lib\site-packages\snowflake\connector\errors.py", line 210, in default_errorhandler
snowflake.connector.errors.DatabaseError: 250001 (08001): None: Failed to connect to DB: xxxxxxx.europe-west4.gcp.snowflakecomputing.com:443. Incorrect username or password was specified.
2022-04-11 08:08:11,521 (10772/MainThread) __main__ DEBUG eventloop:581 - closing sessions
2022-04-11 08:08:11,521 (10772/MainThread) snowflake.cli.sqlexecute DEBUG sqlexecute:349 - closing connections
2022-04-11 08:08:11,521 (10772/MainThread) snowflake.cli.sqlexecute DEBUG sqlexecute:316 - joining async exec
2022-04-11 08:08:11,521 (10772/MainThread) snowflake.cli.sqlexecute DEBUG sqlexecute:324 - waiting for async exec to finish...
2022-04-11 08:08:11,521 (10772/MainThread) snowflake.cli.sqlexecute DEBUG sqlexecute:341 - all async queries finished.
2022-04-11 08:08:11,553 (10772/MainThread) snowflake.connector.connection INFO connection:509 - closed
2022-04-11 08:08:11,553 (10772/MainThread) snowflake.connector.connection DEBUG connection:526 - Exception encountered in closing connection. ignoring...: 'SnowflakeConnection' object has no attribute '_telemetry'
Thanks!
Related
Relay access denied Error in PostFix
I am using digitalocean mailing server. I have configured Mail_In_box in Ubuntu 14 version and also map my domain registrar DNS with server. I have installed roundcude mail and also able to send and receive email using roundcude and it is working nice. Now I am trying to send email using javamail. But each time, I am getting error 554 5.7.1 : Relay access denied Below is my log. DEBUG SMTP: trying to connect to host "mail.domainname.com", port 587, isSSL false 220 mail.domainname.com ESMTP Hi, I'm a Mail-in-a-Box (Ubuntu/Postfix; see https://mailinabox.email/) DEBUG SMTP: connected to host "mail.domainname.com", port: 587 EHLO admin.lan 250-mail.domainname.com 250-PIPELINING 250-SIZE 134217728 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN DEBUG SMTP: Found extension "PIPELINING", arg "" DEBUG SMTP: Found extension "SIZE", arg "134217728" DEBUG SMTP: Found extension "VRFY", arg "" DEBUG SMTP: Found extension "ETRN", arg "" DEBUG SMTP: Found extension "STARTTLS", arg "" DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg "" DEBUG SMTP: Found extension "8BITMIME", arg "" DEBUG SMTP: Found extension "DSN", arg "" DEBUG SMTP: use8bit false MAIL FROM:<myfirstemailaddress#domainname.com> 250 2.1.0 Ok RCPT TO:<myemailaddress#gmail.com> 554 5.7.1 <myemailaddress#gmail.com>: Relay access denied DEBUG SMTP: Invalid Addresses DEBUG SMTP: myemailaddress#gmail.com DEBUG SMTP: Sending failed because of invalid destination addresses RSET 250 2.0.0 Ok javax.mail.SendFailedException: Invalid Addresses; nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 <myemailaddress#gmail.com>: Relay access denied main.cf file: mydestination = #myhostname, localhost.$myhostname, localhost mynetworks = 127.0.0.0/8 $myhostname [::ffff:127.0.0.0]/104 [::1]/128 Kindly help me.
Fediz simpleWebapp doesn't work as expected
I've set up two Tomcat servers as described in the README's and the http://cxf.apache.org/ site. The tests for the IDP server work; I can see the WSDL for the web service. But when I go to https://localhost:8443/fedizhelloworld/secure/fedservlet, I just get a blank page. The log output of the IDP server says: 16:56:45.379 [http-nio-9080-exec-7] DEBUG o.a.c.a.AuthenticatorBase - Security checking request GET /fediz-idp-sts/REALMA/STSServiceTransport 16:56:45.380 [http-nio-9080-exec-7] DEBUG org.apache.catalina.realm.RealmBase - No applicable constraints defined 16:56:45.381 [http-nio-9080-exec-7] DEBUG o.a.c.a.AuthenticatorBase - Not subject to any constraint On the RP server, I see: 16:58:04.941 [http-bio-8443-exec-3] DEBUG o.a.c.a.FormAuthenticator - WsFedAuthenticator:invoke() 16:58:04.941 [http-bio-8443-exec-3] DEBUG o.a.c.a.AuthenticatorBase - Security checking request GET /fedizhelloworld/secure/fedservlet 16:58:04.942 [http-bio-8443-exec-3] DEBUG o.a.c.a.FormAuthenticator - authenticate invoked 16:58:04.942 [http-bio-8443-exec-3] DEBUG o.a.c.a.FormAuthenticator - reading configuration for context path: /fedizhelloworld 16:58:04.942 [http-bio-8443-exec-3] INFO o.a.c.a.FormAuthenticator - No valid principal found in existing session. Redirecting to IDP 16:58:04.942 [http-bio-8443-exec-3] DEBUG o.a.c.f.c.p.FederationProcessorImpl - Issuer url: https://localhost:9443/fediz-idp/federation 16:58:04.942 [http-bio-8443-exec-3] DEBUG o.a.c.f.c.p.FederationProcessorImpl - WAuth: null 16:58:04.942 [http-bio-8443-exec-3] DEBUG o.a.c.f.c.p.FederationProcessorImpl - WReq: null 16:58:04.942 [http-bio-8443-exec-3] DEBUG o.a.c.f.c.p.FederationProcessorImpl - HomeRealm: null 16:58:04.942 [http-bio-8443-exec-3] DEBUG o.a.c.f.c.p.FederationProcessorImpl - Freshness: null 16:58:04.942 [http-bio-8443-exec-3] DEBUG o.a.c.f.c.p.FederationProcessorImpl - SignIn Query: null 16:58:04.942 [http-bio-8443-exec-3] DEBUG o.a.c.f.c.p.FederationProcessorImpl - wreply=https://localhost:8443/fedizhelloworld/secure/fedservlet 16:58:04.942 [http-bio-8443-exec-3] DEBUG o.a.c.f.c.p.FederationProcessorImpl - wtrealm=urn:org:apache:cxf:fediz:fedizhelloworld 16:58:04.943 [http-bio-8443-exec-3] DEBUG o.a.c.f.c.p.FederationProcessorImpl - wctx=b6ae9556-5e4f-49ca-a9ee-493403cf1ab3 16:58:04.943 [http-bio-8443-exec-3] DEBUG o.a.c.a.FormAuthenticator - Save request in session '271D4C59304744F60BDF1B84B386896C' 16:58:04.943 [http-bio-8443-exec-3] DEBUG o.a.c.a.AuthenticatorBase - Failed authenticate() test The README promises: The browser is redirected to the IDP and prompts for username and password. but I just get a blank page with the URL https://localhost:9443/fediz-idp/federation?wa=wsignin1.0&wreply=https%3A%2F%2Flocalhost%3A8443%2Ffedizhelloworld%2Fsecure%2Ffedservlet&wtrealm=urn%3Aorg%3Aapache%3Acxf%3Afediz%3Afedizhelloworld&wct=2015-12-03T15%3A58%3A04.942Z&wctx=b6ae9556-5e4f-49ca-a9ee-493403cf1ab3 My guess is that there is something wrong with the configuration but what?
Make sure you have both WARs (fediz-idp.war and fediz-idp-sts.war) deployed on the IDP server. When you have, you should see this output right after Not subject to any constraint: 2015-12-04 10:19:25,030 [http-nio-9443-exec-8] INFO org.apache.cxf.fediz.service.idp.STSPortFilter - STSAuthenticationProvider.wsdlLocation set to https://localhost:9443/fediz-idp-sts/REALMA/STSServiceTransportUT?wsdl 2015-12-04 10:19:25,117 [http-nio-9443-exec-8] INFO org.springframework.web.context.support.GenericWebApplicationContext - Refreshing Flow ApplicationContext [federation]: startup date [Fri Dec 04 10:19:25 CET 2015]; parent: WebApplicationContext for namespace 'idp-servlet' 2015-12-04 10:19:25,118 [http-nio-9443-exec-8] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Replacing scope 'request' from [org.springframework.web.context.request.RequestScope#447feb96] to [org.springframework.web.context.request.RequestScope#2709bb72] 2015-12-04 10:19:25,129 [http-nio-9443-exec-8] INFO org.apache.cxf.fediz.service.idp.service.jpa.DBInitApplicationListener - Inital DB already loaded 2015-12-04 10:19:25,131 [http-nio-9443-exec-8] INFO org.apache.cxf.fediz.service.idp.service.jpa.DBInitApplicationListener - Inital DB already loaded
Javamail and STARTTLS not working on different platforms
I created an example to send emails using STARTLS. Running it on 3 different windows versions hosted in different domains, everything works. The bizzare thing is that when I run it on a Ubuntu Server 14.02 LTS it doesn't works. There is no firewall blocking and the java application binaries are the same. This is the code: // Port we will connect to on the Amazon SES SMTP endpoint. We are choosing port 25 because we will use // STARTTLS to encrypt the connection. static final int PORT = 25; public static void main(String[] args) throws Exception { // Create a Properties object to contain connection configuration information. Properties props = System.getProperties(); props.put("mail.transport.protocol", "smtp"); props.put("mail.smtp.port", PORT); // Set properties indicating that we want to use STARTTLS to encrypt the connection. // The SMTP session will begin on an unencrypted connection, and then the client // will issue a STARTTLS command to upgrade to an encrypted connection. props.put("mail.smtp.auth", "true"); props.put("mail.smtp.starttls.enable", "true"); props.put("mail.smtp.starttls.required", "true"); props.put("mail.smtp.ssl.enable", "false"); props.put("mail.debug", "true"); // Create a Session object to represent a mail session with the specified properties. Session session = Session.getDefaultInstance(props); // Create a message with the specified information. MimeMessage msg = new MimeMessage(session); msg.setReplyTo(InternetAddress.parse("no-reply#no-host.com")); msg.setFrom(new InternetAddress(FROM)); msg.setRecipient(Message.RecipientType.TO, new InternetAddress(TO)); msg.setSubject(SUBJECT); msg.setContent(BODY, "html/plain"); // Create a transport. Transport transport = session.getTransport("smtp"); // Send the message. try { System.out.println("Attempting to send an email through the Amazon SES SMTP interface..."); // Connect to Amazon SES using the SMTP username and password you specified above. transport.connect(HOST, PORT, SMTP_USERNAME, SMTP_PASSWORD); // Send the email. transport.sendMessage(msg, msg.getAllRecipients()); System.out.println("Email sent!"); } catch (Exception ex) { System.out.println("The email was not sent."); System.out.println("Error message: " + ex.getMessage()); } finally { // Close and terminate the connection. transport.close(); } } This is the javamail log from a Windows environment (what is working): DEBUG: JavaMail version 1.5.4 DEBUG: successfully loaded resource: /META-INF/javamail.default.providers DEBUG: Tables of loaded providers DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle]} DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]} DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle] Attempting to send an email through the Amazon SES SMTP interface... DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: trying to connect to host "email-smtp.us-west-2.amazonaws.com", port 25, isSSL false 220 email-smtp.amazonaws.com ESMTP SimpleEmailService-1207632523 H3nxFSQJ7ktEpHBHuT38 DEBUG SMTP: connected to host "email-smtp.us-west-2.amazonaws.com", port: 25 EHLO roberton 250-email-smtp.amazonaws.com 250-8BITMIME 250-SIZE 10485760 250-STARTTLS 250-AUTH PLAIN LOGIN 250 Ok DEBUG SMTP: Found extension "8BITMIME", arg "" DEBUG SMTP: Found extension "SIZE", arg "10485760" DEBUG SMTP: Found extension "STARTTLS", arg "" DEBUG SMTP: Found extension "AUTH", arg "PLAIN LOGIN" DEBUG SMTP: Found extension "Ok", arg "" STARTTLS 220 Ready to start TLS EHLO xxxxxxxxxxxxxxxx 250-email-smtp.amazonaws.com 250-8BITMIME 250-SIZE 10485760 250-STARTTLS 250-AUTH PLAIN LOGIN 250 Ok DEBUG SMTP: Found extension "8BITMIME", arg "" DEBUG SMTP: Found extension "SIZE", arg "10485760" DEBUG SMTP: Found extension "STARTTLS", arg "" DEBUG SMTP: Found extension "AUTH", arg "PLAIN LOGIN" DEBUG SMTP: Found extension "Ok", arg "" DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM DEBUG SMTP: AUTH LOGIN command trace suppressed DEBUG SMTP: AUTH LOGIN succeeded DEBUG SMTP: use8bit false MAIL FROM:<naoresponder#xxxxxxxxx> 250 Ok RCPT TO:<xxxxxxxxxxxxxxxxxxxxx> 250 Ok DEBUG SMTP: Verified Addresses DEBUG SMTP: xxxxxxxxxxxxxxx DATA 354 End data with <CR><LF>.<CR><LF> From: xxxxxxxxxxxxxx Reply-To: xxxxxxxxxxxxx To: xxxxxxxxxxxxxxxxxxx Message-ID: <1926764753.0.1448359358140#xxxxxxxx> Subject: Amazon SES test (SMTP interface accessed using Java) MIME-Version: 1.0 Content-Type: html/plain Content-Transfer-Encoding: 7bit This email was sent through the Amazon SES SMTP interface by using Java. . 250 Ok 0000015138f203b5-6fcd5424-60c3-43eb-9542-83699cf36c46-000000 DEBUG SMTP: message successfully delivered to mail server Email sent! QUIT 221 Bye And this is the log from the Ubuntu (environment what isn't working): DEBUG: JavaMail version 1.5.4 DEBUG: successfully loaded resource: /META-INF/javamail.default.providers DEBUG: Tables of loaded providers DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle]} DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]} DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle] Attempting to send an email through the Amazon SES SMTP interface... DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: trying to connect to host "email-smtp.us-west-2.amazonaws.com", port 25, isSSL false 220 email-smtp.amazonaws.com ESMTP SimpleEmailService-1207632523 tIUsmWGoY4gXLCMWdUpi DEBUG SMTP: connected to host "email-smtp.us-west-2.amazonaws.com", port: 25 EHLO xxxxxxxxx 250-email-smtp.amazonaws.com 250-8BITMIME 250-SIZE 10485760 250-AUTH PLAIN LOGIN 250 Ok DEBUG SMTP: Found extension "8BITMIME", arg "" DEBUG SMTP: Found extension "SIZE", arg "10485760" DEBUG SMTP: Found extension "AUTH", arg "PLAIN LOGIN" DEBUG SMTP: Found extension "Ok", arg "" DEBUG SMTP: STARTTLS required but not supported The email was not sent. Error message: STARTTLS is required but host does not support STARTTLS This is the callstack error: javax.mail.MessagingException: STARTTLS is required but host does not support STARTTLS at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:719) at javax.mail.Service.connect(Service.java:364) at SESEmail.main(SESEmail.java:64) Java version: 1.8.0_60-b27 Why this is happening?
I was using an official example from AWS SES http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-java.html , and this one was using port smtp 25 for TLS. For some reason, this port (25) doesn't works with TLS in some of my enviroments. After some research, I found this http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-connect.html and tried to use the default TLS port 587, and now it works in both of my environments (linux and windows). I think this was a problem/behavior from AWS SES servers and not a Java Mail problem. I will try to report this for AWS team.
How to use DIGEST-MD5 with Javamail
My application sends emails using Javamail. In order to authenticate with the email server I currently have to store the password somewhere in the application configuration files. I'd like to avoid this, providing at least a bit of security by storing only a hash of the password. According to the wikipedia article http://en.wikipedia.org/wiki/Digest_access_authentication I should be able to achieve this by using DIGEST-MD5 authentication, which allows the application to authenticate using only an MD5 hash of the username:realm:password instead of needing to know the cleartext password. I can't find any clear example on how to use DIGEST-MD5 in Javamail. I see some references to a class com.sun.mail.smtp.DigestMD5 but this doesn't exist in the latest javamail package and I can't find any explanation why. The code below is as far as I could get with it. The email is sent successfully but the debug output seems to indicate it is still using PLAIN authentication through SASL, even though I've specified that DIGEST-MD5 is the only mechanism allowed. Beyond that, I'm still specifying the plaintext password as an argument to the transport.connect method, whereas I want to be providing the hashed username:realm:password instead. Can anyone point me to a working example of using DIGEST-MD5 with Javamail? Thanks! Code below, with try/catch blocks removed... Properties properties=new Properties(); properties.put("mail.smtp.starttls.enable","true"); properties.put("mail.smtp.timeout",3000); // 3 second timeout establishing connection properties.put("mail.smtp.auth.mechanisms","DIGEST-MD5"); Session session=Session.getInstance(properties); session.setDebug(true); Message message=new MimeMessage(session); message.setFrom(constructAddress(myGmailAddress,"my name")); message.addRecipient(Message.RecipientType.TO,constructAddress(recipientEmailAddress,"Recipient Name")); message.setSubject("test email"); message.setText("..."); SMTPTransport transport=(SMTPTransport)session.getTransport("smtp"); transport.setSASLEnabled(true); transport.setSASLRealm("gmail.com"); transport.connect("smtp.gmail.com",587,myGmailAddress,password); transport.sendMessage(message,message.getAllRecipients()); transport.close(); Here's the (truncated) debug output: DEBUG: setDebug: JavaMail version 1.5.1 DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle] DEBUG SMTP: useEhlo true, useAuth false DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 587, isSSL false 220 mx.google.com ESMTP pb7sm87689296pac.10 - gsmtp DEBUG SMTP: connected to host "smtp.gmail.com", port: 587 EHLO laptop-mj 250-mx.google.com at your service, [(my ip address)] 250-SIZE 35882577 250-8BITMIME 250-STARTTLS 250-ENHANCEDSTATUSCODES 250 CHUNKING DEBUG SMTP: Found extension "SIZE", arg "35882577" DEBUG SMTP: Found extension "8BITMIME", arg "" DEBUG SMTP: Found extension "STARTTLS", arg "" DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg "" DEBUG SMTP: Found extension "CHUNKING", arg "" STARTTLS 220 2.0.0 Ready to start TLS EHLO laptop-mj 250-mx.google.com at your service, [(my ip address)] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN 250-ENHANCEDSTATUSCODES 250 CHUNKING DEBUG SMTP: Found extension "SIZE", arg "35882577" DEBUG SMTP: Found extension "8BITMIME", arg "" DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN" DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg "" DEBUG SMTP: Found extension "CHUNKING", arg "" DEBUG SMTP: Authenticate with SASL DEBUG SMTP: SASL AUTH command trace suppressed DEBUG SMTP: SASL Mechanisms: DEBUG SMTP: LOGIN DEBUG SMTP: PLAIN DEBUG SMTP: XOAUTH DEBUG SMTP: XOAUTH2 DEBUG SMTP: PLAIN-CLIENTTOKEN DEBUG SMTP: DEBUG SMTP: SASL callback length: 2 DEBUG SMTP: SASL callback 0: javax.security.auth.callback.NameCallback#55f6efd2 DEBUG SMTP: SASL callback 1: javax.security.auth.callback.PasswordCallback#46faf015 DEBUG SMTP: SASL client PLAIN DEBUG SMTP: use8bit false MAIL FROM:<(my gmail address)> 250 2.1.0 OK pb7sm87689296pac.10 - gsmtp ... continues on with successful email transmission
DIGEST-MD5 allows the server to not store the password, but the client still needs the password. The main advantage is that the password is never sent in clear text to the server. If the server supported DIGEST-MD5 (Gmail doesn't appear to), you use it just like any other authentication, supplying the password to the connect method.
why I can send email by gmail in my local, but can not send be ubuntu server?
I have using JavaMail version 1.4.3, I can sent email in my dev environment, but can not sent email when deploy in ubuntu server. I compare the debug log as below:smtp can not be accepted but my local can.any suggestings? I also search here java mail error local: **DEBUG: setDebug: JavaMail version 1.4.3 DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 465, isSSL false 220 mx.google.com ESMTP u9sm646165paf.22 - gsmtp DEBUG SMTP: connected to host "smtp.gmail.com", port: 465 EHLO 10.37.129.2 250-mx.google.com at your service, [112.64.93.195] 250-SIZE 35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 250 ENHANCEDSTATUSCODES DEBUG SMTP: Found extension "SIZE", arg "35882577" DEBUG SMTP: Found extension "8BITMIME", arg "" DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH XOAUTH2" DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg "" DEBUG SMTP: Attempt to authenticate DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM ubuntu: DEBUG: setDebug: JavaMail version 1.4.3 DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 465, isSSL false 220 mx.google.com ESMTP ed8sm502698qeb.7 - gsmtp DEBUG SMTP: connected to host "smtp.gmail.com", port: 465 WkFRITJ3c3hjZGUz 535-5.7.1 Username and Password not accepted. Learn more at 535 5.7.1 http://support.google.com/mail/bin/answer.py?answer=14257 ed8sm502698qeb.7 - gsmtp 15:21:33,167 ERROR ~ #6e0gki7nd The email has not been sent Mail error A mail error occured : Error while sending email play.exceptions.MailException: Error while sending email at play.libs.Mail$2.call(Mail.java:186) at play.libs.Mail$2.call(Mail.java:178) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:25 at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1242) at org.apache.commons.mail.Email.send(Email.java:1267) at play.libs.Mail$2.call(Mail.java:183) ... 6 more Caused by: javax.mail.AuthenticationFailedException: 535-5.7.1 Username and Password not accepted. Learn more at 535 5.7.1 http://support.google.com/mail/bin/answer.py?answer=14257 ed8sm502698qeb.7 - gsmtp at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:648) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:583) at javax.mail.Service.connect(Service.java:313) at javax.mail.Service.connect(Service.java:172) at javax.mail.Service.connect(Service.java:121) at javax.mail.Transport.send0(Transport.java:190) at javax.mail.Transport.send(Transport.java:120) at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232) ... 8 more
The most likely explanation is that you think you're using the same username and password in both cases, but you're not. Note that the funny text after "AUTH LOGIN" is your base64 encoded username and password. Anyone can decode them. Without decoding them I can tell you that they're not the same in both cases, probably because you've altered the debug output in some way. Check your program and make sure you're really using the same username and password in both cases.