Beaker Notebook start Anaconda Python on Windows - ipython

How should I configure Beaker to use my pre-installed Anaconda Python3? I followed the instructions here, and then here, but with no success. My beaker.pref.json file looks like:
{
"autocomplete-parameters" : "true",
"pref-format" : "1",
"allow-anonymous-usage-tracking" : true,
"languages" : {
"IPython" : {
"path" : "c:\\Python\\Anaconda"
},
"Python2" : {
"path" : "c:\\Python\\Anaconda\\envs\\py27"
},
"Python3" : {
"path" : "c:\\Python\\Anaconda"
}
},
"advanced-mode" : false,
"edit-mode" : "default"
}
I tried it without Python2, but still not work. My browser always open, but it's unable to connect to the server.
The output of beaker.pref.json run is:
...
c:\Beaker>REM limitations under the License.
starting nginx instance (c:\Beaker/nginx)
nginx-stderr>nginx: [alert] could not open error log file: CreateFile() "C:\Users\itsme\.beaker\v1\nginx8685613245756631317/logs/error.log" failed (1113: Form
atMessage() error:(15100))
nginx-stderr>2016/04/29 16:03:50 [emerg] 3548#14984: CreateFile() "C:\Users\itsme\.beaker\v1\nginx8685613245756631317/conf/nginx.conf" failed (1113: FormatMes
sage() error:(15105))
[main] INFO org.eclipse.jetty.server.Server - jetty-8.1.13.v20130916
[main] INFO org.eclipse.jetty.server.AbstractConnector - Started SelectChannelConnector#127.0.0.1:8802
Connecting to http://127.0.0.1:8801/
Of course, Jupyter works perfectly.
Thank you for any help!!

It looks like BeakerX is the successor of Beaker! Check BeakerX over the Internet.
To install it, just do: conda install -c beakerx beakerx
Don't use Beaker anymore, otherwise, you may lose much time trying to solve it.

Related

Rename MongoDB 4.0.4 Database Name

Getting below error :
db.copyDatabase("old_db","new_db","localhost:27017");
WARNING: db.copyDatabase is deprecated. See http://dochub.mongodb.org/core/copydb-clone-deprecation
{
"note" : "Support for the copydb command has been deprecated. See http://dochub.mongodb.org/core/copydb-clone-deprecation",
"ok" : 1
}
https://docs.mongodb.com/manual/release-notes/4.0-compatibility/#copydb-and-clone-commands
I went to this link, but there's no solution regarding this.
Any leads would be appreciated.
Use mongodump and mongorestore or write a script using the drivers.

How to find mongodb data and log files location through command?

How to find mongodb data and log files location through command?
like below SQL server command.
SELECT * FROM sys.database_files
The easiest way is probably with the getCmdLineOpts command:
db.getSiblingDB("admin").runCommand({getCmdLineOpts:1})
This Mongo Shell command will first switch to the admin database then execute the getCmdLineOpts command. An alternative is the shell wrapper:
db.serverCmdLineOpts()
These will return the parsed command line options, which should contain both the data directory being used and the log path.
{
"argv" : [
"C:\\****\\3.4.10\\bin\\mongod.exe",
"--dbpath",
"C:\\****\\data",
"--port",
"27017",
"--logpath",
"C:\\****\\data\\mongod.log",
"--bind_ip",
"0.0.0.0"
],
"parsed" : {
"net" : {
"bindIp" : "0.0.0.0",
"port" : 27017
},
"storage" : {
"dbPath" : "C:\\****\\data"
},
"systemLog" : {
"destination" : "file",
"path" : "C:\\****\\data\\mongod.log"
}
},
"ok" : 1
}
Note: I obfuscated my paths, they do not normally contain ****.
You can see it provides both the raw values as well as the parsed values. If both command line options and config file options are specified on the command line, this will show the effective values being used by the process. Keep in mind there are several extra options that can effect where data is stored but this should get you on your way pretty quickly.
If you would like to know this information without using the Mongo Shell you will have to either grep the config file or look at the command line options of the running process, or both.
You can view logs in mongoCLI also
to list all logs
> show logs
global
startupWarnings
show log content
> show log global
2018-01-30T09:14:10.305+0530 I CONTROL [initandlisten] MongoDB starting : pid=778 port=27017 dbpath=/var/lib/mongodb 64-bit host=ubuntu
2018-01-30T09:14:10.305+0530 I CONTROL [initandlisten] db version v3.6.1
2018-01-30T09:14:10.305+0530 I CONTROL [initandlisten] git version: 025d4f4fe61efd1fb6f0005be20cb45a004093d1
data path will be printed on global log line 1, in my machine its dbpath=/var/lib/mongodb

where is postgresql-docs pdf?

So I installed postgresql-docs:
[root#me ~]# yum info postgresql93-docs.x86_64
Loaded plugins: priorities, update-motd, upgrade-helper
Installed Packages
Name : postgresql93-docs
Arch : x86_64
Version : 9.3.14
Release : 1.62.amzn1
Size : 13 M
Repo : installed
From repo : amzn-main
Summary : Extra documentation for PostgreSQL
URL : http://www.postgresql.org/
License : PostgreSQL
Description : The postgresql-docs package contains some additional documentation for
: PostgreSQL. Currently, this includes the main documentation in PDF format
: and source files for the PostgreSQL tutorial.
And cheked docs:
[root#me ~]# find / -name *.pdf
/usr/share/doc/python27-babel-0.9.4/doc/logo.pdf
/usr/share/doc/libtasn1-2.3/libtasn1.pdf
None found! Only /usr/share/doc/postgresql93-docs-9.3.14/html has html docs.
Q: Is it bad package description or where in directory structure can I find that pdf file?..

How to pass the debug argument from pm2 to a node process that uses a Coffeescript interpreter?

The following command is not behaving as expected. The debug argument is not reaching the Node process:
pm2 startOrRestart server.json --node-args="--debug=7001"
server.json file:
{
"apps" : [
{
"name" : "web",
"cwd" : "/home/app/",
"instances" : 1,
"cron_restart" : "*/30 * * * *",
"script" : "web/server.coffee",
"exec_interpreter" : "coffee",
"error_file" : "logs/web-err.log",
"out_file" : "logs/web-out.log"
}
]
}
But the node process that is launched by pm2 does not have the debug argument.
22:10 0:05 node /home/app/web/server.coffee
I suspect that this has something to do with the fact that I am using the Coffeescript interpreter. For example, I can make things work as expected if I run the Coffee command directly (bypassing pm2), which starts up the node process in debug mode as expected:
coffee --nodejs --debug=5000 /home/app/web/server.coffee
How can I properly pass the debug argument from pm2 to coffee to node, so that it makes it all the way to the node process?
The problem can be solved by adding '--nodejs' also to --node-args option value, like
pm2 startOrRestart server.json --node-args="--nodejs --debug=7001"
If the interpreter is specified as 'coffee' then the coffee binary (or coffee-script npm package) will be used internally. So we have to give --node-args option value accordingly.

What mongodb command I should run to know server info?

For example, I want to know the database directory that is used by mongodb to run what it is?
The documentation said that the default data is in /data/db however, there is no such directory
I wonder if there is a mongodb command to get that simple info. I look through the web and could not find it.
You can see the Configuration Parameters used with:
> db.serverCmdLineOpts()
For example:
{
"argv" : [
"mongod",
"--dbpath",
"/usr/local/db"
],
"parsed" : {
"dbpath" : "/usr/local/db"
},
"ok" : 1
}
Any parameters not specifically listed will be using their default values.
Just create a folder called data anywhere in your system.
Then let Mongo know where the this folder is by updating the path.
in windows you would run this on the command line.
C:\mongodb\bin\mongod.exe --dbpath c:\test\mongodb\data
This is where your mongo stores your data.