Unable to connect through mapd-connector

I created a setup on AWS using OmniSciDB (Open Source) from AWS market place. I am trying toconnect to the OmniSciDB using mapd-connector by followed the example provided in the github repo but did not succeeded. I have few questions as below.

  1. Is there any other example or doc available for mapd-connector
  2. What will be the default port number
  • While connecting through 6273 port number I am getting below error
    Error: connect ECONNREFUSED 54.87.184.253:6273
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
    errno: ‘ECONNREFUSED’,
    code: ‘ECONNREFUSED’,
    syscall: ‘connect’,
    address: ‘x.x.x.x’,
    port: 6273
    }

  • While connecting through 6274 port number I am not getting any response

Hi @Ranjan653, 6273 is the port the OmniSci Webserver uses, which is in the Enterprise Edition only I believe. 6274 is the binary protocol port so connector won’t be able to use it - it needs to use HTTP which the host should be listening for on port 6278, so give that a try?
JP

Hi @Ranjan653,

Welcome to the community forum.

To check out which ports the server is listening on and to being more confident while trying what @jpharvey suggested, you can try this simple command.

netstat -tulpn

on my notebook that started just omniscidb OS Edition I have the following output

candido@zion-legion:~/github/build$ netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:31487           0.0.0.0:*               LISTEN      25237/java          
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      803/systemd-resolve 
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      28742/cupsd         
tcp        0      0 127.0.0.1:3000          0.0.0.0:*               LISTEN      1066/nghttpx        
tcp        0      0 0.0.0.0:43321           0.0.0.0:*               LISTEN      25237/java          
tcp6       0      0 :::6274                 :::*                    LISTEN      24760/./bin/omnisci **
tcp6       0      0 :::6278                 :::*                    LISTEN      24760/./bin/omnisci **
tcp6       0      0 :::6279                 :::*                    LISTEN      24768/-Xmx1024m**     
tcp6       0      0 ::1:631                 :::*                    LISTEN      28742/cupsd         
udp        0      0 127.0.0.53:53           0.0.0.0:*                           803/systemd-resolve 
udp        0      0 0.0.0.0:68              0.0.0.0:*                           9688/dhclient       
udp        0      0 0.0.0.0:631             0.0.0.0:*                           28743/cups-browsed  
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           17844/avahi-daemon: 
udp        0      0 0.0.0.0:44918           0.0.0.0:*                           17844/avahi-daemon: 
udp6       0      0 :::35639                :::*                                17844/avahi-daemon: 
udp6       0      0 :::5353                 :::*                                17844/avahi-daemon: 
Active Internet connections (only servers)

As you can see, we have three ports were OmnisciDb is listening.

tcp6       0      0 :::6274                 :::*                    LISTEN      24760/./bin/omnisci **
tcp6       0      0 :::6278                 :::*                    LISTEN      24760/./bin/omnisci **
tcp6       0      0 :::6279                 :::*                    LISTEN      24768/-Xmx1024m**     

The first one is the binary port, the second one is the HTTP port (the one you should connect to while using mapd-connector), and the third one is the Calcite server spawned by the omnisci database.

SO if you having troubles while trying what JP suggested and you are connecting from a remote machine, try to open the 6278 and 6274 Ports from the AWS Console (you can use the 6274 port whiile using other connects like Python and Jdbc one) and retry

1 Like