Unable to Restart R Session without End Task from Task Manager - javascript

I am running RStudio 2022.12.0, Build 353; and R 4.2.2 I am unable to restart an R session. The process just "hangs". The only way I can quit is to open Task Manager and End the process called "Deno: A secure runtime for javaScdript and TypeScript." Ending this task will terminate R. I have zero knowledge about JavaScript. When I try to render reprex, I get the error:
reprex:::reprex_addin()
Loading required package: shiny
ℹ Rendering reprex...
Error in parse(text = x, keep.source = TRUE) :
<text>:8:1: unexpected input
7:
8: ＀
^

Related

Exception when starting axelor-erp, web on eclipse

I’m running at the first time axelor-erp (web project) on eclipse. I downloaded code from github, configured PostGreSql and then started the project using gradle.
When starting, I got this exception: Exception starting filter [guiceFilter]
org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [com.axelor.apps.base.tracking.GlobalAuditInterceptor] as strategy [org.hibernate.Interceptor]
Any help please?
Exception starting filter [guiceFilter]
org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [com.axelor.apps.base.tracking.GlobalAuditInterceptor] as strategy [org.hibernate.Interceptor]
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:126)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:194)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveDefaultableStrategy(StrategySelectorImpl.java:152)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveDefaultableStrategy(StrategySelectorImpl.java:139)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:133)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl$SessionFactoryOptionsStateStandardImpl.determineInterceptor(SessionFactoryBuilderImpl.java:794)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl$SessionFactoryOptionsStateStandardImpl.<init>(SessionFactoryBuilderImpl.java:610)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.<init>(SessionFactoryBuilderImpl.java:81)
at org.hibernate.boot.internal.MetadataImpl.getSessionFactoryBuilder(MetadataImpl.java:135)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:885)
at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
at com.google.inject.persist.jpa.JpaPersistService.start(JpaPersistService.java:110)
at com.google.inject.persist.PersistFilter.init(PersistFilter.java:77)
at com.google.inject.servlet.FilterDefinition.init(FilterDefinition.java:110)
at com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:98)
at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:232)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:106)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4548)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5193)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2020-11-09 15:16:35.794 ERROR 11680 --- [ost-startStop-1] o.apache.catalina.core.StandardContext : One or more Filters failed to start. Full details will be found in the appropriate container log file
2020-11-09 15:16:35.794 ERROR 11680 --- [ost-startStop-1] o.apache.catalina.core.StandardContext : Context [/axelor-erp] startup failed due to previous errors
The back-end modules are not well configured with the project.

React-Native app hangs on splash on iOS, but on on Android works just fine

I have the app that uses React-Native 0.62.3 and it does not run on iOS. It launches, receives the bundle from metro and does nothing but keeps showing the splash screen. Here's the run log:
flipper: FlipperClient::addPlugin Inspector
flipper: FlipperClient::addPlugin Preferences
flipper: FlipperClient::addPlugin React
flipper: FlipperClient::addPlugin Network
2020-10-15 15:30:32.116261+0300 fastboss_mobile_rn[60669:792251] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000aebe00> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2020-10-15 15:30:32.326978+0300 fastboss_mobile_rn[60669:793032] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed
2020-10-15 15:30:32.410529+0300 fastboss_mobile_rn[60669:792251] [native] Running application fastboss_mobile_rn ({
initialProps = {
};
rootTag = 1;
})
2020-10-15 15:30:39.443156+0300 fastboss_mobile_rn[60669:793034] [connection] nw_socket_handle_socket_event [C6.1:1] Socket SO_ERROR [61: Connection refused]
2020-10-15 15:30:39.450465+0300 fastboss_mobile_rn[60669:793034] [connection] nw_socket_handle_socket_event [C6.2:1] Socket SO_ERROR [61: Connection refused]
2020-10-15 15:30:39.452317+0300 fastboss_mobile_rn[60669:793033] [connection] nw_connection_get_connected_socket [C6] Client called nw_connection_get_connected_socket on unconnected nw_connection
2020-10-15 15:30:39.452482+0300 fastboss_mobile_rn[60669:793033] TCP Conn 0x600003cf4a50 Failed : error 0:61 [61]
2020-10-15 15:30:39.975074+0300 fastboss_mobile_rn[60669:793119] [javascript] Require cycle: components/Dashboard/content/index.js -> components/Dashboard/content/Customers.js -> components/Dashboard/content/index.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-10-15 15:30:39.980483+0300 fastboss_mobile_rn[60669:793119] [javascript] Require cycle: components/Dashboard/index.js -> components/Dashboard/Menu.js -> components/Dashboard/index.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-10-15 15:30:39.986365+0300 fastboss_mobile_rn[60669:793119] [javascript] Require cycle: components/index.js -> components/Dashboard/index.js -> components/index.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-10-15 15:30:40.029406+0300 fastboss_mobile_rn[60669:793119] [javascript] Running "fastboss_mobile_rn" with {"rootTag":1,"initialProps":{}}
2020-10-15 15:30:40.166056+0300 fastboss_mobile_rn[60669:793284] [native] Manifest does not exist - creating a new one.
(null)
2020-10-15 15:30:40.236534+0300 fastboss_mobile_rn[60669:793119] [javascript] 'token on start up:', null
I've tried to google about nw_socket_handle_socket_event [C6.1:1] Socket SO_ERROR [61: Connection refused], but for me it seems like all the reasults are about this line being looped, but in my case it appears only 2 times.
Also the last log string is console.log() from the app, so i guess it kinda tries to work, i don't know..
I'd be pretty happy if you could tell me what is possibly wrong, because I ran out of ideas what can I do about it
xcode v12.0.1
ios 14 simulator
If I can provide any useful for you info, let me know
I ran into this issue and noticed it was because my iPhone and my Mac running XCode were on different WiFi networks. Verify that both devices are on the same network.

AWS IoT Core - How to enable infinite reconnection after connection loss (MQTT)

I am using aws-iot-device-sdk-js-v2 primarly on Raspberry PI and for testing purposes on Windows 10.
I am connecting to AWS like this:
const client_bootstrap = new io.ClientBootstrap();
let config_builder = iot.AwsIotMqttConnectionConfigBuilder.new_mtls_builder_from_path(config.aws.cert_path, config.aws.key_path);
config_builder.with_certificate_authority_from_path(undefined, config.aws.root_ca_path);
config_builder.with_clean_session(false);
config_builder.with_client_id(config.aws.thing_name);
config_builder.with_endpoint(config.aws.iot_endpoint);
const mqttConfig = config_builder.build();
const client = new mqtt.MqttClient(client_bootstrap);
connection = client.new_connection(mqttConfig);
shadow = new iotshadow.IotShadowClient(connection);
thingName = config.aws.thing_name;
return connection.connect();
Everything works perfectly when there is connection. If i disconnect from internet, after sometime (20-30 seconds) i will get interrupt event with the following error:
CrtError: aws-c-io: AWS_IO_SOCKET_CLOSED, socket is closed.
at MqttClientConnection._on_connection_interrupted (/home/mstupar/device/node_modules/aws-crt/dist/native/mqtt.js:334:32)
at /home/mstupar/device/node_modules/aws-crt/dist/native/mqtt.js:114:113 {
error: 1051,
error_code: 1051,
error_name: 'AWS_IO_SOCKET_CLOSED'
}
If I connect to internet after this interrupt, i will get an unhandled exception with the following stacktrace:
################################################################################
Resolved stacktrace:
################################################################################
0x00007fc3193b781b: ?? ??:0
0x00000000000b1383: s_print_stack_trace at module.c:?
0x00000000000128a0: __restore_rt at ??:?
0x00007fc31c4bef47: ?? ??:0
0x00007fc31c4c08b1: ?? ??:0
node() [0x95c589]
node(napi_acquire_threadsafe_function+0x27) [0x9cf1e7]
0x00007fc3192f1931: ?? ??:0
0x00000000000b4306: s_on_connection_resumed at mqtt_client_connection.c:?
0x00000000000de34c: s_packet_handler_connack at client_channel_handler.c:?
0x00000000000dee9e: s_process_read_message at client_channel_handler.c:?
0x000000000011269d: s_s2n_handler_process_read_message at s2n_tls_channel_handler.c:?
0x0000000000113bbe: s_do_read at socket_channel_handler.c:?
0x00000000001141f2: s_on_readable_notification at socket_channel_handler.c:?
0x0000000000110a5a: s_on_socket_io_event at socket.c:?
0x000000000010bb9a: s_main_loop at epoll_event_loop.c:?
0x0000000000177c1b: thread_fn at thread.c:?
0x00000000000076db: start_thread at ??:?
0x00007fc31c5a1a3f: ?? ??:0
################################################################################
Raw stacktrace:
################################################################################
/home/mstupar/device/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(aws_backtrace_print+0x4b) [0x7fc3193b781b]
/home/mstupar/device/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(+0xb1383) [0x7fc3192f1383]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0) [0x7fc31c8928a0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7) [0x7fc31c4bef47]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141) [0x7fc31c4c08b1]
node() [0x95c589]
node(napi_acquire_threadsafe_function+0x27) [0x9cf1e7]
/home/mstupar/device/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(aws_napi_queue_threadsafe_function+0x11) [0x7fc3192f1931]
/home/mstupar/device/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(+0xb4306) [0x7fc3192f4306]
/home/mstupar/device/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(+0xde34c) [0x7fc31931e34c]
/home/mstupar/device/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(+0xdee9e) [0x7fc31931ee9e]
/home/mstupar/device/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(+0x11269d) [0x7fc31935269d]
/home/mstupar/device/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(+0x113bbe) [0x7fc319353bbe]
/home/mstupar/device/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(+0x1141f2) [0x7fc3193541f2]
/home/mstupar/device/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(+0x110a5a) [0x7fc319350a5a]
/home/mstupar/device/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(+0x10bb9a) [0x7fc31934bb9a]
/home/mstupar/device/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(+0x177c1b) [0x7fc3193b7c1b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7fc31c8876db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fc31c5a1a3f]
Is it possible to avoid AWS_IO_SOCKET_CLOSED with additional configuration?
How should I properly reconnect? Is there some automatic way like socket.io has.
The device should be able to run at least 1 day without restart. In that day, multiple connection losses may occur. Process restart with systemd is not good solution for this case because i am running some other modules in the same process that should not be affected with connection loss.
Is there any additional configuration needed for MqttClientConnection?
Should I call some functions from interrupt to resume connection manually?
Thanks in advance

what's the best practice to control linux process from web page( Rails)?

currently I am facing to a problem that: we need to control the linux scripts running in background from web page. e.g. we could start/stop a 'script' via the button on the webpage.
also another good example is:
I am an expert of web development, and very familiar with javascript(setTimeout to refresh the progress), ruby on rails.
thanks a lot.
if it is linux systems then you could use
system(path_to_script.sh)
or
`path_to_script.sh`
in your controller
thanks to #xvidun, I found the solution: using god.
the key process is: how to make a non-daemon process start as a daemon. "nohup ... &" doesn't work for me. so I tried god and it is great!
in my case, the process I want to run is:
$ cd /sg552/workspace/m-video-fetcher
$ nohup ruby script/start_fetch.rb &
here is how I did the job:
step1 : create a god config file:
# file name: fetcher.god
RAILS_ROOT = '/sg552/workspace/m-video-fetcher'
God.watch do |w|
w.name = 'fetcher'
w.dir = RAILS_ROOT
w.start = "ruby script/start_fetch.rb"
w.log = "#{RAILS_ROOT}/fetcher_stdout.log"
w.keepalive
end
step2:
$ god start -c fetcher.god
step3:
# in the view, give users the interface to restart this job.
<a href='/settings/restart_fetch_for_all_plans'>restart</A>
# in the controller:
def restart_fetch_for_all_plans
result = `god stop fetcher && god start fetcher`
redirect_to :back, :notice => "fetcher restarted, #{result}"
end

Node.js, Cygwin and Socket.io walk into a bar... Node.js throws ENOBUFS and everyone dies

I'm hoping someone here can help me out, I'm not having much luck figuring this out myself. I'm running node.js version 0.3.1 on Cygwin. I'm using Connect and Socket.io. I seem to be having some random problems with DNS or something, I haven't quite figured it out. The end result is that I the server is running fine, but when a browser attempts to connect to it the initial HTTP Request works, Socket.io connects, and then the server dies (output below).
I don't think it has anything to do with the HTTP request because the server gets a lot data posted to it, and it was receiving requests and responding up until my connection that killed it. I've googled around and the closest thing I've found is DNS being set improperly. It's a network program meant to run only on an internal network, so I've set the nameserver x.x.x.x in my /etc/resolv.conf to the internal DNS. I've also added nameserver 8.8.8.8 in addition. I'm not sure what else to check, but would be grateful of any help.
In node.exe.stackdump
Exception: STATUS_ACCESS_VIOLATION at eip=610C51B9
eax=00000000 ebx=00000001 ecx=00000000 edx=00000308 esi=00000000 edi=010FCCB0
ebp=010FCAEC esp=010FCAC4 program=\\?\E:\cygwin\usr\local\bin\node.exe, pid 3296, thread unknown (0xBEC)
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
010FCAEC 610C51B9 (00000000, 00000000, 00000000, 00000000)
010FCBFC 610C5B55 (00000000, 00000000, 00000000, 00000000)
010FCCBC 610C693A (FFFFFFFF, FFFFFFFF, 750334F3, FFFFFFFE)
010FCD0C 61027CB2 (00000002, F4B994D5, 010FCE64, 00000002)
010FCD98 76306B59 (00000002, 010FCDD4, 763069A4, 00000002)
End of stack trace
Node Output:
node.js:50
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: ENOBUFS, No buffer space available
at doConnect (net.js:642:19)
at net.js:803:9
at dns.js:166:30
at IOWatcher.callback (dns.js:48:15)
EDIT
I'm hitting an LDAP server using http.createClient immediately after a client connects to get information, and that seems to be where the problem is that is causing ENOBUFS. I've edited the source to include && errno != ENOBUFS which now prevents the server from dying, however now the LDAP request isn't working. I'm not sure what the problem is that would cause that though. As I mentioned this is an internal only application, so I set the DNS servers in /etc/resolv.conf to the DNS servers that are being applied to the host machine. Not sure if this is part of the issue?
EDIT 2
Here's some output from gdb --args ./node_g --debug ../myscript.js. I'm not sure if this is related to ENOBUFS, however, as it seems to be disconnecting immediately after connection with Socket.io
[New thread 672.0x100]
Error: dll starting at 0x76e30000 not found.
Error: dll starting at 0x76250000 not found.
Error: dll starting at 0x76e30000 not found.
Error: dll starting at 0x76f50000 not found.
[New thread 672.0xc90]
[New thread 672.0x448]
debugger listening on port 5858
[New thread 672.0xbf4]
14 Jan 18:48:57 - socket.io ready - accepting connections
[New thread 672.0xed4]
[New thread 672.0xd68]
[New thread 672.0x1244]
[New thread 672.0xf14]
14 Jan 18:49:02 - Initializing client with transport "websocket"
assertion "b[1] == 0" failed: file "../src/node.cc", line 933, function: ssize_t
node::DecodeWrite(char*, size_t, v8::Handle<v8::Value>, node::encoding)
Program received signal SIGABRT, Aborted.
0x7724f861 in ntdll!RtlUpdateClonedSRWLock ()
from /cygdrive/c/Windows/system32/ntdll.dll
(gdb) backtrace
#0 0x7724f861 in ntdll!RtlUpdateClonedSRWLock ()
from /cygdrive/c/Windows/system32/ntdll.dll
#1 0x7724f861 in ntdll!RtlUpdateClonedSRWLock ()
from /cygdrive/c/Windows/system32/ntdll.dll
#2 0x75030816 in WaitForSingleObjectEx ()
from /cygdrive/c/Windows/syswow64/KernelBase.dll
#3 0x0000035c in ?? ()
#4 0x00000000 in ?? ()
(gdb)
OK, I digged around a bit, and after your second edit I found this bug on the issue list.
I doesn't state whether this was encountered under cygwin or not, but the error that it is hitting leads down to this piece of code:
uint16_t * twobytebuf = new uint16_t[buflen];
str->Write(twobytebuf, 0, buflen, String::HINT_MANY_WRITES_EXPECTED);
for (size_t i = 0; i < buflen; i++) {
unsigned char *b = reinterpret_cast<unsigned char*>(&twobytebuf[i]);
assert(b[1] == 0); // this assertion fails
buf[i] = b[0];
}
From what I can read (with my rusted C) it will convert it will create a new uin16 array and write the contents of the V8 string in their, then it will ensure that casting did not write any values outside the range of 0 - 255, and that's exactly what fails here.
I couldn't find anything regarding whether this is a V8 issue or not.
Since the code was added in this commit, the only thing I can suggest here is to try pulling the tree from a commit before the code was added. Since all versions after that have the crashing code.
If that works, I would recommend you to file another bug report on the issue Node.js issue list, although I made do this later this day.
Very hard to answer this one but +1 for the subject line.
Node.js comes with a test suite along with the main build, have you run that? I had built node successfully but because I'd omitted OpenSSL my web socket tests were failing. Install/rebuild fixed it. The test projects helped me diagnose the issue.
suggest doing "make test" as http://nodejs.org/#download describes.

Categories

Resources