Configuring SQL Anywhere to read from an ASE server - wcf-ria-services

I have a Sybase ASE server that I'm able to connect to with ASE iSql totally fine. The database definition in my sql.ini file looks like:
[<NAME>]
master=TCP,<servername>,<port>
to connect with iSql, I can make the following command-line call and it works:
isql -U <username> -P <password> -S <NAME>
My ultimate goal is to use SQL Anywhere's ADO.Net Entity Framework connectivity for a RIA service I'm writing. I'm trying to connect now using SQL Anywhere through Sybase Central (rather than through Visual Studio), and can't get it to work. Under the Identification tab, I use and for my credentials and leave the bottom half as "None", under the Database tab, I specify for the Server name, and under Network I check "TCP/IP", and specify as the Host, and as the Port. I get the following error:
Fri Nov 20 2009 13:10:10
13:10:10 Attempting to connect using:
UID=sa;ENG=<servername>;CON=SQL_DBC_15c95350;LOG=<log>;LINKS='TCPIP(IP=<servername>;PORT=<port>)'
13:10:10 Attempting to connect to a running server...
13:10:10 Trying to start TCPIP link ...
13:10:10 TCP using Winsock version 2.2
13:10:10 My IP address is 28.230.56.158
13:10:10 My IP address is 127.0.0.1
13:10:10 TCPIP link started successfully
13:10:10 Attempting TCPIP connection (no sasrv.ini cached address)
13:10:10 Looking for server with name <servername>
13:10:10 Trying to find server at address <servername>
13:10:10 Found server, verifying server name
13:10:10 TCP/IP link, function recv(), error code 0
13:10:10 Sending broadcast to find server
13:10:10 Using broadcast address of: 28.230.56.255:<port>
13:10:10 Using broadcast address of: 28.230.56.255:2638
13:10:10 Sending broadcast to find server
13:10:10 Using broadcast address of: 127.255.255.255:<port>
13:10:10 Using broadcast address of: 127.255.255.255:2638
13:10:11 Resending
13:10:12 Resending
13:10:13 Resending
13:10:14 Resending
13:10:15 Resending
13:10:16 Server not found (no reply received)
13:10:16 Failed to connect over TCPIP
13:10:16 Not attempting to autostart server
13:10:16 Cannot connect to server
I'm sorry in advance if I left out significant details. I'm new to Sybase, having a strictly Oracle background. If I left out anything you need to know, please post a comment and I'll update the question. Thanks for helping a Sybase newb.

There's no way to do what I was asking (though it could be possible with a proxy table, that's not a desirable solution), so I'm not going to use the .Net RIA Services framework. I'm going to be writing a standard ASP.Net web service.

Related

psql with source IP anchoring

I am using PostgreSQL flexible server by MSAzure.
The server is not setting any connection restriction and allows connections from all IPs.
I can access to the server with psql command normally.
psql "host=.postgres.database.azure.com port=5432 dbname=postgres user=myadmin password= sslmode=require"
However, with the Source IP anchoring function by Zscaler Internet Access, it fails.
psql: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.
I could not find the error logs from server side.
Also I checked the packet and it seems the server sends RST packet as soon as it received connection request message from client.
enter image description here
Source IP Anchoring(SIPA) is a function which fixes source IP by transferring the packet to the proxy cloud, and from proxy cloud to private VM. The VM takes over the connection to the destination server.
Client <-> Proxy Cloud <-> VM <-> sql server
So from client side, it looks like the client is connecting to the proxy cloud.
And from sql server, it seems the server is connecting to VM.
The VM only performs outbound connection and never allows inbound connection.
This means connection pushed from server to client is not supported (like P2P, Application lelvel gateway, SIP, RTSP, Bittorent).
Does Postgresql connection requires inbound connection from server to client?
I tried disabling SSL connection, but the result was same.
The client version and server version are both same.
Also I tried connecting from pgAdmin 4, but failed again.
I'll appreciate any clue on this.

php: fbird_connect(): Unable to complete network request to host "localhost". Failed to establish a connection [duplicate]

I'm trying to connect to a remote Firebird database "test" (alias already added). It is not an embedded server, and is installed on VM with IP 192.168.1.147.
Here is my connection string:
User=sysdba;Password=masterkey;Database=test;DataSource=192.168.1.147
However I got an error:
FirebirdSql.Data.FirebirdClient.FbException (0x80004005): Unable to complete network request to host "192.168.1.147". ---> Unable to complete network request to host "192.168.1.147".
I've done some research on that but haven't got a clue yet. Some help needed. Thanks
My IP address is 192.168.2.108, and I can ping that server IP successfully
Make sure that
Firebird is running
Firebird is listening on port 3050 on the specified IP (or on 0.0.0.0)
Your firewall allows access to port 3050
You're using the correct host name
For Linux, the Firebird port is closed by default. You need to modify RemoteBindAddress in /etc/firebird/2.5/firebird.conf from
RemoteBindAddress = localhost
to
RemoteBindAddress =
and restart service.
Make sure you have excluded tcp port 3050 in VMs' firewall.
Ok. I think your connection to firebird is faililing because the firebird client looks up the network service file by name and does not find gds_db in the services file.
If your connection string refers to the host by using IP, the Client might fail to identify it because it gethostbyname() and not by IP
Manually include this in the file and you should be fine.
C:\windows\system32\drivers\etc\services

PGAdmin III cannot connect AWS RDS

I am trying to connect AWS RDS PostgreSql from PgAdmin 3. I followed the below link
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToPostgreSQLInstance.html
In Security Group, I also added PostgreSQL and All traffic as below
The "publicly accessible" flag was enabled (updated after Mark B's comment)
I got the error from PGAdmin3
Very appreciate for any suggestion
******UPDATE*******
I can connect pgAdminIII to AWS RDS successfully using home wifi, but cannot connect using office wifi.
My concern is:
Was the port 5432 blocked by office wifi?
How can I configure/update the port without impacting to current API?
Note: My current API is working well (CRUD)
Can you can test your connection to a DB instance using common Linux or Windows tools first?
From a Linux or Unix terminal, you can test the connection by typing the following (replace with the endpoint and with the port of your DB instance):
$nc -zv DB-instance-endpoint port
For example, the following shows a sample command and the return value:
$nc -zv postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com 8299
Connection to postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com
8299 port [tcp/vvr-data] succeeded!
Windows users can use Telnet to test the connection to a DB instance. Note that Telnet actions are not supported other than for testing the connection. If a connection is successful, the action returns no message. If a connection is not successful, you receive an error message such as the following:
C:>telnet sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com
8299
Connecting To sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com...Could not
open connection to the host, on port 819: Connect failed
If Telnet actions return success, then you are good to go.
If you are trying to access it from a network which is not listed for that port. you need to add inbound rules for those network IPs from AMAZON RDS system
You will also need to set Public accessibility true under Connect & security tab in RDS console.
Read this post.In your security group go to unbound rules and add my ip.
and make sure your database is public.
https://serverfault.com/questions/656079/unable-to-connect-to-public-postgresql-rds-instance

EC2 Internal Sockets

I'm trying to have two process communicate through a socket connection. One of these is a python app, and the other is a php script.
I've created and tested the client/server combination on my home computer and it functions properly. However, when I deploy onto an EC2 instance (ubuntu 10.10 64bit ami + apache + php) I get an unable to connect to socket error (111 Connection Refused) from the php script. The python app is able to bind to the socket and listen to messages but the php script is unable to send messages.
I've opened the required ports in the amazon security group and I can connect to the port externally using telnet. However if I attempt to connect with telnet from within the server I get the same connection refused error.
How can I solve this issue?
Edit: Both processes are on the same instance
The issue had nothing to do with EC2 explicitly. I was not binding to localhost, but instead binding to my hostname. On a local network that was the same as my localhost ip, however on ec2 it was not. Switching to binding to localhost fixed the issue.

T-SQL Debugging Logon Failure

Server Info:
Windows Server 2008, SQL Server Standard 2008 (64-bit)
I recently upgraded to SQL 2008 and was interested in trying out T-SQL Debugging. Initally encountered some firewall issues, but after disabling my workstation's Windows Firewall and having TCP port 135 and UDP 4500/500 opened up by the IT group I got a little further.
Now I get the error message:
Unable to start T-SQL Debugging. Could not connect to computer 'servername'. Logon failure: unknown user name or bad password.
My workstation and server are on different domains and I use Windows authentication to connect to the machine. My account is sysadmin and connects to the server fine in SSMS. The SQL Server service is running as a different service-level account.
Thoughts?
I have seen the same error message. My configuration, however, is different. I am connected from Management Studio 2008 with an SQL user to a SQL Server 2008 instance.
I user a sniffer (Wireshark) to monitor IP traffic en saw the following:
DCERPC Bind: call_id: 5 IRemUnknown2 V0.0, NTLMSSP_NEGOTIATE
DCERPC Bind_ack: call_id: 5, NTLMSSP_CHALLENGE accept max_xmit:
5840 max_recv: 5840
DCERPC AUTH3: call_id: 5, NTLMSSP_AUTH, User:
\
IRemUnknown2 RemRelease request[Malformed Packet]
TCP 49914 > mapper-mapethd [ACK] Seq=247 Ack=526 Win=63846 Len=0
DCERPC Fault: call_id: 5 ctx_id: 0 status: nca_s_fault_access_denied
Note: my actual domain and user have been replaced by and , respectively.
Maybe, this can help you to get more detailled information.
At this point, I am stuck. I tried to give this domain user access to the server, but do not have permission to do so. Also, I am not sure if this is needed, because I connect using an SQL user.