Skip to main content

Posts

Showing posts from October, 2015

Shiny Server (Open Source edition) configuration quick reference

An appendix to complete the tutorial about the Shiny Server (OS edition) installation: a quick reference to its configuration. The configuration file of a Shiny Server is stored in the /etc/shiny-server/shiny-server.conf file. It comes in a format like this: run_as shiny; server {   listen 3838;   location / {     site_dir /srv/shiny-server;         log_dir /var/log/shiny-server;         directory_index on;   } } Here's the explanation of the parameters: run_as : to set the system user to run R/Shiny applications. Don't use root. server : this block defines a single server details (see the following properties). listen : the server listening port. The default value is 3838. location : defines a location available at the base URL. site_dir : the directory hosting the Shiny web apps. log_dir : the directory where the Shiny Server logs are stored. directory_index : to enable ( on ) or disable ( off ) directory listing.

A tricky exception running MapReduce functions through RHadoop: root cause and how to fix it.

RHadoop ( https://github.com/RevolutionAnalytics/RHadoop/wiki ) is a collection of five R packages (rhdfs, rmr2, rhbase, ravro, plyrmr) that allow users to manage and analyze data with Hadoop. Running any MapReduce function, also this simple one     from.dfs(mapreduce(to.dfs(1:100)))  through RHadoop on Linux servers you could face this exception: 2015-10-20 08:39:41,722 ERROR [main] org.apache.hadoop.streaming.PipeMapRed: configuration exception java.io.IOException: Cannot run program "Rscript": error=2, No such file or directory     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1059)     at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:209)     at org.apache.hadoop.streaming.PipeMapper.configure(PipeMapper.java:66)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso