sql server未返回响应错误

ymdaylpp  于 2021-06-18  发布在  Mysql
关注(0)|答案(2)|浏览(791)

当我尝试访问azuresqlserver时,出现以下错误。不过,通过dbeaver的连接看起来不错。
我最近更新了我的macos到mojave,这会导致任何驱动程序不兼容吗?对如何解决这个问题有什么想法吗?这真是烦我,任何帮助将不胜感激!
我正在尝试访问azure my sql中的一个表,代码在clojure中,因此错误堆栈跟踪如下:


# error {

 :cause SQL Server did not return a response. The connection has been closed. ClientConnectionId:98906d8f-3e0c-424e-8145-04636958e14b
 :via
 [{:type com.microsoft.sqlserver.jdbc.SQLServerException
   :message SQL Server did not return a response. The connection has been closed. ClientConnectionId:98906d8f-3e0c-424e-8145-04636958e14b
   :at [com.microsoft.sqlserver.jdbc.SQLServerConnection terminate SQLServerConnection.java 1667]}]
 :trace
 [[com.microsoft.sqlserver.jdbc.SQLServerConnection terminate SQLServerConnection.java 1667]
  [com.microsoft.sqlserver.jdbc.SQLServerConnection terminate SQLServerConnection.java 1654]
  [com.microsoft.sqlserver.jdbc.TDSReader readPacket IOBuffer.java 4844]
  [com.microsoft.sqlserver.jdbc.TDSCommand startResponse IOBuffer.java 6154]
  [com.microsoft.sqlserver.jdbc.TDSCommand startResponse IOBuffer.java 6106]
  [com.microsoft.sqlserver.jdbc.SQLServerConnection sendLogon SQLServerConnection.java 2907]
  [com.microsoft.sqlserver.jdbc.SQLServerConnection logon SQLServerConnection.java 2234]
  [com.microsoft.sqlserver.jdbc.SQLServerConnection access$000 SQLServerConnection.java 41]
  [com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand doExecute SQLServerConnection.java 2220]
  [com.microsoft.sqlserver.jdbc.TDSCommand execute IOBuffer.java 5696]
  [com.microsoft.sqlserver.jdbc.SQLServerConnection executeCommand SQLServerConnection.java 1715]
  [com.microsoft.sqlserver.jdbc.SQLServerConnection connectHelper SQLServerConnection.java 1326]
  [com.microsoft.sqlserver.jdbc.SQLServerConnection login SQLServerConnection.java 991]
  [com.microsoft.sqlserver.jdbc.SQLServerConnection connect SQLServerConnection.java 827]
  [com.microsoft.sqlserver.jdbc.SQLServerDriver connect SQLServerDriver.java 1012]
  [java.sql.DriverManager getConnection DriverManager.java 664]
  [java.sql.DriverManager getConnection DriverManager.java 208]
  [clojure.java.jdbc$get_connection invokeStatic jdbc.clj 272]
  [clojure.java.jdbc$get_connection invoke jdbc.clj 193]
  [korma.db$do_query invokeStatic db.clj 286]
  [korma.db$do_query invoke db.clj 283]
  [korma.core$exec invokeStatic core.clj 498]
  [korma.core$exec invoke core.clj 477]
  [swbimodel.provider_info$get_for_pid invokeStatic provider_info.clj 22]
  [swbimodel.provider_info$get_for_pid invoke provider_info.clj 18]
  [genki.utils$sql_app_status_check invokeStatic utils.clj 159]
  [genki.utils$sql_app_status_check invoke utils.clj 157]
  [user$eval40383 invokeStatic form-init5576567307560081321.clj 1]
  [user$eval40383 invoke form-init5576567307560081321.clj 1]
  [clojure.lang.Compiler eval Compiler.java 6927]
  [clojure.lang.Compiler eval Compiler.java 6890]
  [clojure.core$eval invokeStatic core.clj 3105]
  [clojure.core$eval invoke core.clj 3101]
  [clojure.main$repl$read_eval_print__7408$fn__7411 invoke main.clj 240]
  [clojure.main$repl$read_eval_print__7408 invoke main.clj 240]
  [clojure.main$repl$fn__7417 invoke main.clj 258]
  [clojure.main$repl invokeStatic main.clj 258]
  [clojure.main$repl doInvoke main.clj 174]
  [clojure.lang.RestFn invoke RestFn.java 1523]
  [clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__39798 invoke interruptible_eval.clj 87]
  [clojure.lang.AFn applyToHelper AFn.java 152]
  [clojure.lang.AFn applyTo AFn.java 144]
  [clojure.core$apply invokeStatic core.clj 646]
  [clojure.core$with_bindings_STAR_ invokeStatic core.clj 1881]
  [clojure.core$with_bindings_STAR_ doInvoke core.clj 1881]
  [clojure.lang.RestFn invoke RestFn.java 425]
  [clojure.tools.nrepl.middleware.interruptible_eval$evaluate invokeStatic interruptible_eval.clj 85]
  [clojure.tools.nrepl.middleware.interruptible_eval$evaluate invoke interruptible_eval.clj 55]
  [clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__39843$fn__39846 invoke interruptible_eval.clj 222]
  [clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__39838 invoke interruptible_eval.clj 190]
  [clojure.lang.AFn run AFn.java 22]
  [java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1149]
  [java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 624]
  [java.lang.Thread run Thread.java 748]]}

我引用sql的clojure代码:

(defn get-for-pid [pid]
  (let [query (-> (select* sql-table)
      (where (= :PID pid)))]
      (select query)))

(defn status-check [pid]
  (let [sqlstatus (vec (get-for-pid pid))]
    (if (empty? sqlstatus) false 
      (if (contains? (first sqlstatus) :Status) 
        (get-in (first sqlstatus) [:Status]) false))))
3j86kqsm

3j86kqsm1#

是不是在操作系统升级期间,您获得了一组新的防火墙规则,dbeaver被授权,但其他java程序不允许使用连接所需的端口?

fykwrbwg

fykwrbwg2#

更新:这个帖子帮我解决了这个问题。我只是通过运行以下命令来设置主机名:

sudo scutil --set HostName "YOUR HOSTNAME HERE"

相关问题