[Mono-aspnet-list] trouble with mysql driver on mono

James Smith james.smith at aleph-one.com
Wed May 12 04:00:51 EDT 2010


Good morning,

 

I'm forwarding the email below to this list as I think it confirms that my
ASP.NET web application is having difficulty connecting to MySQL via sockets
on Ubuntu. The original email contained the complete trace but triggered the
40K limit so I'm including only the pertinent lines here.

 

Any help would be appreciated!

 

Kind regards,

 

James

 

  _____  

From: James Smith [mailto:james.smith at aleph-one.com] 
Sent: 09 May 2010 19:23
To: 'Support for the unixODBC project'
Subject: RE: [unixODBC-support] trouble with mysql driver on mono

 

Good evening Nick,

 

I posted this as an HTML email to make it easier to read, I hope this is
okay.

 

I realised (after reading the documentation on strace, funny that) that I
could attach it to an existing process and therefore I was able to get some
useful information straight away. It appears to me that after trying to find
the odbc.ini file in the web application root directory, mono does indeed
manage to locate it in the /etc/ directory:

 

[pid  3060] 18:06:49.156800 open("/etc/odbc.ini", O_RDONLY) = 9

[pid  3060] 18:06:49.156898 fstat(9, {st_mode=S_IFREG|0644, st_size=465,
...}) = 0

[pid  3060] 18:06:49.157042 mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa1f04f1000

[pid  3060] 18:06:49.157168 read(9, "\n[MySQL]\nDescription         = M"...,
4096) = 465

 

The problem is not with the configuration, therefore, but appears to be that
mono cannot open a socket to MySQL:

 

[pid  3060] 18:06:49.158096 connect(9, {sa_family=AF_FILE,
path="/var/run/mysqld/mysqld.sock"}, 110) = 0

[pid  3060] 18:06:49.158292 setsockopt(9, SOL_SOCKET, SO_RCVTIMEO,
"\2003\341\1\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0

[pid  3060] 18:06:49.158554 setsockopt(9, SOL_SOCKET, SO_SNDTIMEO,
"\2003\341\1\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0

[pid  3060] 18:06:49.158989 setsockopt(9, SOL_IP, IP_TOS, [8], 4) = -1
EOPNOTSUPP (Operation not supported)

[pid  3060] 18:06:49.159139 setsockopt(9, SOL_SOCKET, SO_KEEPALIVE, [1], 4)
= 0

 

This is my interpretation, anyway. We do know that the connection fails, at
least.

 

Thanks again for your time.

 

Kind regards,

 

James

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20100512/51663b7d/attachment.html 


More information about the Mono-aspnet-list mailing list