Author Topic: Could not connect to server.net at port 143: Connection timed out  (Read 6207 times)

Offline harrisc

  • Newbie
  • *
  • Posts: 8
Hi

I just did a new install of rc1. I now get an error
Could not connect to server.net at port 143: Connection timed out

I can telnet to port 143 OK
I tried changing loacalhost in db.inc.php to server.net and ip address. Then I get a massage
DB Error in /home/ehme/public_html/mail/program/include/rcube_db.inc (105): DB Error: connect failed
DATABASE ERROR: CONNECTION

Hence I assume that I can connect to the database.
At the moment I have no records in the database.

I have installed Rouncube on another server and all works!

Any ideas?

Chris

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Could not connect to server.net at port 143: Connection timed out
« Reply #1 on: June 05, 2007, 09:54:27 PM »
Go in to your main.inc.php and go to where it says $rcmail_config['debug_level'] = 1; change 1 to 8. Then do you get an error?

Offline harrisc

  • Newbie
  • *
  • Posts: 8
Re: Could not connect to server.net at port 143: Connection timed out
« Reply #2 on: June 07, 2007, 12:40:31 AM »
With debug level set at 8, the console window was shown, but nothing in it. There was the normal text that login failed.


With debug level set at 4, the message was
IMAP Error: Could not connect to mail.internode.on.net at port 143: Connection timed out
There was the normal text that login failed.

Still no further advanced!

Chris
.

Offline harrisc

  • Newbie
  • *
  • Posts: 8
Re: Could not connect to server.net at port 143: Connection timed out
« Reply #3 on: June 09, 2007, 12:49:40 AM »
Has anyone any ideas what I have done?

Offline xprex

  • Newbie
  • *
  • Posts: 2
Re: Could not connect to server.net at port 143: Connection timed out
« Reply #4 on: June 09, 2007, 04:01:52 AM »
Hi harrisc,

I'm facing a somehow similar situation and what I did in order to be able to login is NOT recommended because it could represent a security threat. I wrote a post to seek for help but no reply until now.

The only way I can connect is by creating an user in MySql with a blank password. So in the db.inc.php on line 21 I have:

$rcmail_config['db_dsnw'] = 'mysql://UserWithBlankPassword:@localhost/roundcube';

Don't know if this will help you. Good luck!



Offline harrisc

  • Newbie
  • *
  • Posts: 8
Re: Could not connect to server.net at port 143: Connection timed out
« Reply #5 on: June 09, 2007, 08:36:17 PM »
Thanks for the reply.

As the database users are managed though Cpanel, I cannot create a database user with a blank password. I do not how to get around this.

Chris

Offline craigmoore

  • Newbie
  • *
  • Posts: 6
Re: Could not connect to server.net at port 143: Connection timed out
« Reply #6 on: June 11, 2007, 09:55:40 AM »
Can you show the output of netstat -tap?

For example:

Code: [Select]
[root@xxx postfix]# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address        Foreign Address       State    PID/Program name
tcp    0   0 *:32769           *:*             LISTEN   1734/rpc.statd
tcp    0   0 *:mysql           *:*             LISTEN   2176/mysqld
tcp    0   0 *:sunrpc          *:*             LISTEN   1716/portmap
tcp    0   0 *:81            *:*             LISTEN   2515/ispconfig_http
tcp    0   0 xxx.xxx.xxx:domain     *:*             LISTEN   2638/named
tcp    0   0 192.168.1.101:domain    *:*             LISTEN   2638/named
tcp    0   0 192.168.0.100:domain    *:*             LISTEN   2638/named
tcp    0   0 localhost.localdomai:domain *:*             LISTEN   2638/named
tcp    0   0 localhost.localdomain:ipp  *:*             LISTEN   2042/cupsd
tcp    0   0 localhost.localdomain:5335 *:*             LISTEN   2024/mDNSResponder
tcp    0   0 *:smtp           *:*             LISTEN   7655/master
tcp    0   0 localhost.localdomain:rndc *:*             LISTEN   2638/named
tcp    0   0 *:imaps           *:*             LISTEN   3413/dovecot
tcp    0   0 *:pop3s           *:*             LISTEN   3413/dovecot
tcp    0   0 *:pop3           *:*             LISTEN   3413/dovecot
tcp    0   0 *:imap           *:*             LISTEN   3413/dovecot
tcp    0   0 *:http           *:*             LISTEN   2538/httpd
tcp    0   0 *:ftp            *:*             LISTEN   2654/proftpd: (acce
tcp    0   0 *:ssh            *:*             LISTEN   2072/sshd
tcp    0   0 ::1:rndc          *:*             LISTEN   2638/named
tcp    0   0 *:https           *:*             LISTEN   2538/httpd
tcp    0  148 xxx.xxx.xxx:ssh       ::ffff:192.168.1.2:1407   ESTABLISHED 3029/0

This will show what services/ports are running on your sever. This should help you identify that your server has mySQL active. Finally, if you really want to verify that your sql database is configured correctly, then you can log into mysql and check by typing:

Code: [Select]
mysql -h localhost -u roundcube -p
Enter password: *Enter password for roundcube user here*
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 4.1.20

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW DATABASES;
+---------------+
| Database   |
+---------------+
| roundcubemail |
| test     |
+---------------+
2 rows in set (0.00 sec)

mysql> USE roundcubemail;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SHOW TABLES;
+-------------------------+
| Tables_in_roundcubemail |
+-------------------------+
| cache          |
| contacts        |
| identities       |
| messages        |
| session         |
| users          |
+-------------------------+
6 rows in set (0.01 sec)

mysql> exit;

Remember that the password you enter is the same one shown in your db.inc.php file on the line that reads:

Code: [Select]
$rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';
If you configured your database as described in the INSTALL file that came with the source code, then everything should check out when you attempt to access your database from the command line. Otherwise, you should reconfigure mysql by following the INSTALL file again.

Good Luck,
Craig.

Offline harrisc

  • Newbie
  • *
  • Posts: 8
Re: Could not connect to server.net at port 143: Connection timed out
« Reply #7 on: June 12, 2007, 06:08:36 PM »
At this stage I do not have shell access. I am arranging this and then I will be able to check as you suggested.

I just remembered that to get Roundcube to run at all I had to remove .htaccess in the Roundcube root. Could this be part of the problem?

Chris

Offline craigmoore

  • Newbie
  • *
  • Posts: 6
Re: Could not connect to server.net at port 143: Connection timed out
« Reply #8 on: June 16, 2007, 10:00:14 AM »
If you do not have Shell access, then how were you able to configure the mySQL database?

I don't believe that the .htaccess file should not be a problem. However, better safe than sorry. Try removing it and seeing if it helps...

Craig

Offline harrisc

  • Newbie
  • *
  • Posts: 8
Re: Could not connect to server.net at port 143: Connection timed out
« Reply #9 on: June 19, 2007, 06:54:33 AM »
I finally got shell access. Everything seem ok. Here are the screen dumps of the command results

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address        Foreign Address       State    PID/Program name
tcp    0   0 *:2082           *:*             LISTEN   -
tcp    0   0 *:2083           *:*             LISTEN   -
tcp    0   0 *:2086           *:*             LISTEN   -
tcp    0   0 *:2087           *:*             LISTEN   -
tcp    0   0 *:smux           *:*             LISTEN   -
tcp    0   0 *:mysql           *:*             LISTEN   -
tcp    0   0 *:submission        *:*             LISTEN   -
tcp    0   0 localhost:783        *:*             LISTEN   -
tcp    0   0 *:2095           *:*             LISTEN   -
tcp    0   0 *:2096           *:*             LISTEN   -
tcp    0   0 *:http           *:*             LISTEN   -
tcp    0   0 koala.cbr.hosting-serv:http 58.185.146.68:23671     SYN_RECV  -
tcp    0   0 *:smtps           *:*             LISTEN   -
tcp    0   0 koala.cbr.hosting-se:domain *:*             LISTEN   -
tcp    .................


mysql> SHOW DATABASES;
+--------------------+
| Database      |
+--------------------+
| information_schema |
| ehme_roundcube   |
| ehme_roundcubemail |
+--------------------+
3 rows in set (0.02 sec)

(I setup 2 databses and 2 corresponding installs of Roundcube to check everthing)

mysql> SHOW TABLES;
+------------------------------+
| Tables_in_ehme_roundcubemail |
+------------------------------+
| cache            |
| contacts           |
| identities          |
| messages           |
| session           |
| users            |
+------------------------------+
6 rows in set (0.00 sec)


I have double checked the db.inc.php file

Still no luck!

Chris