Containers cannot connect to SQL Server, or any other service on the NAS

Post Reply
therealcgspeck
New here
Posts: 3
Joined: Tue Jan 31, 2017 9:45 am

Containers cannot connect to SQL Server, or any other service on the NAS

Post by therealcgspeck »

Hi all,

I am the owner of a brand new TS-653A. My NAS has a LAN IP address of 192.168.1.60.

I have enabled the NAS' SQL Server and allowed TCP Connections. Local connections work:

Code: Select all

[~] # /mnt/ext/opt/mariadb/bin/mysql -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.51-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.01 sec)

MariaDB [(none)]> \q
Bye
[~] # 
Remote connections work:

Code: Select all

[chris@tripparch admin-scripts] D: $ mysql -h 192.168.1.60 -u chris -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 5.5.51-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]>
Connections from docker containers (running on the NAS) to the SQL Server (on the NAS) don't work:

Code: Select all

# docker run --rm -it mariadb:10.1 bash
root@e9869d484f87:/# mysql -h 192.168.1.60
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.60' (110 "Connection timed out")
root@e9869d484f87:/# 
Attempts to connect to the NAS' web server also time out:

Code: Select all

root@e9869d484f87:/# curl -v 192.168.1.60:80
* Rebuilt URL to: 192.168.1.60:80/
* Hostname was NOT found in DNS cache
*   Trying 192.168.1.60...
* connect to 192.168.1.60 port 80 failed: Connection timed out
* Failed to connect to 192.168.1.60 port 80: Connection timed out
* Closing connection 0
curl: (7) Failed to connect to 192.168.1.60 port 80: Connection timed out
root@e9869d484f87:/# 
The traceroutes are strange too - the container can get to my router and external sites, but not to the NAS.

Code: Select all

# router
root@e9869d484f87:/# traceroute 192.168.1.1 
traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 60 byte packets
 1  10.0.3.1 (10.0.3.1)  0.106 ms  0.041 ms  0.036 ms
 2  192.168.1.1 (192.168.1.1)  0.444 ms  0.474 ms  0.558 ms
 
 #nas
root@e9869d484f87:/# traceroute 192.168.1.60
traceroute to 192.168.1.60 (192.168.1.60), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 3  * * *
 6  *^C
 
 #external site
root@e9869d484f87:/# traceroute www.abc.net.au
traceroute to www.abc.net.au (23.62.231.115), 30 hops max, 60 byte packets
 1  10.0.3.1 (10.0.3.1)  0.067 ms  0.036 ms  0.035 ms
 2  192.168.1.1 (192.168.1.1)  0.378 ms  0.332 ms  0.404 ms
 3  10.97.0.1 (10.97.0.1)  11.718 ms  11.688 ms  11.657 ms
 4  * * *
 5  210.49.108.66 (210.49.108.66)  12.602 ms  12.569 ms  12.539 ms
 6  198.142.144.50 (198.142.144.50)  15.664 ms  22.942 ms  22.862 ms
 7  a23-62-231-115.deploy.static.akamaitechnologies.com (23.62.231.115)  17.149 ms  17.118 ms  17.056 ms
root@e9869d484f87:/# 
The routes on the container look like this:

Code: Select all

root@e9869d484f87:/# routel
         target            gateway          source    proto    scope    dev tbl
        default           10.0.3.1                                     eth0 
      10.0.3.0/ 24                        10.0.3.8   kernel     link   eth0 
       10.0.3.0          broadcast        10.0.3.8   kernel     link   eth0 local
       10.0.3.8              local        10.0.3.8   kernel     host   eth0 local
     10.0.3.255          broadcast        10.0.3.8   kernel     link   eth0 local
      127.0.0.0          broadcast       127.0.0.1   kernel     link     lo local
     127.0.0.0/ 8            local       127.0.0.1   kernel     host     lo local
      127.0.0.1              local       127.0.0.1   kernel     host     lo local
127.255.255.255          broadcast       127.0.0.1   kernel     link     lo local
root@e9869d484f87:/#
Is anyone able to provide some help? Thanks.
stphngrtz
New here
Posts: 3
Joined: Tue Sep 19, 2017 3:32 pm

Re: Containers cannot connect to SQL Server, or any other service on the NAS

Post by stphngrtz »

Any updates on this? I'm having the same issue :/
Post Reply

Return to “Container Station”