Landing page not displayed in browser - ipython

Everytime I run ipthon notebook in terminal, a blank page pops up in Chrome, instead of a normal dashboard page.
Relevant info
System: Mac OS X Yosemite
ipython in terminal works fine
All python staff is installed by Anaconda package
$ python -c "import IPython; print(IPython.sys_info())"
{'commit_hash': '1c0eb68',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path': '/Users/philip/anaconda/lib/python2.7/site-packages/IPython',
'ipython_version': '2.3.1',
'os_name': 'posix',
'platform': 'Darwin-14.1.0-x86_64-i386-64bit',
'sys_executable': '/Users/philip/anaconda/bin/python',
'sys_platform': 'darwin',
'sys_version': '2.7.9 |Anaconda 2.1.0 (x86_64)| (default, Dec 15 2014, 10:37:34) \n[GCC 4.2.1 (Apple Inc. build 5577)]'}
Start server with debug flag in terminal
$ ipython notebook --debug
2015-02-08 11:37:37.661 [NotebookApp] Config changed:
2015-02-08 11:37:37.661 [NotebookApp] {'Application': {'log_level': 10}}
2015-02-08 11:37:37.661 [NotebookApp] IPYTHONDIR set to: /Users/philip/.ipython
2015-02-08 11:37:37.662 [NotebookApp] Using existing profile dir: u'/Users/philip/.ipython/profile_default'
2015-02-08 11:37:37.662 [NotebookApp] Searching path [u'/Users/philip/Downloads/quant/backtesting', u'/Users/philip/.ipython/profile_default'] for config files
2015-02-08 11:37:37.662 [NotebookApp] Attempting to load config file: ipython_config.py
2015-02-08 11:37:37.664 [NotebookApp] Loaded config file: /Users/philip/.ipython/profile_default/ipython_config.py
2015-02-08 11:37:37.664 [NotebookApp] Attempting to load config file: ipython_notebook_config.py
2015-02-08 11:37:37.665 [NotebookApp] Loaded config file: /Users/philip/.ipython/profile_default/ipython_notebook_config.py
2015-02-08 11:37:37.668 [NotebookApp] Adding cluster profile 'default'
2015-02-08 11:37:37.668 [NotebookApp] searching for local mathjax in [u'/Users/philip/.ipython/nbextensions']
2015-02-08 11:37:37.668 [NotebookApp] Serving local MathJax from /Users/philip/.ipython/nbextensions/mathjax/MathJax.js at /nbextensions/mathjax/MathJax.js
2015-02-08 11:37:37.742 [NotebookApp] Serving notebooks from local directory: /Users/philip/Downloads/quant/backtesting
2015-02-08 11:37:37.742 [NotebookApp] 0 active kernels
2015-02-08 11:37:37.742 [NotebookApp] The IPython Notebook is running at: http://localhost:8888/
2015-02-08 11:37:37.742 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Remedies I have tried so far
Remove entire anaconda package. Use brew version of python interpreter instead. pip install ipython[all]. After that, I still get a blank page.
It makes me wonder it has something to do with OS X system, not really an python/ipython/notebook/anaconda issue. Maybe some system libraies are missing or not symlinked etc. The quesion is how to debug that?
Update
After update ipython via conda, I still got blank landing page

I fix the problem after 10+ hours of iterative debug. In the end of day, it's simply a missing line "127.0.0.1 localhost" in hosts file. As a result, Chrome cannot resolve localhost. I have no idea how that line is removed or when. But thank god, it's over.

Related

Can't connect remotely using Remote-SSH: "spawn UNKNOWN"

I'm trying to remotely connect to a server (running on Ubuntu 16.04.7 LTS) through VSCode (started on WSL).
I've set the path to my WSL Config file (with the SSH keys inside) in VSCode Remote-SSH.
I can reach and connect to the server through the terminal as well as the VSCode terminal.
Yet, when trying to connect through Remote-SSH I'm getting the message
Failed to connect to the remote extension host server (Error: spawn UNKNOWN)
with the following error log:
[13:50:42.906] Log Level: 2
[13:50:42.922] remote-ssh#0.56.0
[13:50:42.922] win32 x64
[13:50:42.925] SSH Resolver called for "ssh-remote+<net>.net", attempt 1
[13:50:42.925] SSH Resolver called for host: <net>.net
[13:50:42.926] Setting up SSH remote "<net>.net"
[13:50:42.970] Using commit id "<CommitID>" and quality "stable" for server
[13:50:42.974] Install and start server if needed
[13:50:44.876] Checking ssh with "ssh -V"
[13:50:44.888] Finding installed ssh failed: spawn UNKNOWN
[13:50:44.897] Resolver error: Error: spawn UNKNOWN
at ChildProcess.spawn (internal/child_process.js:394:11)
at Object.spawn (child_process.js:549:9)
at c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242426
at new Promise (<anonymous>)
at q (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242347)
at k (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242298)
at _ (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:245580)
at P (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:245741)
at O (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242117)
at C (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242026)
at Object.t.generateMultiLineCommand (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:243396)
at q (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:107623)
at c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:105016
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async Object.t.withShowDetailsEvent (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:110096)
at async Object.t.resolve (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:108158)
at async c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:143767
[13:50:44.908] ------
Already tried setting up manually the vscode server remotely as suggested here
Thanks in advance for any help!
Seems things got messed up with the update.
I fixed it by reinstalling the Remote SSH extension: ms-vscode-remote.remote-ssh and reloading as you will be instructed to do.
I also just installed the entire Remote Development extension: ms-vscode-remote.vscode-remote-extensionpack and reloaded vscode as instructed by vscode.
Before this though, I deleted (rm -rf) the contents of /home/<your_username>/.vscode-server/ bin/ and data/
Had the same problem.
After trying everything, the only thing that worked 100% was just killing vs-code and opening it again.

How to debug the problem not able to translate OID with a new MIB file for UPS-MIB?

On Centos, I ran into the following error:
sudo snmptrap -v 2c -c read localhost '' UPS-MIB::upsTraps
MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs
Cannot find module (UPS-MIB): At line 0 in (none)
UPS-MIB::upsTraps: Unknown Object Identifier
The above error happened after
Copied UPS-MIB.txt to /usr/share/snmp/mibs
I started snmptrapd:
snmptrapd -f -Lo -Dread-config -m ALL
The version of the Net-SNMP is 5.2.x.
The same procedures work fine with Ubuntu 18.04/Net-SNMP 5.3.7.
I wonder how to debug and fix the problem?
Besides the Net-SNMP version difference, on Ubuntu, I found an instruction to install mib-download-tool, and execute it after the installation of Net-SNMP, and comment out the lines beginning with min: in snmp.conf in order to fix the error of missing MIB's.
However, for the Centos, I had no need and found no such instruction, thus I have not done it yet, as there is no error message of missing MIB's.
The MIB file is downloaded from https://tools.ietf.org/rfc/rfc1628.txt
renamed to UPS-MIB.txt (It seems to me that the name of the MIB file does not matter, as long as it's unique? I tried to use a different names, upsMIB.txt, rfc1628.txt, but it does not help to improve.)
I solved the problem as follows:
manually copied /usr/share/snmp/mibs/ietf/UPS-MIB on an Ubuntu with Net-SNMP 5.7.3 installed to the Centos /usr/share/snmp/mibs/UPS-MIB
then restart the snmpd
by the command:
service snmpd restart
then the OID of UPS-MIB becomes visible and accessible.
Maybe, the version that I downloaded from https://tools.ietf.org/rfc/rfc1628.txt is not suitable??

Stuck: [Remote - SSH 0.49.0] Setting up SSH Host DEV: (details) Initializing VS Code

I have successfully used the vscode's extension Remote-SSH on a few remote linux servers. However, I cannot get past the "Acquiring lock" message in my vscode terminal on one particular server and would like to know how to. The terminal displays the "Acquiring Lock" line in the terminal and nothing else follows. I have even let this connection try to resolve itself overnight and it just will not go any further.
The output I am receiving appears as follows (I have replaced some real values/hash with generic text wrapped in angle brackets):
[13:48:34.210] Log Level: 3
[13:48:34.218] remote-ssh#0.49.0
[13:48:34.218] win32 x64
[13:48:34.221] SSH Resolver called for "ssh-remote+<hash>", attempt 1
[13:48:34.221] SSH Resolver called for host: DEV
[13:48:34.221] Setting up SSH remote "DEV"
[13:48:34.291] Using commit id "<hash>" and quality "stable" for server
[13:48:34.292] Install and start server if needed
[13:48:34.296] Checking ssh with "ssh -V"
[13:48:34.347] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[13:48:34.348] Running script with connection command: ssh -T -D 55214 DEV bash
[13:48:34.354] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[13:48:34.502] >
[13:48:34.503] Got some output, clearing connection timeout
[13:48:34.626] > <User>#<HostName>'s password:
[13:48:34.626] Showing password prompt
[13:48:42.869] Got password response
[13:48:42.869] "install" wrote data to terminal: "***********"
[13:48:42.908] >
>
[13:48:42.969] > <hash>: running
>
[13:48:43.009] > Acquiring lock on /<path to commit id hash>/vscode-remote-lock.<User>.<hash>
>
>
Vscode version
Version: 1.42.1 (user setup)
Commit: c47d83b293181d9be64f27ff093689e8e7aed054
Date: 2020-02-11T14:45:59.656Z
Electron: 6.1.6
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.17763
Remote - SSH version 0.49.0
Thank you for taking a look at my issue!
Update
The attempt appears to have finally timed out. The message that was left is:
[15:48:54.081] "install" terminal command done
[15:48:54.082] > Connection reset by <ip address> port 22
>
[15:48:54.084] Install terminal quit with output: Acquiring lock on <vscode-remote-lock file>
[15:48:54.085] Received install output: Acquiring lock on <vscode-remote-lock file>
[15:48:54.090] Stopped parsing output early. Remaining text: Acquiring lock on <vscode-remote-lock file>
[15:48:54.090] Failed to parse remote port from server output
[15:48:54.092] Resolver error:
[15:48:54.108] ------
I brought this issue up on the Remote-SSH Github project: https://github.com/microsoft/vscode-remote-release/issues/2472
After putting this issue in on Stackoverflow, the extension developers have developed a fix for this on their Nightly version of the extension. The fix will be in the Remote-SSH version 0.50.

I can not run HHVM on CentOS

I have installed hhvm on CentOS and when I try to run returns me an error:
Starting hhvm: Possible bad config node: dFile
in /var/log/hhvm/error.log ist
Unable to open pid file www.pid for write
Where is your HHVM pid file configured to live? In /etc/hhvm/server.hdf or similar, do you have a PidFile = setting?
I set mine to PidFile = /var/run/hhvm/pid. I then did a mkdir /var/run/hhvm.

Fabric take long time with ssh

I am running fabric to automate deployment. It is painfully slow.
My local environment:
(somenv)bob#sh ~/code/somenv/somenv/fabfile $ > uname -a
Darwin sh.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May 1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64
My fab file:
#!/usr/bin/env python
import logging
import paramiko as ssh
from fabric.api import env, run
env.hosts = [ 'examplesite']
env.use_ssh_config = True
#env.forward_agent = True
logging.basicConfig(level=logging.INFO)
ssh.util.log_to_file('/tmp/paramiko.log')
def uptime():
run('uptime')
Here is the portion of the debug logs:
(somenv)bob#sh ~/code/somenv/somenv/fabfile $ > date;fab -f /Users/bob/code/somenv/somenv/fabfile/pefabfile.py uptime
Sun Aug 11 22:25:03 EDT 2013
[examplesite] Executing task 'uptime'
[examplesite] run: uptime
DEB [20130811-22:25:23.610] thr=1 paramiko.transport: starting thread (client mode): 0x13e4650L
INF [20130811-22:25:23.630] thr=1 paramiko.transport: Connected (version 2.0, client OpenSSH_5.9p1)
DEB [20130811-22:25:23.641] thr=1 paramiko.transport: kex algos:['ecdh-sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'diffie-hellman-grou
It takes 20 seconds before paramiko is even starting the thread. Surely, Executing task 'uptime' does not take that long. I can manually log in through ssh, type in uptime, and exit in 5-6 seconds. I'd appreciate any help on how to extract mode debug information. I made the changes mentioned here, but no difference.
Try:
env.disable_known_hosts = True
See:
https://github.com/paramiko/paramiko/pull/192
&
Slow public key authentication with paramiko
Maybe it is a problem with DNS resolution and/or IPv6.
A few things you can try:
replacing the server name by its IP address in env.hosts
disabling IPv6
use another DNS server (e.g. OpenDNS)
For anyone looking at this post-2014, paramiko, which was the slow component when checking known hosts, introduced a fix in March 2014 (v1.13), which was allowed as requirement by Fabric in v1.9.0, and backported to v1.8.4 and v1.7.4.
So, upgrade !