I am trying to create an ODBC connection to Hadoop Hive and I need to find out the host IP address on Hadoop. Where do I look or what command do I write on the Hadoop shell to find the server's IP address?
Related
For a machine with multiple IP addresses and has a hostname, how does the WMI remote query choose which IP address to connect to? I know that if we set the IP address of a machine in "hosts" file, the ping command will resolve to that IP address.
The reason I have this question is because one of the proprietary app
that I used had WMI query to get remote info, but it used different IP
to connect to the target machine than the one supplied in "hosts"
file.
My company has an on-premise network which is opened by OpenVPN server.
In the ordinary scenarios, I used to connect to that server very easily.
However, when I tried to that server from the OCI compute instance which I connected by SSH from my laptop, there exist some problems. As soon as I try to connect VPN server, my SSH connection is closed.
IMHO, this may occurred because VPN connection changes network information and so my SSH connection might be lost.
I tried to look around to find out how to connect to VPN from OCI, but almost everything was using IPSec protocol which Oracle provided, others were about builting OpenVPN Server on the OCI instance.
I'm very novice for the network structure. So, please give me some hint to resolve this problem.
Thanks,
I get the following:
You have Ubuntu 18.04 VM on a Public Subnet in OCI
You have OpenVPN Server running on On-Prem.
You would like to access your On-Prem from Ubuntu VM on OCI.
If I understood it correctly, the best way is to set up IPSec VPN. It isn't that hard if you hit right steps. At the high level, you will be doing the following steps. I have used IKEv1 in my attempts in the past.
OCI:
Create a DRG
Attach/Associate it to your VCN
Create a CPE (Customer Premise Equipment) and mark the IP Address of OpenVPN server to it.
Create an IPSec Connection on the DRG. It will create two Tunnels with its own Security Information.
Set up Routing on associated subnet (i.e., one that hosts Ubuntu VM) so traffic associated to On-Prem CIDR are routed to DRG.
On-Prem:
Create necessary configuration to create the Tunnels upto OCI (Using the configuration information from previous steps such as VPN Server IP Addresses and Shared Secrets)
Set up Routing so that the Traffic destined for OCI CIDR ranges are sent to associated Tunnel Interface
This ensures that you can create multiple VMs on the OCI Subnet all of which can connect to your On-Prem infrastructure. OCI Documentation has sufficient information in setting up this VPN Connection.
Alternatively if your only requirement is to establish connectivity between Ubuntu VM on OCI to OpenVPN server On-Prem, you might use any VPN Client software and set it up. This doesn't need any of the configuration steps mentioned above.
Worker nodes in private subnets have private IP addresses only (they do not have public IP addresses). They can only be accessed by other resources inside the VCN. Oracle recommends using bastion hosts to control external access (such as SSH) to worker nodes in private subnets. You can learn more on using SSH to connect through a bastion host here - https://docs.cloud.oracle.com/en-us/iaas/Content/Resources/Assets/whitepapers/bastion-hosts.pdf
I've got several PCs, virtual and bare metal, that run clients of the collectd daemon and report their statuses to the monitoring server.
One of those PCs is incorrectly configured and reports localhost as its name.
How can I find its IP address?
The simple answer would be to run a tcpdump on the port used for collectd (port 2003 for example) and check the different IPs.
run ssh and pipe directly to the config file to see which one has the wrong host set:
echo "sudo nano /etc/collectd/collectd.conf | grep "Host" | ssh user#IP
How can I create a SSH tunnel to a machine (RedHat Enterprise Linux) hosting a MongoDB (Version 3) and then run R scripts from my machine (windows) on the database?
I know how to connect to the machine via puTTY and then run an uploaded FCP transferred R script from the shell on the machine, however I want to perform the analysis from my PC so I can test my scripts quickly and export analyses and results easily.
This is adapted from an instruction I have for our remote MySQL SSH connections. The remote database server is configured to listen to its local address on port 27017. (127.0.0.1:27017). You would want to replace 10.10.10.10 with the IP address of the MongoDB server.
1. Install putty.exe
2. Start putty.
3. Sessions Tab:
3a. Set hostname like:
3b. <username#hostname>
3c. Eg: mongo_user#mongodb.server.com
4. Connection : SSH : Tunnels tab.
4a. Source port: 27017
4b. Destination: 10.10.10.10:27017
5. Sessions Tab
5a. Saved Session: Type name such as “MongoDB Server”
5b. Select [Save] button
On your windows client, you would use a connection string to connect to 127.0.0.1:27017 (the local source port you configured in the putty connection above)
edit to change 192.168.0.1 to 127.0.0.1 (wrong local/loopback address)
I'm running Sequel Pro 0.9.9.1 and can connect to a remote mySQL (v 14.14) database hosted on a server that only allows SSH connections. When I connect via Sequel Pro, I only need to fill out the ssh user and password to connect without issue. I am able to access all databases in this manner.
I then try to connect to the database in R (2.14.0) using RMySQL (0.9-3), but this command fails:
conn <- dbConnect(MySQL(), user="ssh_user", password="ssh_password", host="localhost")
with the error: "RS-DBI driver: (Failed to connect to database: Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" regardless of if I use single quotes (suggested elsewhere), change the user and/or password to "root" or "", or substitute "127.0.0.1" for "localhost". If I substitute the server host for host in the R command, I am told I cannot access the server (which is true, it is configured to only be accessed via ssh).
What are the correct user, password and host to use to connect to a database accessed via ssh through Sequel Pro in this manner?
I've never done this, but I assume you could use SSH to tunnel the appropriate port, as discussed here: http://www.howtogeek.com/howto/ubuntu/access-your-mysql-server-remotely-over-ssh/ .
In brief, you would:
Tunnel the appropriate port through SSH, which by default would be
3306 for MySQL.
Use dbConnect() to connect to the MySQL server as
if it was on your local machine.
This bypasses the need for Sequel Pro. The tunnel essentially allows traffic on your local 3306 port to be tunneled through an SSH connection on port 22 between your local machine and the server and then forwarded to port 3306 locally on the server.