Hi! Trying to establish connection with remote PG server got error "Warning: cannot connect to the postgresql server X.X.X.X: could not send SSL negotiation packet: Resource temporarily unavailable". Same result for "li run main.cc" and local CMake build. pgcli works fine with the same connection parameters.
auto db = pgsql_database(
s::host = "xxx.xxx.xxx.xxx", // Hostname or ip of the database server
s::database = "my-services", // Database name
s::user = "admin", // Username
s::password = "admin", // Password
s::port = 31357, // Port
s::charset = "utf8", // Charset
// Only for async connection, specify the maximum number of SQL connections per thread.
s::max_async_connections_per_thread = 200,
// Only for synchronous connection, specify the maximum number of SQL connections
s::max_sync_connections = 2000);
auto countries_orm = sql_orm_schema(db, "sys.country")
.fields(
s::id(s::auto_increment, s::primary_key) = int(),
s::code = std::string(),
s::code_3 = std::string(),
s::code_dig = std::string(),
s::name = std::string(),
s::name_engl = std::string(),
s::note = std::string()
);
auto countries = countries_orm.connect();
Hi! Trying to establish connection with remote PG server got error "Warning: cannot connect to the postgresql server X.X.X.X: could not send SSL negotiation packet: Resource temporarily unavailable". Same result for "li run main.cc" and local CMake build. pgcli works fine with the same connection parameters.