Rserve fails to set up connection - rserve

Up to yesterday, I have been connecting Tableau with R through Rserve on my localhost. Today, when I try to make the connection again, Tableau complained:
a error occurred during connection to localhost: 6311. No connection could be made because the target machine actively refused it
I doubled check Rserve is running. However, when I typed telnet localhost 6311 in cmd, no connection can be detected. It strikes me that something worked well for a few months suddenly stopped to function. I did installed RMySQL yesterday which seem to coincide with the timing, but is it possible? Any idea how to trouble shoot? Thanks.

Multiple things might be happening here.
check your netstat -ntlp output and see if its' listening on port 6311 and check if it's listening at 0.0.0.0:6311 or 127.0.0.1:6311. If you use the hostname rather than localhost it should be able to connect as long as the deamon is up. To connect using localhost from the same machine, stop Rserve and restart it as R CMD Rserve this will bind it to the loopback address, if you want it remotely accessible then you'll have to restart it using R CMD Rserve --RS-enable-remote
If you are using linux, you'll need to check your firewall and see if port 6311 is allowed .... ufw allow 6311 will do the trick.
Ben

This explanation may be helpful.
In my case, I was running through 'Rserve' and the configuration did not allow remote.

Initially invoke the Rserve using the command R CMD Rserve --RS-enable-remote from your server.Then call Rserve from your client machine.To test the connection try telnet IP port to the server which runs Rserve.This will do the trick.

Related

Windows - jboss on docker, connection refused to local oracle database

I have Jboss running in a docker container. On jboss I have defined a connection to the xa-datasource database as the ip address of my computer and not localhost because I work in Windows 10. Despite the correct ip and port to the database (oracle) I keep getting the connection refused error. I run jboss with the command
docker run -d -p 8080:8080 -p 9990:9990 myjboss
Can anyone help me, or do I need any additional settings in my docker. I will add that I also test alpine and in the container (exec) I can ping my ip address.
Thanks a lot for all the answers. I would like to add that I tested all other solutions contained in similar questions, but unfortunately I did not get the expected results.
If you can ping your host IP, but you can’t connect to the database, granted that the DB is running and the listener is up...
I’d advise you to check the Windows Firewall settings.
Maybe try disabling it to check if you can actually connect to the database, if so, add an Inbound Rule to the firewall to allow connections on port 1521 (or whatever port your listener is running on)
I solved this problem by using not ip/localhost but host.docker.internal as described here -> https://docs.docker.com/docker-for-windows/networking/

VNC viewer failing to make connection with "channel 3: open failed: connect failed: No route to host"

I ssh into a server with the following:
ssh -g -L5912:server:5912 user#host
It goes through, and I can access my files on the other server through the command line (meaning I can connect to the server, it is my vnc viewer that is failing!) but when I try to open my vnc viewer (RealVNC) and connect to localhost:12 i get the following error message in the vnc viewer application:
The connection closed unexpectedly.
Additionally in the original command line shell i get:
channel 3: open failed: connect failed: No route to host
I've tried switching to different ports and even checked out other posts on the same error message but the problem is i don't really understand them... ssh tunnels are still relatively new to me so i don't really know what im doing. Any help would be greatly appreciated. Thanks!
You're trying to setup a port forwarding, this may fail because of many reasons:
SSH port forwarding not enabled in the host
Check SSH server in the host if AllowTcpForwarding is enabled:
$ grep AllowTcpForwarding /etc/ssh/sshd_config
AllowTcpForwarding yes
Typically, it's commented out. Uncomment and restart the sshd.
No connection between the host and server over port 5912
SSH to the host and try:
$ telnet server 5912
Connected to server.
Escape character is '^]'.
Finally, does the server listen on 5912?
Similarly, as above, but from the server - go there and try telnet server 5912.
Best regards,
Jarek
In my case it was the port forwarding rule I had set in Putty.
Please make sure you enter the correct hostname when defining the rule in Putty. I changed
localhost:5903
with
myserver:5903
and it worked...

Can I check if server is up without connecting to it?

Is it possible to check if a remote server is up, without connecting to it?
Basically, telnet ip.ad.dre.ss port works, but will connect to the server. Is there an equivalent command, that will just check is the server is up, without establishing a connection with it?
I would like to check it in a bash script.
If your server is a remote server you can not check without connecting to the server. You can only check that by log into the Operating System where that server is running and then you have to use ps -ef | grep [p]rocessName
For a local server ss --listening will list all listening processes.
for a remote server you could connect using ssh and run ss, or test the listening socket(s) directly using nmap
`

"network error: connection refused", putty error

I am trying to run putty on Windows 7.
I need to run some SSH commands to upgrade Magento. Every time putty gives me this fatal error:
network error: connection refused
I have even tried to use it through winSCP. Note that putty is running fine on my client's side, but for me it's giving me that error every time.
I tried using port 22, 23 and a few others without success. I have also tried with Windows Firewall both enabled and disabled.
Thank you.
Install open-ssh or ssh in target Linux machine solved my problem .
Use below commands:
sudo apt install ssh
sudo systemctl status ssh
sudo systemctl enable ssh
The following are the list of possibilities of this error:
1) Common cause is - Your IP is blocked or not whitelisted in the server which can be done by editing the file at /etc/csf/csf.conf
2) Disable the windows firewall settings and check..
The above two things should work in most of the cases
3) This is very unusual and when the above two options fails it is very difficult to find the solution
In this case the traceroute to the server host or IP works usually but putty fails
port 22 looks normal and working but connection fails and restarting SSH (service ssh restart) also does not work
reboot or restart the server but still fails
Adding IP in firewalls or whitelisting the local IP may not workout
This case generally happens when the server is migrated or new server. IP of the old server might be whitelisted locally, but don't have port 22 open, or some other local filtering is occurring for this new IP but not the old server IP..
In this case you need to change the port to some 522 or 530 some unusual port will help in sorting it out.. The same port you have to use for the SFTP connection also .. where as FTP connections works normally..
or you have to whitelist the IP locally or open the TCP in and out to port 22 if you want to use the port 22..

Amazon EC2 permissions and a simple web server

I just started experiment with EC2 tonight, and got a server running locally. I know it works locally because when I curl http://localhost:8080/hello it outputs hello.
I want to access this from the outside world. I modified my permissions in my security group to allow 8080 access, and then typed in "curl http://ec2-123-45-67-891.compute-1.amazonaws.com:8080/hello" into my local terminal. I got the response "curl: (7) couldn't connect to host".
Do I need to do something differently? (Obviously yes, but what?)
Have you bound your server only to localhost? If so, you'll only be able to connect from localhost.
Check the netstat output for your process with something like:
sudo netstat -ltnp | grep your_server_process
Look for whether your server process is bound to 127.0.0.1:8080 or 0.0.0.0:8080. If the former, then you're only bound to localhost and you need to reconfigure it.
I met the same issue. Try use 0.0.0.0 instead of 127.0.0.1.
You allowed access on 8080, but in your localhost example, it's running on port 80.

Resources