Re: mysql command waiting endlessly (lenny)

2014-09-18 Thread berenger . morel



Le 17.09.2014 18:09, Don Armstrong a écrit :

On Wed, 17 Sep 2014, berenger.mo...@neutralite.org wrote:

Le 17.09.2014 17:33, Don Armstrong a écrit :
In the future, these details would be helpful.

I have said in my first post:

 but when it connect through the mysql program, there is no prompt.
Through the odbc program (isql), it works fine (we fill mysql's 
parameters

with some greps of the odbc's configuration)


This doesn't say whether it was from the same machine, or how odbc 
was

configured.

With hexdump (I must admit I did not used hexdump. Still not very 
used
to that kind of stuff... and anyway I only wanted to know if yes or 
no

the server actually can reply):

  28 00 00 00 0a 33 2e 32  33 2e 34 39 00 5f 2e 03
|(3.23.49._..|
0010  00 7b 3c 57 23 43 6b 71  74 00 2c 20 08 02 00 00  
|.{W#Ckqt.,

|
0020  00 00 00 00 00 00 00 00  00 00 00 00  
||

002c


That only tells you that the server can send packets to your local
machine. It doesn't indicate at all whether you can send to the 
remote

machine.


Unfortunately, I does not have access to this remote machine. Which
does not help, but I am trying to determine if, yes or no, the 
problem

come from the mysql server or from my mysql client.

Considering that we have the same situation on other LANs (I mean, 
we
have a computer that I can access on other LANs where there is a 
mysql

server that we can not administrate too) but the problem can not be
reproduced there. From what I have guessed through netcat and uname,
the LAN where that problem occur is the oldest: kernel 2.6.22 and
mysql server probably at version 3.23.49 (since netcat sends this
number when trying to connect). There is another LAN where the 
kernel

is 2.6.26 and mysql server 3.23.58 (still according to nc and uname)
which is the second oldest, and there things works perfectly. I have
checked the mysql-client's version, and it's the same. Configuration
files relating to isql and mysql are also identical, except about 
the

server's address, but I can't see how it could be the problem.


Talk to whoever administers the server, and have them check the logs.
And they should almost certainly upgrade mysql while they're at it.
Those versions have multiple known remote exploits.


Yes, I think I'll try to contact them. Not sure if they'll care or not, 
but trying never hurts.



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/4c3cf82a4c7a4ab22c3e391cbfb89...@neutralite.org



Re: mysql command waiting endlessly (lenny)

2014-09-17 Thread berenger . morel



Le 16.09.2014 19:46, Don Armstrong a écrit :

On Tue, 16 Sep 2014, berenger.mo...@neutralite.org wrote:
On a old lenny, we have a software which have to connect to a server 
of the
same LAN (we do not have physical access to any stuff, and we can 
only
connect through ssh to that client computer), but when it connect 
through
the mysql program, there is no prompt. Through the odbc program 
(isql), it

works fine (we fill mysql's parameters with some greps of the odbc's
configuration).


[...]

Does someone have any idea about what could be the problem, and/or 
how

to fix it?


The request in TIME_WAIT is almost certainly not your problem. Run 
mysql

under strace, and see precisely where it is failing to connect to the
machine, then check your routing tables and firewall configuration.


Thanks for the hints.
From what I can understand, it seems that the client is waiting 
endlessly for a server's reply, which seems to never come. Strange that 
the server replies when isql is involved... and according to netstat, it 
really uses the same port. (1)
Could it be possible that the server is configured to only accept odbc 
client? But in that case, why would it accept to establish the 
connection, making the client waiting endlessly?
Anyway, it really seems that it's not a problem from our side... 
Hopefully I'll be able to find a solution to not maintain two versions 
of the same program because of that.



Most likely, you've created a configuration where the machine in
question is unable to access 3306.


I do not think so, since the isql command (which uses odbc driver) 
works, and is configured to use port 3306.




You can also telnet 10.6.0.3 3306; (or use nc) from the afflicted
machine to see if it even connects to mysql at all.


I already did some nc on the target: nc 10.6.0.3 -p 3306. It was how I 
guessed the mysql server's version.



1:
Every 1,0s: netstat -np|grep 3306   
  Wed Sep 17 14:20:05 2014


tcp0  0 10.6.0.200:4362210.6.0.3:3306   
TIME_WAIT   -
tcp0  0 10.6.0.200:4362110.6.0.3:3306   
ESTABLISHED 21326/isql
tcp0  0 10.6.0.200:4362010.6.0.3:3306   
ESTABLISHED 21312/mysql



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/e0e548e91a9f162b281d6b0ae724e...@neutralite.org



Re: mysql command waiting endlessly (lenny)

2014-09-17 Thread Don Armstrong
On Wed, 17 Sep 2014, berenger.mo...@neutralite.org wrote:
 Le 16.09.2014 19:46, Don Armstrong a écrit :
 Most likely, you've created a configuration where the machine in
 question is unable to access 3306.
 
 I do not think so, since the isql command (which uses odbc driver)
 works, and is configured to use port 3306.

In the future, these details would be helpful.
 
 You can also telnet 10.6.0.3 3306; (or use nc) from the afflicted
 machine to see if it even connects to mysql at all.
 
 I already did some nc on the target: nc 10.6.0.3 -p 3306. It was how I
 guessed the mysql server's version.

If you are able to successfully use nc from the target machine, and you
can talk to the server, and get a response from it, then it's unlikely
to be the network. [You were able to run nc and get an echo back from
the server, right? You should see something like this:

$ echo asdf|nc localhost 3306|hexdump -C
  54 00 00 00 0a 35 2e 35  2e 33 38 2d 30 2b 77 68  |T5.5.38-0+wh|
0010  65 65 7a 79 31 00 37 03  00 00 49 2e 45 54 55 30  |eezy1.7...I.ETU0|
0020  2c 2d 00 ff f7 08 02 00  0f 80 15 00 00 00 00 00  |,-..|
0030  00 00 00 00 00 3d 2a 57  5b 43 7b 62 58 75 62 6c  |.=*W[C{bXubl|
0040  77 00 6d 79 73 71 6c 5f  6e 61 74 69 76 65 5f 70  |w.mysql_native_p|
0050  61 73 73 77 6f 72 64 00  21 00 00 01 ff 84 04 23  |assword.!..#|
0060  30 38 53 30 31 47 6f 74  20 70 61 63 6b 65 74 73  |08S01Got packets|
0070  20 6f 75 74 20 6f 66 20  6f 72 64 65 72   | out of order|
007d

]

 1:
 Every 1,0s: netstat -np|grep 3306
 Wed Sep 17 14:20:05 2014
 
 tcp0  0 10.6.0.200:4362210.6.0.3:3306
 TIME_WAIT   -
 tcp0  0 10.6.0.200:4362110.6.0.3:3306
 ESTABLISHED 21326/isql
 tcp0  0 10.6.0.200:4362010.6.0.3:3306
 ESTABLISHED 21312/mysql

This shows mysql has an established connection to the remote machine. It
doesn't show at all what the remote machine is doing.

Have you examined the logs on the remote machine?

-- 
Don Armstrong  http://www.donarmstrong.com

I will not make any deals with you. I've resigned. I will not be
pushed, filed, stamped, indexed, briefed, debriefed or numbered. My
life is my own. I resign.
 -- Patrick McGoohan as Number 6 in The Prisoner


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140917153359.gp8...@teltox.donarmstrong.com



Re: mysql command waiting endlessly (lenny)

2014-09-17 Thread berenger . morel



Le 17.09.2014 17:33, Don Armstrong a écrit :

On Wed, 17 Sep 2014, berenger.mo...@neutralite.org wrote:

Le 16.09.2014 19:46, Don Armstrong a écrit :
Most likely, you've created a configuration where the machine in
question is unable to access 3306.

I do not think so, since the isql command (which uses odbc driver)
works, and is configured to use port 3306.


In the future, these details would be helpful.


I have said in my first post:

 but when it connect through the mysql program, there is no prompt. 
Through the odbc program (isql), it works fine (we fill mysql's 
parameters with some greps of the odbc's configuration)





You can also telnet 10.6.0.3 3306; (or use nc) from the afflicted
machine to see if it even connects to mysql at all.

I already did some nc on the target: nc 10.6.0.3 -p 3306. It was how 
I

guessed the mysql server's version.


If you are able to successfully use nc from the target machine, and 
you
can talk to the server, and get a response from it, then it's 
unlikely

to be the network. [You were able to run nc and get an echo back from
the server, right? You should see something like this:

$ echo asdf|nc localhost 3306|hexdump -C
  54 00 00 00 0a 35 2e 35  2e 33 38 2d 30 2b 77 68
|T5.5.38-0+wh|
0010  65 65 7a 79 31 00 37 03  00 00 49 2e 45 54 55 30
|eezy1.7...I.ETU0|
0020  2c 2d 00 ff f7 08 02 00  0f 80 15 00 00 00 00 00
|,-..|
0030  00 00 00 00 00 3d 2a 57  5b 43 7b 62 58 75 62 6c
|.=*W[C{bXubl|
0040  77 00 6d 79 73 71 6c 5f  6e 61 74 69 76 65 5f 70
|w.mysql_native_p|
0050  61 73 73 77 6f 72 64 00  21 00 00 01 ff 84 04 23
|assword.!..#|
0060  30 38 53 30 31 47 6f 74  20 70 61 63 6b 65 74 73  |08S01Got
packets|
0070  20 6f 75 74 20 6f 66 20  6f 72 64 65 72   | out of 
order|

007d

]



With hexdump (I must admit I did not used hexdump. Still not very used 
to that kind of stuff... and anyway I only wanted to know if yes or no 
the server actually can reply):


  28 00 00 00 0a 33 2e 32  33 2e 34 39 00 5f 2e 03  
|(3.23.49._..|
0010  00 7b 3c 57 23 43 6b 71  74 00 2c 20 08 02 00 00  
|.{W#Ckqt., |
0020  00 00 00 00 00 00 00 00  00 00 00 00  
||

002c


1:
Every 1,0s: netstat -np|grep 3306
Wed Sep 17 14:20:05 2014

tcp0  0 10.6.0.200:4362210.6.0.3:3306
TIME_WAIT   -
tcp0  0 10.6.0.200:4362110.6.0.3:3306
ESTABLISHED 21326/isql
tcp0  0 10.6.0.200:4362010.6.0.3:3306
ESTABLISHED 21312/mysql


This shows mysql has an established connection to the remote machine. 
It

doesn't show at all what the remote machine is doing.

Have you examined the logs on the remote machine?


Unfortunately, I does not have access to this remote machine. Which 
does not help, but I am trying to determine if, yes or no, the problem 
come from the mysql server or from my mysql client.


Considering that we have the same situation on other LANs (I mean, we 
have a computer that I can access on other LANs where there is a mysql 
server that we can not administrate too) but the problem can not be 
reproduced there.
From what I have guessed through netcat and uname, the LAN where that 
problem occur is the oldest: kernel 2.6.22 and mysql server probably at 
version 3.23.49 (since netcat sends this number when trying to connect). 
There is another LAN where the kernel is 2.6.26 and mysql server 3.23.58 
(still according to nc and uname) which is the second oldest, and there 
things works perfectly. I have checked the mysql-client's version, and 
it's the same. Configuration files relating to isql and mysql are also 
identical, except about the server's address, but I can't see how it 
could be the problem.


Thanks for help.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/e52ab0c281a3abffb54638d06493e...@neutralite.org



Re: mysql command waiting endlessly (lenny)

2014-09-17 Thread Don Armstrong
On Wed, 17 Sep 2014, berenger.mo...@neutralite.org wrote:
 Le 17.09.2014 17:33, Don Armstrong a écrit :
 In the future, these details would be helpful.
 
 I have said in my first post:
 
  but when it connect through the mysql program, there is no prompt.
 Through the odbc program (isql), it works fine (we fill mysql's parameters
 with some greps of the odbc's configuration)

This doesn't say whether it was from the same machine, or how odbc was
configured.
 
 With hexdump (I must admit I did not used hexdump. Still not very used
 to that kind of stuff... and anyway I only wanted to know if yes or no
 the server actually can reply):
 
   28 00 00 00 0a 33 2e 32  33 2e 34 39 00 5f 2e 03
 |(3.23.49._..|
 0010  00 7b 3c 57 23 43 6b 71  74 00 2c 20 08 02 00 00  |.{W#Ckqt.,
 |
 0020  00 00 00 00 00 00 00 00  00 00 00 00  ||
 002c

That only tells you that the server can send packets to your local
machine. It doesn't indicate at all whether you can send to the remote
machine.
 
 Unfortunately, I does not have access to this remote machine. Which
 does not help, but I am trying to determine if, yes or no, the problem
 come from the mysql server or from my mysql client.

 Considering that we have the same situation on other LANs (I mean, we
 have a computer that I can access on other LANs where there is a mysql
 server that we can not administrate too) but the problem can not be
 reproduced there. From what I have guessed through netcat and uname,
 the LAN where that problem occur is the oldest: kernel 2.6.22 and
 mysql server probably at version 3.23.49 (since netcat sends this
 number when trying to connect). There is another LAN where the kernel
 is 2.6.26 and mysql server 3.23.58 (still according to nc and uname)
 which is the second oldest, and there things works perfectly. I have
 checked the mysql-client's version, and it's the same. Configuration
 files relating to isql and mysql are also identical, except about the
 server's address, but I can't see how it could be the problem.

Talk to whoever administers the server, and have them check the logs.
And they should almost certainly upgrade mysql while they're at it.
Those versions have multiple known remote exploits.

-- 
Don Armstrong  http://www.donarmstrong.com

Grimble left his mother in the food store and went to the launderette
and watched the clothes go round. It was a bit like color television
only with less plot.
 -- Clement Freud _Grimble_


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140917160951.gr8...@teltox.donarmstrong.com



mysql command waiting endlessly (lenny)

2014-09-16 Thread berenger . morel

Hello.

On a old lenny, we have a software which have to connect to a server of 
the same LAN (we do not have physical access to any stuff, and we can 
only connect through ssh to that client computer), but when it connect 
through the mysql program, there is no prompt. Through the odbc program 
(isql), it works fine (we fill mysql's parameters with some greps of the 
odbc's configuration).
On other computers (on other LANs, those computers are in there to 
sniff packets and extract some informations to fill some of our DBs), 
the same setup works perfectly with both tools.


In my tries to fix this problem, I have noticed that there is a 
connection in TIME_WAIT state, which does not have any parent process, 
and which never dies. I suspect that this is the cause of the mysql's 
problem, and I would like to try to manually close it, but can't figure 
how.
I have found several informations across the web, but they does not 
work, the kernel is probably too old: 2.6.22. Other computers which 
works are at least running a 2.6.24.


Another distinction between the problematic computer and those which 
works seems to be the mysql server's version: if I am now wrong (I 
guessed the numbers with a netcat connection), the server is also the 
oldest of our collection: 3.23.49, but I doubt it may be the cause: 
there is another box asking to a 3.23.58.


Does someone have any idea about what could be the problem, and/or how 
to fix it?


1:
# netstat -antp|grep TIME
tcp0  0 10.6.0.200:5378610.6.0.3:3306   
TIME_WAIT   -



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: 
https://lists.debian.org/1d5052243b26c4464edf0945a0a5a...@neutralite.org



Re: mysql command waiting endlessly (lenny)

2014-09-16 Thread Chris Bannister
On Tue, Sep 16, 2014 at 04:08:23PM +0200, berenger.mo...@neutralite.org wrote:
 Hello.

Hi,

[...]

 Does someone have any idea about what could be the problem, and/or how to
 fix it?

I suggest you'd be better off asking on a mysql support list, but be
prepared to be flamed for not providing enough technical information.

-- 
If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the 
oppressing. --- Malcolm X


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140916144722.GA31492@tal



Re: mysql command waiting endlessly (lenny)

2014-09-16 Thread Don Armstrong
On Tue, 16 Sep 2014, berenger.mo...@neutralite.org wrote:
 On a old lenny, we have a software which have to connect to a server of the
 same LAN (we do not have physical access to any stuff, and we can only
 connect through ssh to that client computer), but when it connect through
 the mysql program, there is no prompt. Through the odbc program (isql), it
 works fine (we fill mysql's parameters with some greps of the odbc's
 configuration).

[...]

 Does someone have any idea about what could be the problem, and/or how
 to fix it?

The request in TIME_WAIT is almost certainly not your problem. Run mysql
under strace, and see precisely where it is failing to connect to the
machine, then check your routing tables and firewall configuration.

Most likely, you've created a configuration where the machine in
question is unable to access 3306.

You can also telnet 10.6.0.3 3306; (or use nc) from the afflicted
machine to see if it even connects to mysql at all.

-- 
Don Armstrong  http://www.donarmstrong.com

Do you need [...] [t]ools? Stuff?
Our opponent is an alien starship packed with atomic bombs. [...] We
have a protractor.
 -- Neal Stephenson _Anathem_ p320


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140916174615.ga7...@rzlab.ucr.edu