Add rotating log info by @minrk to docs

This commit is contained in:
Carol Willing
2017-03-24 10:56:35 -07:00
parent 1970273c58
commit 942e05888b

View File

@@ -18,6 +18,7 @@ problem and how to resolve it.
- How do I increase the number of pySpark executors on YARN? - How do I increase the number of pySpark executors on YARN?
- How do I use JupyterLab's prerelease version with JupyterHub? - How do I use JupyterLab's prerelease version with JupyterHub?
- How do I set up JupyterHub for a workshop (when users are not known ahead of time)? - How do I set up JupyterHub for a workshop (when users are not known ahead of time)?
- How do I set up rotating daily logs?
[*Troubleshooting commands*](#troubleshooting-commands) [*Troubleshooting commands*](#troubleshooting-commands)
@@ -226,6 +227,31 @@ notebook servers to default to JupyterLab:
Users will need a GitHub account to login and be authenticated by the Hub. Users will need a GitHub account to login and be authenticated by the Hub.
### How do I set up rotating daily logs?
You can do this with [logrotate](http://www.linuxcommand.org/man_pages/logrotate8.html),
or pipe to `logger` to use syslog instead of directly to a file.
For example, with this logrotate config file:
```
/var/log/jupyterhub.log {
copytruncate
daily
}
```
and run this daily by putting a script in `/etc/cron.daily/`:
```bash
logrotate /path/to/above-config
```
Or use syslog:
jupyterhub | logger -t jupyterhub
## Troubleshooting commands ## Troubleshooting commands
The following commands provide additional detail about installed packages, The following commands provide additional detail about installed packages,
@@ -252,7 +278,7 @@ jupyterhub --debug
## Toree integration with HDFS rack awareness script ## Toree integration with HDFS rack awareness script
The Apache Toree kernel will an issue, when running with JupyterHub, if the standard HDFS The Apache Toree kernel will an issue, when running with JupyterHub, if the standard HDFS
rack awareness script is used. This will materialize in the logs as a repeated WARN: rack awareness script is used. This will materialize in the logs as a repeated WARN:
```bash ```bash
@@ -267,8 +293,7 @@ SyntaxError: Missing parentheses in call to 'print'
In order to resolve this issue, there are two potential options. In order to resolve this issue, there are two potential options.
1. Update HDFS core-site.xml, so the parameter "net.topology.script.file.name" points to a custom 1. Update HDFS core-site.xml, so the parameter "net.topology.script.file.name" points to a custom
script (e.g. /etc/hadoop/conf/custom_topology_script.py). Copy the original script and change the first line point script (e.g. /etc/hadoop/conf/custom_topology_script.py). Copy the original script and change the first line point
to a python two installation (e.g. /usr/bin/python). to a python two installation (e.g. /usr/bin/python).
2. In spark-env.sh add a Python 2 installation to your path (e.g. export PATH=/opt/anaconda2/bin:$PATH). 2. In spark-env.sh add a Python 2 installation to your path (e.g. export PATH=/opt/anaconda2/bin:$PATH).