Failed to reach erlang port mapper (server ports open and connecting via Telnet) - azure

I am trying to add a new server to an existing cluster. I am using community version 2.1.1 on both ubuntu servers on windows azure. I tried to add new server via web interface and via command line. But i am getting following error.
***"Failed to reach erlang port mapper. Timeout connecting to "xx.xx.xx.xx" on port "4369". This could be due to an incorrect host/port combination or a firewall in place between the servers.']***
Port 4369 is open on both servers and iam able to connect to 4369 port on other server using telnet
Got the same error when used the following command.
/opt/couchbase/bin/couchbase-cli server-add --cluster=xx.xx.xx.xx:8091 -u user -p password --server-add=yy.yy.yy.yy:8091 --server-add-username=Administrator --server-add-password=password
ERROR: unable to server-add yy.yy.yy.yy:8091 (400) Bad Request
[u'Prepare join failed. Failed to reach erlang port mapper. Timeout connecting to "xx.xx.xx.xx" on port "4369". This could be due to an incorrect host/port combination or a firewall in place between the servers.']
root#xx.xx.xx.xx:/home/azureuser/project# telnet yy.yy.yy.yy 4369
Trying yy.yy.yy.yy...
Connected to yy.yy.yy.yy.
Escape character is '^]'.
^]q
telnet> q
Connection closed.
What will be the issue? Please help me sort this out.

There are a number of ports required to be open between cluster nodes (in addition to 4369) - I'd suggest ensuring all of the ports listed in the Couchbase Installation Guide - Network ports are open and accessible.

Related

Connect to remote Azure Linux machine through ssh Visual Studio Code

I want to connect to an Azure machine on which is installed an Ubuntu distribution.
I can connect or through ssh or, by installing some other software, by using X2Go.
However, I don't need the UI and if it's possible I would like to use Visual Studio Code.
On this last I've installed the ssh component and I've already used it to connect to other machines.
Unfortunately I'm not able to connect to the Azure machine by using VS Code.
The ssh connection works, I tested it by connecting through the terminal.
The connection string is in the following for:
(user_name)#(machine_name).westeurope.cloudapp.azure.com
I'm not the system administrator and I don't know the public IP.
I think the problem is the ssh port, I read that the standard port for ssh is 22 while I have 53044.
On VS Code I tried the following solution:
connection string: (user_name)#(machine_name).westeurope.cloudapp.azure.com:53044
I added the connection info into the config file with this format:
Host Linux_Azure
HostName (machine_name).westeurope.cloudapp.azure.com
User (user_name)
Port 53044
None of them work.
With the first solution VS Code tries to connect forever, failing with no error messages.
With the second solution VS Code gives back this error message: Could not establish connection to "Linux_Azure": The connection timed out.
I don't understand why it doesn't work, and I don't know how to solve it.
Do you have any idea to solve it?
I deployed one Ubuntu VM and tried connecting to it via SSH in VS code and got connected successfully with Port 22 like below:-
ssh siliconuser#siliconlinuxvm123.centralindia.cloudapp.azure.com -p 22
Output:-
When I tried connecting with port 53044, Even I got the same error code as yours like below:-
By default Azure Linux VM uses Port 22 to SSH, You cannot change the default destination port as it is fixed for a particular protocol. Example For RDP - Port 3389 is used, For HTTP- Port 80 and for SSH- Port 22 is used.
When I try to allow SSH in the inbound rule on VM's Networking Page > Port 22 is selected by default and greyed out thus we cannot add other port as a destination range refer below:-

Logs to troubleshoot SSH tunneling errors

I am trying to troubleshoot connection errors when using SSH tunneling to connect to a rhel 8 EC2 server. Does anyone know of a log location on RHEL 8 that may contain more information when the connection is refused?
For reference I am using the following command (which works on all my other servers)
ssh -i -L 8745:IPOfServer:8443 ec2-user#IPOfServer
I get the error "open failed: connect failded: Connection refused
I can connect on 8080 but 8443 is refused even though the port is open and the application and firewalld are configured to listen on 8443 and 8080.
Thanks!!

Failed to complete tunnel connection error with ngrok

Failed to complete tunnel connection
The connection to http://cc1e064782fc.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:80.
Make sure that a web service is running on localhost:80 and that it is a valid address.
The error encountered was: dial tcp [::1]:80: connectex: No connection could be made because the target machine actively refused it.
Hi, I was setting up ngrok and got this error, I disabled the firewall too.
Take a look at this video where I show you the error.
https://youtu.be/uP4B79w4s7c
Its kind of a message that ngrok successfully created tunnel to your pc at port 80 but there is no service running at that port in your OS, Mostly people run a web server at 80 but you can run any service at that port.
So lets assume you are running a web server in your OS on port 80 then you can access that web server from anywhere on the internet using that ngrok tunnel.

As I can, configure the firewall of ubuntu server for the server to accept connections of the terminals through PostgreSQL port 5432

Configuration: Server: Ubuntu server 16.04 LTS using webmin
Terminal: Windows 7 Using PgAmin III
I was unable to establish the connection between my terminal and my server through pgAdmin III on port 5432.
On my server I added:
in file postgresql.conf I edited
in #Connection Settings
listen_addresses = '*'
in file pg_hba.conf I added
in #IPv4 local connections
host all all 172.x.x.x/32 md5 //this is IP Terminal (Hidden x)
I checked the port, this is 5432 default and user is postgres
When I try to establish the connection on PgAdmin III:
Host: //My Server IP (Ping console successful)
Port: 5432
username: postgres
password: //My password
Show me the following message:
Server doesn't listen
The server doesn't accept connections: the connection library reports
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "Mi SERVER IP Hidden" and accepting TCP/IP connections on port 5432?
If you encounter this message, please check if the server you're trying to contact is actually running PostgreSQL on the given port. Test if you have network connectivity from your client to the server host using ping or equivalent tools. Is your network / VPN / SSH tunnel / firewall configured correctly?
For security reasons, PostgreSQL does not listen on all available IP addresses on the server machine initially. In order to access the server over the network, you need to enable listening on the address first.
For PostgreSQL servers starting with version 8.0, this is controlled using the "listen_addresses" parameter in the postgresql.conf file. Here, you can enter a list of IP addresses the server should listen on, or simply use '*' to listen on all available IP addresses. For earlier servers (Version 7.3 or 7.4), you'll need to set the "tcpip_socket" parameter to 'true'.
You can use the postgresql.conf editor that is built into pgAdmin III to edit the postgresql.conf configuration file. After changing this file, you need to restart the server process to make the setting effective.
If you double-checked your configuration but still get this error message, it's still unlikely that you encounter a fatal PostgreSQL misbehaviour. You probably have some low level network connectivity problems (e.g. firewall configuration). Please check this thoroughly before reporting a bug to the PostgreSQL community.

Unable to connect to PostgreSQL server: could not connect to server: Permission denied

Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Permission denied Is the server running on host "10.0.1.201" and accepting TCP/IP connections on port 5432?
This is the error i am getting when trying to connect to remote database from linux based server
Though i am able to connect to it from localhost
Can anyone help me in this
One possible scenario/solution that worked for me (for the very same problem) is here:
service httpd stop
service postgresql stop
setsebool -P httpd_can_network_connect 1
service httpd start
service postgresql start
Here we're basically allowing HTTPD to connect to PostgreSQL over network by setting SELinux bool equals to 1 (true).
Check the listen_addresses setting in postgresql.conf. If it is set to localhost, then only loopback connections will be accepted, and remote connections will get a "connection refused" error. Set listen_addresses to "*" to enable listening on all interfaces.
In PostgreSQL you have to configure client authentication in pg_hba.conf on the remote server.
Read more about pg_hba.conf # http://developer.postgresql.org/pgdocs/postgres/auth-pg-hba-conf.html , otherwise you'll never connect to that server :).
Hope it will help,
Stefan

Resources