Joinutility seperatorLogin utility separator Infobright.com
   
 
Issues when connecting from remote host
Posted: 26 October 2011 10:38 AM   Ignore ]  
Newbie
Rank
Total Posts:  7
Joined  2011-10-26

I’ve set up infobright 4.0.4 on my box, and I’m having issues connecting from the remote boxes.

I’ve added the user like this:

GRANT ALL PRIVILEGES ON *.* TO ‘test’@’%’ IDENTIFIED BY ‘test123’;

I know this is foolish grant, but I’ve limited it to IP earlier too, still the same issue.

Now, I did flush privileges, just to make sure.

infobright is running on default port 5029. When I try connecting from localhost, it works ok:

root@testbox:/usr/local/infobright# telnet localhost 5029
Trying ::1…
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
4 5.1.40<and-then-handshake-garbage>

But, when I try to connect from the remote machine, connection closes instantly:

monitor:~# telnet testbox 5029
Trying 192.168.10.21…
Connected to testbox.
Escape character is ‘^]’.
Connection closed by foreign host.
monitor:~#

Is there anything else I need to set up to allow remote connections? From this it looks like infobright is listening on 5029, but it rejected connections.

There is no firewall in place. Also, when I shut down infobright, and then issue `nc -l -p 5029`, I can telnet to that port with no issues.

This is all being set up on Linux, Debian Stable.

Profile
 
Posted: 26 October 2011 11:08 AM   Ignore ]   [ # 1 ]  
Administrator
RankRankRankRank
Total Posts:  448
Joined  2010-09-22

Hi imarioa,

I assume you also did as well: CREATE USER ‘test’@’%’ IDENTIFIED BY ‘test123’;

I get the same behavior when I try to telnet into Infobright from a remote host.  I’m not quite concerned about that.

Can you provide the error you get when you try to connect with your tool (I assume you’re using Toad, MySQL Command Line, etc.)?

Thanks,

Jeff

Signature 

jeff kibler

Profile
 
Posted: 26 October 2011 11:47 AM   Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  7
Joined  2011-10-26

I assumed that ‘GRANT ALL PRIVILEGES’ implies CREATE USER, as it does on Mysql.

Still, I droped the user I create with ‘GRANT’, then created it as per your suggestion, and still can’t connect. I should have mysql handshake garbage when trying to telnet to 5029 from remote box, as I have when trying to connect from localhost.

Here is the error I get when trying to connect with mysql command line tool:

monitor:~# mysql -u test -h testbox test -p123 -P5029
ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0
monitor:~#

Profile
 
Posted: 26 October 2011 12:56 PM   Ignore ]   [ # 3 ]  
Administrator
RankRankRank
Total Posts:  139
Joined  2008-08-18

Hi imarioa, 
 
This may be a system related issue. It might be a glibc library incompatibility issue.

What is the glibc version in your system? Run the following command and attach the output:

cd /lib
./libc.so.6

regards,
Kethees.

Profile
 
Posted: 26 October 2011 01:13 PM   Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  7
Joined  2011-10-26

This is on the box running infobright:

root@testbox:/lib# ./libc.so.6
GNU C Library (Debian EGLIBC 2.11.2-10) stable release version 2.11.2, by Roland McGrath et al.
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.4.5.
Compiled on a Linux 2.6.32 system on 2011-01-23.
Available extensions:
  crypt add-on version 2.1 by Michael Glad and others
  GNU Libidn by Simon Josefsson
  Native POSIX Threads Library by Ulrich Drepper et al
  BIND-8.2.3-T5B
For bug reporting instructions, please see:
<http://www.debian.org/Bugs>.


And this is from the host connecting to the testbox:

monitor:/lib# ./libc.so.6
GNU C Library stable release version 2.7, by Roland McGrath et al.
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.3.2.
Compiled on a Linux >>2.6.32-5-amd64<< system on 2011-01-07.
Available extensions:
  crypt add-on version 2.1 by Michael Glad and others
  GNU Libidn by Simon Josefsson
  Native POSIX Threads Library by Ulrich Drepper et al
  BIND-8.2.3-T5B
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

Profile
 
Posted: 26 October 2011 02:41 PM   Ignore ]   [ # 5 ]  
Member
RankRankRank
Total Posts:  223
Joined  2008-08-18

Hi imarioa

Did some quick search in web and I am thinking

- You may verify /etc/hosts.deny /etc/hosts.allow files.
- Check /etc/my-ib.cnf file for skip-networking. Comment out that is it was uncommented.
- May also look at bind-address option in the my-ib.cnf file.

http://stackoverflow.com/questions/961928/could-not-connect-lost-connection-to-mysql-server-at-reading-initial-communica
http://benrobb.com/2007/01/15/howto-remote-root-access-to-mysql/
http://forums.mysql.com/read.php?52,166244,245403#msg-245403

Thanks

[ Edited: 26 October 2011 02:44 PM by Mahib]
Signature 

Mahib

Profile
 
Posted: 27 October 2011 10:52 AM   Ignore ]   [ # 6 ]  
Newbie
Rank
Total Posts:  7
Joined  2011-10-26

I have networking enabled, because I can connect to localhost:

root@testbox:~# telnet localhost 5029
Trying ::1…
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
4 5.1.40M”\-iK{J/=3&fP;<{wdo$`

But, when I try to connect to the IP of the box, infobright closes the connection instantly:

root@testbox:~# telnet 192.168.10.21 5029
Trying 192.168.10.21…
Connected to 192.168.10.21.
Escape character is ‘^]’.
Connection closed by foreign host.

So, connection IS established, but infobright kicks me out. When I shut down infobright, I can’t connect:

root@testbox:~# /etc/init.d/mysqld-ib stop
Shutting down MySQL
..
root@testbox:~# telnet 192.168.10.21 5029
Trying 192.168.10.21…
telnet: Unable to connect to remote host: Connection refused

Here are the options in my my-ib.cnf file:
root@testbox:~# grep skip /etc/my-ib.cnf
skip-locking
#skip-networking

root@textbox:~# grep bind /etc/my-ib.cnf
bind-address=0.0.0.0

Even if I set ‘bind-addres=192.168.10.21’, i still can’t connect to it.

When I remove comment from ‘skip-newrking’, I can’t connect to infobright (I get ‘connection refused’). But, without skip-networking I do get connected, but infobright closes the connection on me instantly.

I will try donwloading lower version, this surely sounds like a bug.

I do have a mysql on that box too, listening on 3306, and it is working fine, allowing connections from remote hosts.

Profile
 
Posted: 27 October 2011 01:40 PM   Ignore ]   [ # 7 ]  
Member
RankRankRank
Total Posts:  223
Joined  2008-08-18

What is the mysql client version in the remote machine? Infobright is built with mysql 5.1.40. So if mysql client version is different in the remote machine then try the client that is provided with infobright.

Signature 

Mahib

Profile
 
Posted: 31 October 2011 09:57 AM   Ignore ]   [ # 8 ]  
Member
RankRankRank
Total Posts:  223
Joined  2008-08-18

Hi imarioa

Any luck with the remote connection problem?  I tried with bind-address to 0.0.0.0 and My local ip, both worked for remote connection. Only thing I suspect is the possibility of mysql client version mismatch in the remote machine.

However let us know if the issue is resolved, if so then how. What is the mysql version your are using?

[ Edited: 31 October 2011 10:04 AM by Mahib]
Signature 

Mahib

Profile
 
Posted: 03 November 2011 02:48 PM   Ignore ]   [ # 9 ]  
Newbie
Rank
Total Posts:  7
Joined  2011-10-26

I am still having issues with connecting.

This is all from the host where I have infobright installed:

root@testbox:~# mysql-ib -h localhost
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.40 build number (revision)=IB_4.0.4_r14484_14560(iee - commercial) (static)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql>


But, when I try to connect to localhost IP, here is what I get:

root@ded784:~# mysql-ib -h 192.168.10.21
ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0


As I’ve explained earlier, I can telnet to localhost:5021, and I get mysql-handshake. When I try to telnet to 192.167.10.21:5029 i get nothing - i get connected, and disconnected:

root@ded784:~# telnet 192.168.10.21 5029
Trying 192.168.10.21…
Connected to 192.168.10.21.
Escape character is ‘^]’.
Connection closed by foreign host.

Profile
 
Posted: 03 November 2011 03:00 PM   Ignore ]   [ # 10 ]  
Newbie
Rank
Total Posts:  7
Joined  2011-10-26

A coworker of mine pointed out this:

http://www.infobright.org/forums/viewthread/2003/#7910

Adding those two options to .cnf file is a working workaround for the issue.

Profile
 
Posted: 03 November 2011 03:49 PM   Ignore ]   [ # 11 ]  
Administrator
RankRankRankRank
Total Posts:  448
Joined  2010-09-22

Hi imarioa,

To confirm, your work-around was simply adding to your my-ib.cfg:

skip-host-cache
skip-name-resolve

Is that correct?

Thanks,

Jeff

Signature 

jeff kibler

Profile
 
Posted: 03 November 2011 05:06 PM   Ignore ]   [ # 12 ]  
Newbie
Rank
Total Posts:  7
Joined  2011-10-26

True.

Profile