Search code examples
razorjdbcdatabase-connectionsap-ase

Unable to connect to Sybase database from Razor


I am current working on a Project that requires Sybase database. Hence I have installed ASE 16.0 Developer's Edition and Razor for easy access but my issue is that my Razor v6.3.19 cannot connect to the sybase. It returns with the error as can be seen on the attached screen

enter image description here

I can successfully access the database from isql on the terminal. Note that I am running this Ubnutu 14.04 and my database port was set to run on 7160

Sample message from the server log: 00:0006:00000:00009:2015/03/20 21:33:44.65 kernel network name Server_NAME, interface IPv4, address 127.0.1.1, type tcp, port 7160, filter NONE Thanks in advance


Solution

  • Connection refused means that the server isn't listening on the specified port, or your firewall actively prevents you from connecting to that port.

    Your log shows that the server is listening on 127.0.1.1; this is not the same address as 127.0.0.1, so the port might be open on 127.0.1.1, but not on 127.0.0.1. Specifying 127.0.1.1 should allow you to connect.

    All IPv4 address starting with 127 are a local loopback address (as defined in RFC 1700), so all 127.*.*.* address refer to your local machine, but only 127.0.0.1 is - usually - linked to the hostname localhost. When an application listens on a port, it can specify to create the port on all available addresses (0.0.0.0) or on a specific address (in this case 127.0.1.1).