阿帕奇点燃;无法连接集群,连接失败
Apache Ignite; failed to connect cluster, connection failed
我正在尝试使用 ApacheIgnite 进行 SQL 查询。
基本上我无法连接到我的端口,它在 docker IP:172.17.0.1 和我的 SQL 端口:3606
中执行
POM配置如下:
Ignite-core:2.7.6
ignite-indexing: 2.7.6
mysql-connector-java: 8.0.17
private static Connection igniteConnection;
private static Statement sql;
private static ResultSet rs;
public static void main(String[] args) throws Exception
{
Class.forName("org.apache.ignite.IgniteJdbcThinDriver");
IgniteConfiguration conf = new IgniteConfiguration();
Ignite ignite = Ignition.start(conf);
igniteConnection = DriverManager.getConnection("jdbc:ignite:thin://localhost:3606/test;user=root;password=root");
sql = igniteConnection.createStatement();
sql.executeUpdate("CREATE TABLE Employee (" +
" id LONG PRIMARY KEY, name VARCHAR(30), country VARCHAR(30))");
PreparedStatement sql = igniteConnection.prepareStatement("INSERT INTO Employee (id, name, country) VALUES (?, ?, ?)");
sql.setLong(1, 1);
sql.setString(2, "James");
sql.setString(3, "EEUU");
sql.executeUpdate();
rs = sql.executeQuery("SELECT e.name, e.country FROM Employee");
while(rs.next()){
String name = rs.getString(1);
String country = rs.getString(2);
System.out.println(name+"\t"+country);
}
ignite.close();
igniteConnection.close();
rs.close();
}
}
如果我没记错的话,3606
是 MySQL 端口。 Apache Ignite 默认使用 10800
作为 SQL 端口。请在确保从 Docker.
导出后尝试那个
尝试使用10800连接
默认情况下,Ignite 使用以下本地端口:
10800 瘦客户端连接的默认端口
11211 默认 JDBC 端口
47100 默认本地通信端口
47500 默认本地发现端口
8080 REST 的默认端口 API
49128 JMX 连接的默认端口
31100~31200 默认时间服务器端口
48100~48200 默认共享内存端口
我正在尝试使用 ApacheIgnite 进行 SQL 查询。
基本上我无法连接到我的端口,它在 docker IP:172.17.0.1 和我的 SQL 端口:3606
中执行POM配置如下:
Ignite-core:2.7.6
ignite-indexing: 2.7.6
mysql-connector-java: 8.0.17
private static Connection igniteConnection;
private static Statement sql;
private static ResultSet rs;
public static void main(String[] args) throws Exception
{
Class.forName("org.apache.ignite.IgniteJdbcThinDriver");
IgniteConfiguration conf = new IgniteConfiguration();
Ignite ignite = Ignition.start(conf);
igniteConnection = DriverManager.getConnection("jdbc:ignite:thin://localhost:3606/test;user=root;password=root");
sql = igniteConnection.createStatement();
sql.executeUpdate("CREATE TABLE Employee (" +
" id LONG PRIMARY KEY, name VARCHAR(30), country VARCHAR(30))");
PreparedStatement sql = igniteConnection.prepareStatement("INSERT INTO Employee (id, name, country) VALUES (?, ?, ?)");
sql.setLong(1, 1);
sql.setString(2, "James");
sql.setString(3, "EEUU");
sql.executeUpdate();
rs = sql.executeQuery("SELECT e.name, e.country FROM Employee");
while(rs.next()){
String name = rs.getString(1);
String country = rs.getString(2);
System.out.println(name+"\t"+country);
}
ignite.close();
igniteConnection.close();
rs.close();
}
}
3606
是 MySQL 端口。 Apache Ignite 默认使用 10800
作为 SQL 端口。请在确保从 Docker.
尝试使用10800连接
默认情况下,Ignite 使用以下本地端口: 10800 瘦客户端连接的默认端口
11211 默认 JDBC 端口
47100 默认本地通信端口
47500 默认本地发现端口
8080 REST 的默认端口 API
49128 JMX 连接的默认端口
31100~31200 默认时间服务器端口
48100~48200 默认共享内存端口