shaurya2109 / pg-backend

Pocket Grocer Application Backend for CSE 403
1 stars 0 forks source link

SQL Server Exception when running 'java -jar ./target/pocketgrocer-1.0-jar-with-dependencies.jar' command #1

Open HunterF98 opened 3 years ago

HunterF98 commented 3 years ago

Hey guys! It looks to me like you need to review the permissions on your database and set it up so all IP Addresses can access it for using your application. Here is the full error message! If you have any other questions for me, hit me up on slack. Also please lmk when you get this fixed so I can review your application. Thanks! - Hunter Fitzgerald

java -jar ./target/pocketgrocer-1.0-jar-with-dependencies.jar [INFO ] Loading application properties [INFO ] Connecting to the database Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open server 'users-pocket-grocer' requested by the login. Client with IP address 'MY_IP_ADDRESS' is not allowed to access the server. To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect. ClientConnectionId:46b6fea7-8b9d-4105-b52f-7f35588925bc at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262) at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:283) at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:129) at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:37) at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:5333) at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:4066) at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:4004) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7418) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3272) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2768) at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2418) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2265) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1291) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:881) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:189) at pocketgrocer.Query.(Query.java:122) at pocketgrocer.Server.main(Server.java:9)

ilyasrepo commented 3 years ago

Same issue as above. Cannot setup backend server due to Azure Firewall restrictions. Please let us know when issue is resolved.

sgsevier commented 3 years ago

Sorry about this. It should be working now. if not, ping me on slack with your IP address and I'll manually add it