java - 带有身份验证的代理后面的 Presto 连接
问题描述
我正在尝试使用 JDBC 驱动程序连接到 presto,但是当我运行该过程时,我得到:
Error Cause java.io.UncheckedIOException: java.io.IOException: Failed to authenticate with proxy
我在文档中看到我们可以传递属性httpProxy但没有如何将身份验证传递给它。
我正在使用这个版本:0.239.1
String url = "jdbc:presto://MY-SERVER:PORT/dal_hms_prod/default?user=USERNAME&password=PASSWORD&SSL=true";
Properties properties = new Properties();
properties.setProperty("httpProxy", "PROXY_SERVER:PORT");
Connection connection = DriverManager.getConnection(url, properties);
log.info("Connection stablished "+connection.getSchema());
Statement stmt = connection.createStatement();
String sql = "select test from usersource.usersource_flat limit 1;";
ResultSet res = stmt.executeQuery(sql);
希望有人能给我一些见解。谢谢。
解决方案
推荐阅读
- python - Python 3.6 - 用户输入调用类变量
- mongodb - MongoDB - 我应该以哪种方式建立关系?
- ios - UITableView/indexPath.row:为什么if语句排除第10行?
- optimization - 如何用一系列数字快速填充列表
- c# - 通过拖放将选定的列表视图图像显示到图片框
- azure - 在 Azure Functions 中使用带有 CloudBlockBlob 和 BlobAttribute 的 WindowsAzure.Storage 8.5
- sql - 查找每个账户的最新合约
- python - 为什么 Requests 在 __version__.py 中有蛋糕?
- java - File.listFiles 抛出 NullPointer
- php - PHP preg_match 应该返回 true 但返回 false