Jupyter notebook (on remote server) to run in background and keep printoutput - background

I am running a Jupyter notebook on a remote server (AWS). Some of the task take quite a while, so I want to do the following:
Whenever I start the Jupyter notebook, the printoutput from each code line is gone, or even as if I start a complete new session and have to run each code again to get the respective results: How I can keep the results / output below each line? So other people can see the code and directly the result without rerunning it (i.e. they don't have access to my server)? I have seen jupyter notebook pages where code and results are available on GitHub etc, but couldn't find a description on actually doing it, especially when run on a remote server.
Type my code in the line, hit run and in case it takes too long or I know it will take long, close the browser and even disconnect from the server - while keeping 1. intact: So far I understand that with 'nohup jupyter notebook' I can keep the jupyter notebook running although I disconnect from the server - AWS server is still running of course.
Thank you.

Related

SSH Tunnelling error: "bind: Address already in use" after 1st successful use

I am trying to run Jupyter Notebook on a Virtual Machine.
I start the Jupyter Notebook by
jupyter notebook --no-browser --port=8889
I get the expected response, i.e. a link
http://127.0.0.1:8890/?token=***
Then I try forwarding by using
ssh -N -L 8889:localhost:8889 access_details#server_IP
After authentication, I get this message:
bind: Address already in use
That is all I get. There are no other additional messages.
This is what I have already tried
a. Kill processes using the port
b. Use different port
c. Check other things that I had done, like killing screens, stopping everything, and starting from the start.
d. Please note: It worked the first time I tried accessing it. It is not working from the second time I am trying to do it.
e. Other keywords (might be helpful): Azure, Ubuntu.
f. Screenshot:

SQL Server Browser won't start

I want to start playing around with databases in Java to help with my university work however I can't get SQL Server to work properly. I've installed it using the wizard and selecting 'Basic' the installing SSMS. However when launching SSMS I get Error 26. When researching this it says to make sure that the SQL Server Browser service is running. Unfortunately this is the issue, every time I try to start the service it fails.
All the fixes I've seen about this topic have been related to servers on another machine where as I am trying to run the server on my own PC. I've tried them anyway but nothing has worked so far. The only thing I can find that might give you a clue in helping me is that in the log file it says that it failed to register the SPN.
When working on my local machine, I don't usually need SQL Server browser - but my SQL Server itself isn't set up to run automatically.
You can go to services (either via window and search for 'services', or in Windows 10 open the task manager, go to the last tab 'services'). Find the 'SQL Server' service (it helps to sort by description column) and right click -> start.
If you take note of the name (default is 'MSSQLSERVER') you can start the service (e.g., in a batch file, from command line) using sc start "MSSQLSERVER" (or whatever your server instance is called).

echoid.exe remote execution issue (wrong Locking Code output)

I am trying to bring locking code of a farm in automatic way.
So, i have on each remote server echoid.exe and a batch file.
The batch file simply execute the echoid.exe and write its output into a text file which i can parse.
The problem is when im triggering the .bat file remotely, it seems like the echoid.exe executed on the container host (the one im using to send execution command through psexec for example) rather than executing the code in the remote host (meaning- the locking code output is wrong) . If the same .bat file executed locally (and manually), the results are OK.
Any idea why? does anyone know how can i run the echoid remotely and get the correct results?
i have tried several remote action and all failed and brought wrong results :(
please help!
BTW all remote machines are WIN OS.

Vagrant starts but cannot connect until I do a 'force provision'

I've got a Windows 7 machine setup with vagrant/virtualBox - each morning when I try to access my development site it always a 'Unable to connect' error message in my Firefox browser.
Even though I have booted the machine using the 'vagrant up' command for some reason it only seems to be accessible via the browser once I have done the 'vagrant provision' command. This is obviously annoying as it starts doing stuff from scratch.. eg installing my mysql database again.
Can anyone provide any light into this, and why it seems to fail to connect all the time - as this provision command is only a temporary fix as i'll need to amend the DB everytime which is only feasible in the short term.
Might just be my own setup - but I noticed nginx was restarting so have to restart this each time

SSH "Framework" to write programs that will keep a connection open and feed commands to the servers

I am looking for some kind of framework that will allow me to do connect to multiple servers using SSH and keep the connection open, reopen it if it dies, and allow me to run commands to it and report back. For example, check disk space on all the machines right away, so I'd do results = object.run("df -h") and it returns an array with the response from all the machines (I am not looking for a monitoring system).
Anyone have any idea?
I would use Python and the Fabric framework. Lets you easily execute commands on a set of servers - like doing deployment
with Fabric you could do
from fabric import run, env
def getSpace(server):
env.host_string
run("df -h")
>>> fab getSpace("234.24.32.1")
One way to do this would be to use Python and the paramiko library. Writing the functionality that runs a given command on a specified set of servers is then a simple matter of programming.