【问题标题】:How can I connect to SAS CAS Server如何连接到 SAS CAS 服务器
【发布时间】:2022-10-15 00:01:29
【问题描述】:

我正在使用 YOLO 在 SAS 中训练图像数据集。我正在关注给出步骤的文档(请参阅下面给出的参考文档链接。

但是,现在我正在苦苦挣扎,因为我无法完成与 SAS CAS 服务器的连接,因为它显示错误。

这是我给的代码:

# Connect to the SAS CAS Server

s =     CAS('pdcesx23043.exnet.sas.com', 5570)

并呈现以下错误:

    ERROR: Kerberos initialization failed. Your credential cache is either expired or missing.

---------------------------------------------------------------------------
    SystemError                               Traceback (most recent call last)
    /opt/conda/lib/python3.8/site-packages/swat/cas/connection.py in 
    __init__(self, hostname, port, username, password, session, locale, nworkers, name, authinfo, protocol, path, ssl_ca_list, authcode, **kwargs)
    436                 else:
--> 437                     self._sw_connection = clib.SW_CASConnection(*params)
    438 

    /opt/conda/lib/python3.8/site-packages/swat/clib.py in SW_CASConnection(*args, **kwargs)
    132         _import_pyswat()
--> 133     return _pyswat.SW_CASConnection(*args, **kwargs)
    134 

     SystemError: <class 'py38swat.SW_CASConnection'> returned NULL without setting an error

     During handling of the above exception, another exception occurred:

     SWATError                                 Traceback (most recent call last)
<ipython-input-4-7f4ffa2dc158> in <module>
      1 # Connect to the SAS CAS Server
      2 
----> 3 s = CAS('pdcesx23043.exnet.sas.com', 5570)

    /opt/conda/lib/python3.8/site-packages/swat/cas/connection.py in 
    __init__(self, hostname, port, username, password, session, locale, nworkers, name, authinfo, protocol, path, ssl_ca_list, authcode, **kwargs)
    442 
    443         except SystemError:
--> 444             raise SWATError(self._sw_error.getLastErrorMessage())
    445 
    446         # Set up index origin for error messages

    SWATError: Could not connect to 'pdcesx23043.exnet.sas.com' on port 5570.

如果您能调查此问题并为我提供解决问题的指导,那将是一个很大的帮助。

Reference documentation link

【问题讨论】:

  • 不要发布代码、数据、错误消息等的图像。- 将文本复制或输入到问题中。 How to Ask
  • 感谢您的提示,我已相应地修改了我的问题。
  • 并且在代码或日志的前一行和后一行,放四个`,这样就被格式化为代码了。 (我为你做了。)
  • 看起来您正在从 python 访问 SAS。请添加python 标签并提及您导入的内容。

标签: python sas yolo


【解决方案1】:

您是否设置了 authinfo 文件,或者您正在使用 Kerberos?第一个顶部的错误似乎是 kerberos 问题,但实际上可能是 authinfo 的问题 - 请参阅 troubleshooting documentation

应该可以使用 kerberos,但它非常挑剔,您可能需要您的 SAS 管理员和 AD 管理员来帮助正确设置连接。

Authinfo 是更常见的解决方案,因为它会缓存您的密码,您应该能够找到instructions here

【讨论】:

    猜你喜欢
    • 2016-07-11
    • 1970-01-01
    • 2012-07-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-29
    • 2012-12-21
    • 2014-11-12
    相关资源
    最近更新 更多