I am getting a "An address incompatible with the requested protocol was used" when trying to to do a domain build with Postgres. The environment :

Windows 7 32 bit. Visual Studio 2008 Postgres 8.4

As well as my application i have tried the consol sample and that gives the same error. I have diabled the firewall with the same result. Both pgAdmin and the command line sql utility can connect and work without errors.

I did the same thing with the consol sample on an xp machine and it works fine.

Any ideas.

10/11/2009 18:47:47 Error   General Error building DO4 Database - Npgsql.NpgsqlException:
An address incompatible with the requested protocol was used
   at Npgsql.NpgsqlClosedState.Open(NpgsqlConnector context)
   at Npgsql.NpgsqlConnector.Open()
   at Npgsql.NpgsqlConnectorPool.GetPooledConnector(NpgsqlConnection Connection)
   at Npgsql.NpgsqlConnectorPool.RequestPooledConnectorInternal(NpgsqlConnection Connection)
   at Npgsql.NpgsqlConnectorPool.RequestPooledConnector(NpgsqlConnection Connection)
   at Npgsql.NpgsqlConnectorPool.RequestConnector(NpgsqlConnection Connection)
   at Npgsql.NpgsqlConnection.Open()
   at Xtensive.Sql.PostgreSql.DriverFactory.CreateDriver(UrlInfo url) in c:\TeamCity\buildAgent\work\6a5d81309423096e\Xtensive.Sql\Xtensive.Sql.PostgreSql\DriverFactory.cs:line 22
   at Xtensive.Sql.SqlDriver.GetDriver(UrlInfo url) in c:\TeamCity\buildAgent\work\6a5d81309423096e\Xtensive.Sql\Xtensive.Sql\SqlDriver.cs:line 246
   at Xtensive.Sql.SqlDriver.Create(UrlInfo url) in c:\TeamCity\buildAgent\work\6a5d81309423096e\Xtensive.Sql\Xtensive.Sql\SqlDriver.cs:line 196
   at Xtensive.Storage.Providers.Sql.Driver..ctor(UrlInfo url) in c:\TeamCity\buildAgent\work\6a5d81309423096e\Xtensive.Storage\Xtensive.Storage.Providers.Sql\Driver.cs:line 110
   at Xtensive.Storage.Providers.Sql.DomainHandler.Initialize() in c:\TeamCity\buildAgent\work\6a5d81309423096e\Xtensive.Storage\Xtensive.Storage.Providers.Sql\DomainHandler.cs:line 206
   at Xtensive.Storage.Building.Builders.DomainBuilder.CreateDomainHandler() in c:\TeamCity\buildAgent\work\6a5d81309423096e\Xtensive.Storage\Xtensive.Storage\Building\Builders\DomainBuilder.cs:line 148
   at Xtensive.Storage.Building.Builders.DomainBuilder.BuildDomain(DomainConfiguration configuration, DomainBuilderConfiguration builderConfiguration) in c:\TeamCity\buildAgent\work\6a5d81309423096e\Xtensive.Storage\Xtensive.Storage\Building\Builders\DomainBuilder.cs:line 52
   at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.BuildStageDomain(UpgradeStage stage) in c:\TeamCity\buildAgent\work\6a5d81309423096e\Xtensive.Storage\Xtensive.Storage\Upgrade\UpgradingDomainBuilder.cs:line 113
   at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.Build(DomainConfiguration configuration) in c:\TeamCity\buildAgent\work\6a5d81309423096e\Xtensive.Storage\Xtensive.Storage\Upgrade\UpgradingDomainBuilder.cs:line 66
   at Xtensive.Storage.Domain.Build(DomainConfiguration configuration) in c:\TeamCity\buildAgent\work\6a5d81309423096e\Xtensive.Storage\Xtensive.Storage\Domain.cs:line 286
   at NNet.Framework.DO.Configuration.DomainBuilder.Build() in D:\Project\NNet-Web\NNet\Framework\DO\Configuration\DomainBuilder.cs:line 15 {UserName}  {SiteName}  5
10/11/2009 18:47:47 Error   General System.Net.Sockets.SocketException: An address incompatible with the requested protocol was used
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.InternalBind(EndPoint localEP)
   at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)
   at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)
   at Npgsql.NpgsqlClosedState.Open(NpgsqlConnector context)    {UserName}  {SiteName}  5

Updated at 11.11.2009 11:43:48

Great thanks for the reply, I had googled before I submitted the request, but missed the solution that you replied with. When I get it working I'll post the solution as other people may have the same problem.

On a separate issue, I am changing from SqlServer 2008 which I used for DO3 to Postgres for DO4 (mainly due to cost) have you done any performance comparisons between Postgres and SQLServer 2008 for DO4.

tony


Updated at 11.11.2009 15:24:31

Thanks I'll give that provider a go.

I did notice two days a go when I was investigating my postgres there was a later version of the provider available then the one bundled with the DO4 install, I tried it but it did not make any difference. I don't know if this version contains your fix.

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked Nov 10 '09 at 19:14

Tony's gravatar image

Tony
53262628


One Answer:

Alex (Xtensive) wrote:

Since the original error is "System.Net.Sockets.SocketException: An address incompatible with the requested protocol was used", I suspect the problem isn't related to DO4. Try to Google it.


Dmitri Maximov (Xtensive) wrote:

Hello Tony,

The problem might be in the following: Windows XP has IPv4 protocol stack only whereas Windows 7 has both IPv4 & IPv6 stacks and it seems that your PostgreSql 8.4 server listens to IPv6 address by default while you are trying to connect to IPv4-based address.

Hope this helps.


Dmitri Maximov (Xtensive) wrote:

  1. Thanks a lot.

  2. As for PostgreSql performance: Our tests show approximately the same performance on MS SQL Server 2005/2008 and on PostgreSQL. The only problem was found is work with batches with large number of parameters. Current version of npgsql provider has inefficient algorithm of parameter handling (linear search algorithm is used). As DataObjects.Net uses batching technology quite intensively, this could potentially lead to serious performance issues.

We had developed the patch for npgsql project with much more efficient algorithm (http://pgfoundry.org/tracker/index.php? ... 0&atid=592) and it was immediately approved but unfortunately updated version of npgsql provider is not released yet.

I'd recommend you to to use the fixed version of npgsql provider, so you can rather download the source code from PgFoundry (http://pgfoundry.org/scm/?group_id=1000140) and build it by yourself or I could send ready to use npgsql assembly by e-mail. But anyway, this fix is highly recommended.


Alex (Xtensive) wrote:

Our tests show approximately the same performance on MS SQL Server 2005/2008 and on PostgreSQL.

More precise info:

  • Tight loop tests with Simplest (like the ones we run @ ORMBattle) show ~ 2 times slower operation for PostgreSQL.

  • Our test sequences pass there with nearly the same time: 3:27 on SQL Server 2008 vs 3:57 on PostgreSQL. So here we have ~ 15% slowdown.

  • PostgreSQL test sequence contains 142 ignored tests out of 1290, but sequence for SQL Server 2008 contains just 97 ignored tests. And likely, some of them are pretty complex (as you see, we have RDBMS-specific tests; e.g. additional tests for SQL Server utilize APPLY, etc.). So likely, this must be extrapolated to additional 5-10%.

  • I attached two screenshots showing how the slowest tests pass on different databases (TeamCity agent is the same).

answered Nov 11 '09 at 04:37

Editor's gravatar image

Editor
46156156157

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×574

Asked: Nov 10 '09 at 19:14

Seen: 6,187 times

Last updated: Nov 10 '09 at 19:14

powered by OSQA