How to configure ipython notebook on laptop to point to remote server for execution - ipython

Well, my previous attempt to connect Pycharm from laptop to remote server did not see any ray of hope because of tcp/ip issues (which honestly I could not understand much and am still battling with) therefore I am looking to ipython as an alternative
Question: How can I configure ipython on laptop to point to the remote CentOS6 server for code processing and execution
Use Case: I want to use my laptop (using Win 7 Professional) to connect to the CentOS 6.4 master server using iPython.
Objective: To write the code in iPython on the laptop and then send the job to the server which will do the processing and should then return the result back to the laptop or to any other visualizing API.
The server and 3 namenodes already installed with pyspark and I have checked pyspark works in standalone mode on all four servers. Pyspark works in standalone mode on my laptop too.
Current setup: I use SSH to access the server. python 2.6 is installed on the server and the nodes. Able to run pyspark on all 4 servers in standalone mode
Any pointers will be helpful.

You have to start the IPython Notebook server on one cluster-node and then connect to the cluster-node's url. To do this, you have to create a profile, where you may specify hostname, port and so on. Have a look at this:
http://ipython.org/ipython-doc/1/interactive/public_server.html

Related

Running Pianobar on a headless Ubuntu 18.04 server (without X11) with Alsa/Pulseaudio and streaming audio over SSH to a Mac laptop

There seem to be a vast amount of articles/posts on setting up Pulseaudio and SSH but I don't know if I've seen any in regards to pianobar.
My scenario:
I am running a headless Ubuntu 18.04 server WITHOUT X11. I would like to ssh to it from my laptop and run the pianobar app so the sound comes out of my laptop.
What I have working:
On the Ubuntu server I have installed Alsa and all its tools
On the Ubuntu server I have installed pianobar
When I physically sit at the Ubuntu server, login, and run pianobar I get sound
What I have attempted:
I installed Pulseaudio and configured the /etc/pulse/default.pa file as instructed in a lot of the google info I find. The most important part seems to be:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24 auth-anonymous=1
My problem:
When I ssh into the server from my Mac and run pianobar the sound is still coming out of the server
I have tried a lot of variations with my ssh connection. I understand I'm supposed to be forwarding a port of some sort but I dont know if I have even setup the server right.
Docs I have used to troubleshoot:
https://askubuntu.com/questions/28176/how-do-i-run-pulseaudio-in-a-headless-server-installation?rq=1
https://github.com/cladmi/systemd_pulseaudio_al
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/
https://askubuntu.com/questions/28176/how-do-i-run-pulseaudio-in-a-headless-server-installation
https://askubuntu.com/questions/939144/playing-audio-stops-in-unity-when-i-switch-user/939338#939338

Apache Spark master running failed

I tried to run C:\Spark\spark-1.6.1-bin-hadoop2.6\sbin>start-master.sh
, but the following mistake appeared
I also noticed that there is a warn while running bin/spark-shell
16/04/24 23:14:41 WARN : Your hostname, Pavilion resolves to a loopback/non-reachable address: fe80:0:0:0:0:5efe:c0a8:867%net14, but we couldn't find any external IP address!
http://localhost/8080 is also unawaliable.
Can anybody please tell where is a mistake or did I miss any settings which are nessesary to run Master properly?
The problem is that this script is not designed to be executed on a Windows machine. Please refer to Official Spark Manual
Note: The launch scripts do not currently support Windows
The rule of thumb is that only script ending with .cmd will run on Windows. While scripts ending in .sh are designed for Linux and Mac OS. And while it should be possible to manually start Spark Master on Windows, it's probably better to just run a local[*] mode, unless you are creating a cluster of Windows machines. local[*] mode already fully utilizes power of the local machine.

Access guest from virsh

I am running Centos 7 x86-64. I installed a guest (again Centos 7) through kickstart as an exercise. I prepared my kickstart file, I validated it and I launched with virt-install.
If something went wrong with the network configuration (During install I got no problem, I created a local repo on Host FTP server as source for the install) how can I connect to the machine?
Only SSH or virsh foresee some other connection method?
How can I find my machine running network configuration from outside?
I am running a barebone Centos7 installation so only command line, no graphical interface at all.
Thanks,
M.
You can ssh to your physical host from another one having graphical interface with X forwarding enabled (ssh -X machinename), and look at the the VM with virt-manager
You will need X running on the machine you're connecting from. For Mac OS it's XQuartz

Use Jupyter Notebook on my local computer to run code on a remote computer

I use Jupyter Notebook to run bioinformatic analyses, and I love it. However, it only really plays nice when I run it on my personal computer. However, I regularly do analysis using a remote computer with multiple cores to reduce processing time. I'd like to be able to use the Jupyter Notebook interface on my personal computer while everything is actually running on the remote computer. I generally do this via ssh access to the remote computer within the shell and execute all commands at the command line. I'd love to do this from the Jupyter notebook on my personal computer, rather than from the shell on my personal computer. It is relevant that I don't have sudo access on the remote computer.
So far, I've installed miniconda and jupyter notebook on the remote computer like this:
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
Once conda is installed properly, I install jupyter notebook via miniconda with this line:
conda install jupyter
This installs successfully. I can then start a jupyter notebook session on the remote machine with the line:
jupyter notebook --no-browser
So far, so good. My next question: How do I have my local jupyter notebook connect to the remote machine, so that I can execute commands on the remote machine using my local jupyter notebook? There is some documentation here, however i have been trying different things for hours, but have failed to succeed.
Can anyone give a straight forward method to connect to my remote server, given that I am this far along? I feel like it should just be a matter of entering url addresses and passwords into my local Jupyter notebook (all of this is so easy via ssh in the shell).
Follow the steps below:
Enable port forwarding on remote machine
ssh -N -f -L 127.0.0.1:8898:127.0.0.1:8898 user#remote-machine.com
Do ssh to your remote machine and then run following command on remote machine
jupyter-notebook --no-browser --port=8898
you will see some thing as shown below
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8898/token=eaf2f51f9c053f43d8bd093e76f0cc6301b545549c998fa2&token=eaf2f51f9c053f43d8bd093e76f0cc6301b545549c998fa2
Copy and paste the URL in your local machine browser.
If you want to access Jupyter/Ipython notebook running on a VPS remotely, I wrote a tutorial on the digital ocean community site.
As shown in the guide, after installing and running Ipython Notebook using command line on the server, you can connect to the notebook using SSH tunnelling with Putty (on windows) or the ssh -L command on Unix-like systems (ie Mac and Linux)

Connecting to a remote CentOS machine

I am trying to connect to a remote system which has CentOS running on it from a Windows machine. I am getting the following error:
My remote computer is on and is available on the network. I tried following the steps mentioned on this website http://www.techotopia.com/index.php/Remote_Access_to_the_CentOS_6_Desktop to enable remote access on centos as well.
Currently I can access the remote sever through commandline utility like Putty only.
I use VNC for remote GUI admin work on CentOS device's from windows its nice and easy to set up and use, below are links to CentOS 6.5 set up guide and 7
https://www.howtoforge.com/vnc-server-installation-centos-6.5
https://www.howtoforge.com/vnc-server-installation-on-centos-7
Let me know how you get on :)
As posted by PaulM, I followed the steps in the website to install VNCServer on the centos machine.
To connect from my linux machine, I wrote the following commands:
vncviewer
IPAddress:5901
Adding the port number specifically made it work
CentOs to centOs Only
No Need Any Softwares Already Centos have TigerVnc Viewer
1.Enable Remote desktop in your centos system
Goto System-->Preference-->Remote Desktop
**i.Enable allow other user to view your Desktop**
**ii.Enable allow other user to control your Desktop**
**iii.You must confirm each access to this machine allow or cancel**
**iv.if you ask any password to enable and type your password**
Notification Area:
Some one connect your system its enable to shows the icon on top panel.