chromedp failed to start, read: connection reset by peer - connection

My golang program using chromedp to fetch data from other website. The program is running for 2 weeks and everything looks fine. But all of sudden, it starts failed with the error message "connection reset by peer"
I run the docker image on local container and it also works. Not sure what is going on?
Below are the logs I took from the AWS cloudwatch.
2021-10-23T14:06:04.158+11:00 could not dial "ws://127.0.0.1:33355/devtools/browser/39d9dcb9-3f16-41a3-b280-4a5a6f514b65": read tcp 127.0.0.1:44026->127.0.0.1:33355: read: connection reset by peer
2021-10-23T14:06:08.615+11:00 RetrieveNewsAgain
2021-10-23T14:06:10.143+11:00 context canceled
2021-10-23T14:06:13.604+11:00 RetrieveNewsAgain
2021-10-23T14:06:14.423+11:00 context canceled
2021-10-23T14:06:17.127+11:00 load error, return
2021-10-23T14:06:17.127+11:00 Start GetNewsViaCrawlFromNews_2
2021-10-23T14:06:17.941+11:00 could not dial "ws://127.0.0.1:43919/devtools/browser/208ca3a5-05f3-4aa3-960b-d2cd7214c271": EOF
2021-10-23T14:06:20.648+11:00 RetrieveNewsAgain
2021-10-23T14:06:21.351+11:00 chrome failed to start:
2021-10-23T14:06:21.351+11:00 [1023/140620.658504:WARNING:resource_bundle.cc(403)] locale_file_path.empty() for locale
2021-10-23T14:06:21.351+11:00 [1023/140620.669605:WARNING:resource_bundle.cc(403)] locale_file_path.empty() for locale
2021-10-23T14:06:21.351+11:00 [1023/140620.674715:WARNING:resource_bundle.cc(403)] locale_file_path.empty() for locale
2021-10-23T14:06:21.351+11:00 [1023/140620.675904:ERROR:power_monitor_device_source_stub.cc(11)] Not implemented reached in virtual bool base::PowerMonitorDeviceSource::IsOnBatteryPower()
2021-10-23T14:06:21.351+11:00 [1023/140620.676378:INFO:content_main_runner_impl.cc(1100)] Chrome is running in full browser mode.
2021-10-23T14:06:21.351+11:00 [1023/140620.682206:ERROR:platform_thread_posix.cc(147)] pthread_create: Resource temporarily unavailable (11)
2021-10-23T14:06:21.351+11:00 [1023/140620.682641:ERROR:platform_thread_posix.cc(147)] pthread_create: Resource temporarily unavailable (11)
2021-10-23T14:06:21.351+11:00 [1023/140620.682663:ERROR:thread.cc(221)] failed to create thread
2021-10-23T14:06:21.351+11:00 [1023/140620.682676:FATAL:media_stream_manager.cc(759)] Check failed: video_capture_thread_->Start().
2021-10-23T14:06:21.351+11:00 #18 0x55a22072eb8d (/headless-shell/headless-shell+0x6715b8c)
2021-10-23T14:06:21.351+11:00 #19 0x7f27695ac09b __libc_start_main
2021-10-23T14:06:21.351+11:00 #20 0x55a21d3b902a _start
2021-10-23T14:06:21.351+11:00 Received signal 6
2021-10-23T14:06:21.351+11:00 #0 0x55a2207faac9 (/headless-shell/headless-shell+0x67e1ac8)
2021-10-23T14:06:21.351+11:00 #1 0x55a220737883 (/headless-shell/headless-shell+0x671e882)
2021-10-23T14:06:21.351+11:00 #2 0x55a2207fa551 (/headless-shell/headless-shell+0x67e1550)
2021-10-23T14:06:21.351+11:00 #3 0x7f2769af8730 (/lib/x86_64-linux-gnu/libpthread-2.28.so+0x1272f)
2021-10-23T14:06:21.351+11:00 #4 0x7f27695bf7bb gsignal
2021-10-23T14:06:21.351+11:00
2021-10-23T14:06:21.351+11:00 #5 0x7f27695aa535 abort

I guess you have encountered the zombie processes issue. Here are the suggestions copied from https://github.com/chromedp/chromedp/issues/894#issuecomment-892723178:
(for docker container) specify the init process to reap the zombie processes: https://docs.docker.com/engine/reference/run/#specify-an-init-process
try to use a single browser instance and create new tabs in it (instead of creating many browser instances)
See the reported issue for more information: https://github.com/chromedp/chromedp/issues/752

Related

an error occurs when starting the server : Bad state: Package file

aqueduct serve
-- Aqueduct CLI Version: 3.3.0+1
-- Aqueduct project version: 3.3.0+1
-- Preparing...
*** Uncaught error
Bad state: Package file 'file:///home/superuserfucker/Documents/Code/Flutter/srvrs/server/.packages' not found. Run 'pub get' and retry.
**** Stacktrace
#0 IsolateExecutor.execute (package:isolate_executor/src/executor.dart:25:7)
#1 IsolateExecutor.run (package:isolate_executor/src/executor.dart:94:21)
#2 CLIServer.deriveApplicationLibraryDetails (package:aqueduct/src/cli/commands/serve.dart:183:40)
#3 CLIServer.prepare (package:aqueduct/src/cli/commands/serve.dart:206:32)
#4 CLIServer.handle (package:aqueduct/src/cli/commands/serve.dart:87:11)
#5 CLICommand.process (package:aqueduct/src/cli/command.dart:159:20)
#6 main (file:///home/superuserfucker/.pub-cache/hosted/pub.dartlang.org/aqueduct-3.3.0+1/bin/aqueduct.dart:9:14)

Nebula Graph fails on CentOS 6.5

Nebula Graph fails on CentOS 6.5, the error message is as follows:
# storage log
Heartbeat failed, status:RPC failure in MetaClient: N6apache6thrift9transport19TTransportExceptionE: AsyncSocketException: connect failed, type = Socket not open, errno = 111 (Connection refused): Connection refused
# meta log
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
E0415 22:32:38.944437 15532 AsyncServerSocket.cpp:762] failed to set SO_REUSEPORT on async server socket Protocol not available
E0415 22:32:38.945001 15510 ThriftServer.cpp:440] Got an exception while setting up the server: 92failed to bind to async server socket: [::]:0: Protocol not available
E0415 22:32:38.945057 15510 RaftexService.cpp:90] Setup the Raftex Service failed, error: 92failed to bind to async server socket: [::]:0: Protocol not available
E0415 22:32:38.949586 15463 NebulaStore.cpp:47] Start the raft service failed
E0415 22:32:38.949597 15463 MetaDaemon.cpp:88] Nebula store init failed
E0415 22:32:38.949796 15463 MetaDaemon.cpp:215] Init kv failed!
Nebula service status is as follows:
[root#redhat6 scripts]# ./nebula.service status all
[WARN] The maximum files allowed to open might be too few: 1024
[INFO] nebula-metad: Exited
[INFO] nebula-graphd: Exited
[INFO] nebula-storaged: Running as 15547, Listening on 44500
Reason for error: CentOS 6.5 system kernel version is 2.6.32, which is less than 3.9. However, SO_REUSEPORT only supports Linux 3.9 and above.
Upgrading the system to CentOS 7.5 can solve the problem by itself.

Running a bitcoin node on regtest network fails

I'm trying to run a bitcoin network on regtest with this version of bitcoin node so I can test out bitpay's insight-ui block explorer.
Running on regtest I get this repeating error
Assertion failed: (psocket), function Shutdown, file zmq/zmqpublishnotifier.cpp, line 92.
[2017-05-19T00:42:44.515Z] warn: Bitcoin process unexpectedly exited with code: null
[2017-05-19T00:42:44.515Z] warn: Restarting bitcoin child process in 5000ms
[2017-05-19T00:42:49.516Z] info: Using bitcoin config file: /Users/harshagoli/BTCT/bitcoin.conf
[2017-05-19T00:42:49.517Z] warn: Stopping existing spawned bitcoin process with pid: 12690
[2017-05-19T00:42:49.517Z] warn: Unclean bitcoin process shutdown, process not found with pid: 12690
[2017-05-19T00:42:49.517Z] info: Starting bitcoin process
Which eventually becomes
[2017-05-19T00:42:54.133Z] error: RPCError: Bitcoin JSON-RPC: Request Error: connect ECONNREFUSED 127.0.0.1:8332
at Bitcoin._wrapRPCError (/Users/harshagoli/mynode/node_modules/bitcore-node/lib/services/bitcoind.js:449:13)
at /Users/harshagoli/mynode/node_modules/bitcore-node/lib/services/bitcoind.js:781:28
at ClientRequest.<anonymous> (/Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/bitcoind-rpc/lib/index.js:116:7)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:269:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1269:8)
at nextTickCallbackWith2Args (node.js:458:9)
[2017-05-19T00:42:54.133Z] info: Beginning shutdown
[2017-05-19T00:42:54.133Z] info: Stopping insight-ui (not started)
[2017-05-19T00:42:54.134Z] info: Stopping insight-api (not started)
[2017-05-19T00:42:54.134Z] info: Stopping web (not started)
[2017-05-19T00:42:54.135Z] info: Stopping bitcoind
After which I have the reoccurring error
[2017-05-19T00:42:54.221Z] error: Error: Stopping while trying to spawn bitcoind.
at /Users/harshagoli/mynode/node_modules/bitcore-node/lib/services/bitcoind.js:905:25
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:676:51
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:726:13
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:52:16
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:264:21
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:44:16
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:723:17
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:167:37
at /Users/harshagoli/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:652:25
at /Users/harshagoli/mynode/node_modules/bitcore-node/lib/services/bitcoind.js:887:16
Thoughts on how I can get this up and running with a block to look at so I can use the block explorer?
Okay I figured it out. What was happening is there were some other bitcoind processes that had zombied out and were listening on the port this process was trying to access. I ran this command to kill the other processes
killall -9 bitcoind
Also, to create more blocks on regtest (while in the your node directory) use this command.
./node_modules/bitcore-node/bin/bitcoin-0.12.1/bin/bitcoin-cli -datadir=/Users/harshagoli/mynode/data -regtest generate 150

Erlang version 18.0 and ejabberd nodename conflict

I wanted to install latest ejabberd from https://github.com/processone/ejabberd. For this, Erlang/OTP 18 is required. That too, i have manually installed from https://github.com/erlang/otp. Then, i need to start ejabberd server with command ejabberdctl start. But there is some error in that.
My mnesia node name is akash#akash-Latitude-3450 and ejabberd nodename is akash#localhost. Due to this, server is not getting started. How to resolve this conflict ?
Log ->
2016-01-07 18:38:20.410 [critical] <0.39.0>#ejabberd_app:db_init:125 Node name mismatch: I'm [ejabberd#localhost], the database is owned by ['ejabberd#akash-Latitude-3450']
2016-01-07 18:38:20.410 [critical] <0.39.0>#ejabberd_app:db_init:127 Either set ERLANG_NODE in ejabberdctl.cfg or change node name in Mnesia
2016-01-07 18:38:20.410 [error] <0.38.0> CRASH REPORT Process <0.38.0> with 0 neighbours exited with reason: node_name_mismatch in ejabberd_app:db_init/0 line 129 in application_master:init/4 line 134
You have two options:
name your Erlang node with the name matching your Mnesia database when you start ejabberd. As suggested by error message, it can be changed in var ERLANG_NODE in ejabberdctl.cfg.
Backup Mnesia database by starting the node under old name, do a fresh install and restore your data with node started with the new name.

cannot run my application on dart 1.6 release-stable and dart 1.7.0.dev_00_01

My application was being developed with 1.6.0-dev.09_07 and starting my application was done with no issue.
I switched to the 1.6.0.release-stable received the following error:
--- 8:03:25 AM Starting pub serve : epimss_design ---
Loading source assets...
Loading polymer/src/build/mirrors_remover, observe and smoke/src/default_transformer transformers...
'Unhandled exception:
Uncaught Error: SocketException: OS Error: The semaphore timeout period has expired.
, errno = 121, address = localhost, port = 58876
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:820)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:126)'
dart:isolate-patch/isolate_patch.dart 256 Isolate.spawnUri
e:%5Cb%5Cbuild%5Cslave%5Cdart-editor-win-stable%5Cbuild%5Cdart%5Csdk%5Clib%5C_internal%5Cpub%5Clib%5Csrc%5Cdart.dart 179 _isolateBuffer
dart:isolate-patch/isolate_patch.dart 219 _startIsolate.isolateStartHandler
dart:isolate-patch/isolate_patch.dart 122 _RawReceivePortImpl._handleMessage
I tried the 1.7.0.dev_00_01 release with the same error.
What has changed in the current stable release (1.6) and 1.7 dev streams to cause this.
I removed all DartEditor, pub and .dartium folders so not to have any legacy issues, but it still does not work.
I ran pub-upgrade on all apps with no errors - this suggest that my pubspec.lock and pubspec.yaml are OK.
Thanks

Resources