Shiny server Connection closed. Info: {"type":"close","code":4503,"reason":"The application unexpectedly exited","wasClean":true} - r

I've encountered a problem with deploying my shiny app on linux Ubuntu 16.04 LTS.
After I run sudo systemctl start shiny-server, and open up my browser heading to http://192.168..*:3838/StockVis/, the web page greys out in a second.
I found some warnings in the web console as below, and survey some information on the web for like two weeks, but still have no solution. :(
***"Thu Feb 16 2017 12:20:49 GMT+0800 (CST) [INF]: Connection opened. http://192.168.**.***:3838/StockVis/"
Thu Feb 16 2017 12:20:49 GMT+0800 (CST) [DBG]: Open channel 0
The application unexpectedly exited.
Diagnostic information is private. Please ask your system admin for permission if you need to check the R logs.
**Thu Feb 16 2017 12:20:50 GMT+0800 (CST) [INF]: Connection closed. Info: {"type":"close","code":4503,"reason":"The application unexpectedly exited","wasClean":true}
Thu Feb 16 2017 12:20:50 GMT+0800 (CST) [DBG]: SockJS connection closed
Thu Feb 16 2017 12:20:50 GMT+0800 (CST) [DBG]: Channel 0 is closed
Thu Feb 16 2017 12:20:50 GMT+0800 (CST) [DBG]: Removed channel 0, 0 left*****
Please kindly give some suggestions to move on.

This can indicate something in your R code is causing an error. As that R error could be anything, this answer is to help you gather that info. The browser console messages will not tell you what that is. In order to access the error, you need to configure Shiny to not delete the log upon exiting the application.
Assuming you have sudo access:
$ sudo vi /etc/shiny-server/shiny-server.conf
Place the following line in the file after run_as shiny; :
preserve_logs true;
Restart shiny:
sudo systemctl restart shiny-server
Reload your Shiny app.
In the var/log/shiny-sever/ directory there will be a log file with your application name. Viewing that file will give you more information on what is going on.
Warning. After you are done, take out the preserve_logs true; line in the conf file and restart Shiny. If not, you will start generating a bunch of log files you don't want.

Related

How to disable tracing in windows cmd

When I run commands in the Windows CMD terminal I see a lot of tracing information.
I have not specifically done anything to enable it.
After some commands (not all) - for example, dotnet. I get this message
Tracing enabled # Tue Mar 30 16:34:45 2021 GMT
--- Invoked dotnet [version: 5.0.4, commit hash: f27d33729518f5aa478aa818b7b4f54a4d50bef1] main = {
C:\Program Files\dotnet\dotnet.exe
}
for PowerShell I see similar
Tracing enabled # Tue Mar 30 15:29:02 2021 GMT
--- Invoked apphost [version: 5.0.4, commit hash: f27d33729518f5aa478aa818b7b4f54a4d50bef1] main = {
C:\Program Files\PowerShell\7\pwsh.exe
-WorkingDirectory
~
}
the question is how to disable this.
The solution is to change environment variable
COREHOST_TRACE=0
Not sure how it was changed on my computer :(.

Sonatype Nexus upgraded to 3.19.1 from 3.17.1 and wont start

I upgraded Sonatype Nexus to 3.19.1 from 3.17.1.
Now it wont start and I checked the logs.
Log says " Missing recipe: helm-proxy"
I did setup helm proxy plugin as per link Nexus Helm recipe
Complete log is below.
2019-11-01 15:29:45,358+1100 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl - Failed transition: NEW -> STARTED
java.lang.IllegalStateException: Missing recipe: helm-proxy
at com.google.common.base.Preconditions.checkState(Preconditions.java:585)
at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.recipe(RepositoryManagerImpl.java:161)
at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.newRepository(RepositoryManagerImpl.java:179)
at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.restoreRepositories(RepositoryManagerImpl.java:271)
at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.doStart(RepositoryManagerImpl.java:253)
at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:199)
at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:111)
at org.sonatype.nexus.extender.NexusContextListener.moveToPhase(NexusContextListener.java:311)
at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:208)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1431)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:748)
2019-11-01 15:29:45,379+1100 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Failed to start nexus
java.lang.IllegalStateException: Missing recipe: helm-proxy
at com.google.common.base.Preconditions.checkState(Preconditions.java:585)
at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.recipe(RepositoryManagerImpl.java:161)
at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.newRepository(RepositoryManagerImpl.java:179)
at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.restoreRepositories(RepositoryManagerImpl.java:271)
at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.doStart(RepositoryManagerImpl.java:253)
at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:199)
at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:111)
at org.sonatype.nexus.extender.NexusContextListener.moveToPhase(NexusContextListener.java:311)
at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:208)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1431)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:748)
Any idea whats going wrong.
If I choose a new empty data directory, Nexus starts. But I will lose my existing data.
Update
I was able to bring it up. Downloaded a fresh copy of nexus-repository-helm-0.0.12.jar file and nexus is back online.
However I still can't bring it up as a service. I have to execute nexus/bin/nexus start to get it up. No logs in nexus.log as well.
Log from journal -xe
Nov 01 16:54:29 lndevopsnx polkitd[867]: Unregistered Authentication Agent for unix-process:6536:123145 (system bus name :1.60, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Nov 01 16:54:29 lndevopsnx systemd[1]: Started nexus service.
-- Subject: Unit nexus.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nexus.service has finished starting up.
--
-- The start-up result is done.
Nov 01 16:54:29 lndevopsnx systemd[1]: nexus.service: main process exited, code=exited, status=255/n/a
Nov 01 16:54:30 lnpdevopsnx nexus[6732]: Shutting down nexus
Nov 01 16:54:30 lndevopsnx nexus[6732]: nexus is not running.
Nov 01 16:54:30 lndevopsnx systemd[1]: Unit nexus.service entered failed state.
I was able to bring it up. Downloaded a fresh copy of nexus-repository-helm-0.0.12.jar file and nexus is back online. However I still can't bring it up as a service. I have to execute nexus/bin/nexus start to get it up.

Configure URL on shiny server

I've been trying to start my shiny server with no success. I followed the instructions at RStudio site, but when I check my server status, this is what I get:
$ sudo systemctl status shiny-server
● shiny-server.service - ShinyServer
Loaded: loaded (/etc/systemd/system/shiny-server.service; enabled; vendor preset: disabled)
Active: deactivating (stop-post) since Mon 2018-04-30 21:16:03 -03; 2s ago
Process: 17672 ExecStart=/usr/bin/env bash -c exec /opt/shiny-server/bin/shiny-server >> /var/log/shiny-server.log 2>&1 (code=exited, status=0/SUCCESS)
Main PID: 17672 (code=exited, status=0/SUCCESS); : 17682 (sleep)
CGroup: /system.slice/shiny-server.service
└─control
└─17682 sleep 5
Apr 30 21:16:02 shiny.estatistica.ufrn.br systemd[1]: Started ShinyServer.
Apr 30 21:16:02 shiny.estatistica.ufrn.br systemd[1]: Starting ShinyServer...
But shiny.estatistica.ufrn.br is not my website! My website is shiny.estatistica.ccet.ufrn.br/ (there is a ccet in there). Notice that Apache is alive and running when ccet is added to the url.
So, what can I do to start my shiny server? I think there is something to do with the url without ccet, but I couldn't figure out how to fix it.
Shiny Server has nothing to do with Apache. The name shiny.estatistica.ufrn.br in the last two lines looks like your server's (machine) name and the missing ccet has nothing to do with Shiny Server.
To have http://shiny.estatistica.ccet.ufrn.br/ point to your shiny server, your local IT/network department will be able to help you, as it requires a http request on some sub-level of the ufrn.br-domain to be forwarded to your shiny server.
I would just erase disk and start over, else windup spending far too much "fixing" stuff which isn't how shiny wants to work.

Update to pyodbc 4 causes "Segmentation fault"

I have a Django+celery site running on Elastic Beanstalk that used pyodbc 3. Because of another issue, I had to update to pyodbc 4.
However, the web site starting giving error 500 and this is the information logged:
[Fri Feb 24 20:02:14.448536 2017] [core:notice] [pid 27978] AH00052: child pid 28292 exit signal Segmentation fault (11)
[Fri Feb 24 20:02:15.145503 2017] [core:error] [pid 27988] [client 205.165.34.225:50040] End of script output before headers: wsgi.py, referer: ...
During that time the Celery worker was still running and working just fine! I've re-deployed the whole server (Rebuild Environment in AWS) and it didn't fix the issue.
I had to revert to pyodbc 3 and it started working just fine. Any ideas?
django 1.10.4, pyodbc 4.0.11, django-pyodbc-azure 1.10.0.1
We have run into this issue as well, and will be providing a stack trace and related information to pyodbc on Monday. We've fixed it by pinning our requirements like this:
pyodbc==3.1.1
django-pyodbc-azure==1.10.4.0
While this doesn't get you pyodbc 4.0 yet, it will work for the rest of your site. We had some luck using 4.0.5 for running the site, but ran into some issues with migrations. (Note: if you use django-pyodbc-azure, you should use the highest version that matches your Django version, I.e. 1.10.4.0 for Django 1.10.)
Good luck!

No log files to process endeca

I want to create a diary report with endeca, so I have log server running at 15010 [port], but when I start [WeeklyReportGenerator] seems something is wrong I think because I have an error with log server, I check log and this is error:
Oct 12, 2012 10:19:17 AM com.endeca.forge.base.Pipeline$Engine$1 handle
WARNING: Error in pipeline: No log files to process
Oct 12, 2012 10:19:17 AM com.endeca.rg.components.input.FileSystemMultiInput$Engine$Statistics log
INFO: LogFileInput/FileSystemInput/com.endeca.rg.components.input.FileSystemMultiInput: Progress: 1/1 (100%), 0:00:00 remaining
Oct 12, 2012 10:19:17 AM com.endeca.rg.ReportGenerator main
SEVERE: Unable to proceed
Pipeline execution interrupted by exception
No log files to process
java.lang.RuntimeException: No log files to process
at com.endeca.rg.components.input.LogFileInput$Substitution$1$Engine.portClosed(LogFileInput.java:269)
Some clue about what is wrong?
The reporting processes need log files in order to produce reports. By default, no log messages are sent to the log server.
If you look at the orange reference app (http://:8006/endeca_jspref ) you'll see that it does implement logging. If you look at the logging_functions.jsp, you can see a good basic implementation of how to send log messages ( C:\Endeca\ToolsAndFrameworks\11.1.0\reference\endeca_jspref\logging_functions.jsp )
If you're using the Assembler API, it will handle most logging for you. Make sure you have the correct hostname and port configured. If you need to extend or replace the logging, look for the com.endeca.infront.navigation.event.LogServerAdapter in the assembler-context.xml.

Resources