gpt4 book ai didi

mysql - 在 Google Appengine 上接收 SQLNonTransientConnectionException

转载 作者:行者123 更新时间:2023-11-29 11:13:08 25 4
gpt4 key购买 nike

我多年来一直在 Google 平台上使用 MySQL(“Cloud SQL”)。第一代。仅限 SSL 连接。我的所有证书已经准备好几个月了并且运行得很好。我的证书没有过期。在过去的一天半里我一直无法连接到数据库!尝试重新启动数据库。由于周五开始的拒绝服务攻击,谷歌是否改变了他们的环境?

Exception in thread "main" java.sql.SQLNonTransientConnectionException: SSL Connection required, but not supported by server.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:550)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:537)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:527)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:512)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:480)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:498)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:494)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:72)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:1634)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:637)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:351)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:224)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at ... my code

发生什么事了?

最佳答案

经过一番调查,我发现我的服务器端证书丢失了。我通过使用开发者控制台重新启动我的 CloudSQL 实例发现了这一点。然后我调查了日志。

2016-10-22 12:42:47 0 [Note] (mysqld 5.6.31-log) starting as process 554455 ...
2016-10-22 12:42:47 554455 [Note] Semi-sync replication initialized for transactions.
2016-10-22 12:42:47 554455 [Note] Semi-sync replication enabled on the master.
2016-10-22 12:42:47 554455 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-10-22 12:42:47 554455 [Note] InnoDB: The InnoDB memory heap is disabled
2016-10-22 12:42:47 554455 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-10-22 12:42:47 554455 [Note] InnoDB: Memory barrier is not used
2016-10-22 12:42:47 554455 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-10-22 12:42:47 554455 [Note] InnoDB: Using CPU crc32 instructions
2016-10-22 12:42:47 554455 [Note] InnoDB: Initializing buffer pool, size = 96.0M
2016-10-22 12:42:47 554455 [Note] InnoDB: Completed initialization of buffer pool
2016-10-22 12:42:47 554455 [Note] InnoDB: Highest supported file format is Barracuda.
2016-10-22 12:42:51 554455 [Note] InnoDB: 128 rollback segment(s) are active.
2016-10-22 12:42:51 554455 [Note] InnoDB: 5.6.31 started; log sequence number 10094548402
2016-10-22 12:42:52 554455 [Note] RSA private key file not found: /sfs/project/database/data//private_key.pem. Some authentication plugins will not work.
2016-10-22 12:42:52 554455 [Note] RSA public key file not found: /sfs/project/database/data//public_key.pem. Some authentication plugins will not work.
2016-10-22 12:42:52 554455 [Note] Add the 'cloudsqladmin' user with the password hash '*ACE49C8814A8031C812FD739A573BDD4FFF8F7EE'
2016-10-22 12:42:53 554455 [Note] Event Scheduler: Loaded 0 events
2016-10-22 12:42:53 554455 [Note] : ready for connections.
Version: '5.6.31-log' socket: '' port: 0 (43, 47) (Google)

我仍然希望了解这是如何发生的,我会尽可能更新。考虑到这件事发生在谷歌这边,我不确定我是否可以直接修复它。我看到开发控制台中有一个“重置 SSL 配置”选项。我希望我不必这样做,因为这意味着向生产代码和所有开发者推出新的证书。我的问题也在这里跟踪:https://code.google.com/p/googlecloudsql/issues/detail?id=188

关于mysql - 在 Google Appengine 上接收 SQLNonTransientConnectionException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40192360/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com