cloudfoundry-attic / mssql-server-broker

Cloud Foundry service broker for Microsoft SQL Server
Apache License 2.0
12 stars 3 forks source link

Broker cannot connect #7

Closed siennathesane closed 5 years ago

siennathesane commented 5 years ago

With this application manifest:

---
applications:
- name: mssql-server-broker
  memory: 1G
  instances: 1
  buildpack: java_buildpack
  path: target/mssql-server-broker.jar
  env:
    SPRING_PROFILES_ACTIVE: cloud
    SQL_HOST: sql
    SQL_PORT: 1433
    SQLSERVER_USERNAME: sa
    SQLSERVER_PASSWORD: pass
    SPRING_SECURITY_USER_NAME: 93207046-c552-4971-87ee-fedfcc173398
    SPRING_SECURITY_USER_PASSWORD: pass

This error is thrown:

2018-11-12T14:00:40.01-0700 [APP/PROC/WEB/0] OUT com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host sql.int.reboot3times.org, port 1433 has failed. Error: "Connection refused. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".

I can verify with DataGrip, VSCode, and sqlcmd from remote sources that the database is remotely accessible.

✗ sqlcmd -S sql,1433 -U sa -P 'pass'
1> select @@version
2> go

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Microsoft SQL Server 2017 (RTM-CU12) (KB4464082) - 14.0.3045.24 (X64)
        Oct 18 2018 23:11:05
        Copyright (C) 2017 Microsoft Corporation
        Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)

(1 rows affected)
1> quit

The broker was build with mvn clean install -DskipTests with this version of Java:

✗ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1ubuntu0.18.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

It was deployed with the java-buildpack-cflinuxfs2-v4.15 buildpack.

JaredGordon commented 5 years ago

thanks Mr. mxplusb. Let me look into this and try to recreate the issue.

JaredGordon commented 5 years ago

well, I was not able to recreate this. I started with a new sql server install on GCP, new broker, new org, unit tests passed, no issues. I deployed and registered the broker, installed and ran the demo app. All worked.

I am going to close this issue for now: we can re-open again if necessary.