Unable to deploy Shiny application on Shiny Server in Linux VM - r

I have been trying to deploy my shiny application in shiny server which i have installed on Linux VM (RHEL 6.5, 64 bit) by following the instructions given in this site
The server is started successfully but i get the following when i try to access the sample application provided as a part of the shiny server.
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/lib64/R/library/Rcpp/libs/Rcpp.so':
/usr/lib64/R/library/Rcpp/libs/Rcpp.so: invalid ELF header
In addition: Warning message:
package ‘shiny’ was built under R version 3.3.0
Error: package or namespace load failed for ‘shiny’ Execution halted
I installed all the required packages without any error still i got this exception when i tried to access the sample application.
The following are the steps i followed to install shiny server.
Installed R. In my office EPEL repository is blocked since it is maintained by a third party organization. So I downloaded the rpm file for R from EPEL website and installed the same using the rpm command.
Next i downloaded the shiny package from the CRAN repository and installed the same using the following command
R CMD INSTALL shiny_0.13.2.tgz
Finally i downloaded and installed the shiny server RPM file.
The server was successfully installed and started without any errors, yet i get the above error when trying to access the application deployed in the server.
I googled a lot for this error but could not find much. Has anybody else faced this issue? Could someone help me out with this?

I found out the issue. I installed all the packages as root user but shiny server runs under a different username "shiny". In order to solve this I started an R session using the following command
sudo R
Then I installed the packages using their source, as my LINUX VM (office machine)did not have internet access. I used the following command for installing the packages from the source. First we need to untar the source and then run the following command.
require(devtools)
install('path-to-the-untared-folder')
The below link helped me in finding out the solution.
R - shiny server on Ubuntu

Related

I cannot connect to shinyapps.io Publishing Account in R Studio. I see an error

I am not able to connect to my Publishing account on R studio.
I go to the path Tools -> Global Options -> Publishing -> Connect
I choose ShinyApps.io and I paste the command that I copied from shinyapps.io dashboard (command from STEP 2 – AUTHORIZE ACCOUNT)
I click on Connect Account but I see this error
I tried connecting from R Studio Console using rsconnect::setAccountInfo(name, token, secret) and I got the below error.
"Error in rbind(info, getNamespaceInfo(env, "S3methods")) :
number of columns of matrices must match (see arg 2)"
I tried connecting by disabling Firewall. It did not work.
I have tried looking online for other troubleshooting steps but I could not understand what the actual issue is.
Can you please help me?
I am using R studio Version 1.3.959 and R version 3.5.2
Check the error when you click connect.
It shows:
Error in the library.dynam(lib, package, package.lib):
DLL ‘openssl’ not found: maybe not installed for this architecture?
This error follows the instruction i.e install the given package. In my case 'OpenSSL' was missing so I installed it and it worked.

lazy-load database '../R/NymbulCredentials.rdb' is corrupt

I am trying to install a package from GitHub in support of deploying an app to shinyapps.io. If I download the package onto my machine, then it installs without issue. However, if I execute the command (in RStudio):
devtools::install_github(repo="rlmoore0/NMDeploy", subdir="NymbulCredentials")
then I get an error message: Error in (function (n) :
lazy-load database '../R/NymbulCredentials.rdb' is corrupt
This GitHub repo is public, so anyone can try running this command from within R/RStudio with devtools installed. I am on a Windows box running R 3.6.3, Win10.
Any suggestions?
I have looked at questions from other people with similar problems and based on the responses to them, I have tried:
Closing and restarting R/RStudio
Executing the command devtools::unload("NymbulCredentials")
Executing the command unloadNamespace("NymbulCredentials")
Removing the installation library the package is being installed to as referenced by .libPaths() and trying a fresh directory as the installation location.
The error still persists.

R Package installation on centOS 7 Server - http error

I am struggling to get a package installation via "install.packages("packagename") working on a centOS server using the latest R-Release. The server was setup with R Studio Server Pro.
Internet access is working in general. Package download works also, but after the download, the final installation of the package fails with the following error code:
Error: 163:6: unexpected '/'
163: http:/
I already checked that no requests are blocked with our firewall/proxy. The installation fails from within R Studio, R sessions itself and with all users on the server. It also fails for the central library and the users personal libraries.
Do you have any ideas what the issue might be?
Thanks
Christoph

ROracle not loading Instantclient library on MacOS High Sierra

I have installed Oracle Instant Client 12.1.0.2.0 and am now trying to install ROracle 1.3-1 for R with the following command:
R CMD INSTALL --configure-args='--with-oci-lib=/usr/local/oracle/instantclient12 --with-oci-inc=/usr/local/oracle/instantclient12/sdk/include' ROracle_1.3-1.tar.gz
The Oracle Instant Client is installed in /usr/local/oracle/instantclient12
Unfortunately, I am getting the following error at the end of the ROracle install and have been having a difficult time figuring out what is going wrong:
** testing if installed package can be loaded
Error: package or namespace load failed for ‘ROracle’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/ROracle/libs/ROracle.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/ROracle/libs/ROracle.so, 6): Library not loaded: #rpath/libclntsh.dylib.12.1
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/ROracle/libs/ROracle.so
Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/ROracle’
For whatever reason #rpath/libclntsh.dylib.12.1 can't be found and is preventing ROracle from being fully installed. I have tried putting a link to libclntsh.dylib.12.1 in ~/lib and /usr/lib but neither link worked. I have also tried pointing to the directory containing libclntsh.dylib.12.1 with the environment variables DYLD_FALLBACK_LIBRARY_PATH and DYLD_LIBRARY_PATH but those have not worked as well.
I am using MacOS High Sierra (10.13) and R 3.4.2.
The only way I have found so far to get around this problem is to put a link to libclntsh.dylib.12.1 in the framework lib directory for R. On my computer the R framework lib directory is located in /Library/Frameworks/R.framework/Resources/lib
My instant client is installed in /usr/local/oracle/instantclient12
So I use the following command to make the file link:
ln -s /usr/local/oracle/instantclient12/libclntsh.dylib.12.1 /Library/Frameworks/R.framework/Resources/lib/libclntsh.dylib.12.1
This resolves the ROracle install problem and I can now load the ROracle library in R without issue.

NuGet restore unable to connect & find version of package

When trying NuGet restore sometimes we get this Warning Message followed by Unable to find version,
cmd>NuGet restore My.sln -NoCache
WARNING: Unable to connect to the remote server
WARNING: Unable to connect to the remote server
Unable to find version '2.0.3930.0' of package 'DocumentFormat.OpenXml'.
Unable to find version '4.157.1212.0' of package 'Sybase.AdoNet4.AseClient'.
The above packages are available in the repository. This is an intermittent issue & can't be reproduce on demand.
The nexus repository is up and running. No issues found in the nexus logs.

Resources