Rikulo-Stream crashes daily with -"SocketException: OS Error: Broken pipe, errno = 32" - rikulo

I have a simple web app (http://www.webdungeon2.org) (6 pages) running on the latest (April 2014) version of Rikulo Stream (Ubuntu 13.04), Dart 1.2 and I get the following error when browsing (i think):
Uncaught Error: SocketException: OS Error: Broken pipe, errno = 32, address = 0.0.0.0, port = 80
Unhandled exception:
SocketException: OS Error: Broken pipe, errno = 32, address = 0.0.0.0, port = 80
#0 _rootHandleUncaughtError.<anonymous closure>.<anonymous closure> (dart:async/zone.dart:700)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#3 _asyncRunCallback (dart:async/schedule_microtask.dart:36)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:119)
The server crashes and then I restart it. This has happened 3 times in 3 days.
I also get these (which do NOT crash the site):
2014-04-09 15:07:33.394:stream:5
SHOUT: [/MY_WEB_PAGE] HttpException: Trying to set 'Transfer-Encoding: Chunked' on HTTP 1.0 headers
#0 _HttpHeaders.chunkedTransferEncoding= (http_headers.dart:142)
#1 Rsp.init (package:stream/src/rsp_util.dart:25:15)
#2 demo (file:///mytool/webdungeon/web/webapp/demo.rsp.dart:10:16)
#3 _StreamServer._handle (package:stream/src/server_impl.dart:92:39)
#4 _StreamServer._startChannel.<anonymous closure>.<anonymous closure> (package:stream/src/server_impl.dart:310:16)
#5 _rootRunUnary (dart:async/zone.dart:717)
#6 _ZoneDelegate.runUnary (dart:async/zone.dart:449)
#7 _CustomizedZone.runUnary (dart:async/zone.dart:654)
#8 _BaseZone.runUnaryGuarded (dart:async/zone.dart:569)
......
......
Any suggestions?
UPDATE - 12 April
Problem still occurs on Dart 1.3, but error code is different
Uncaught Error: SocketException: OS Error: Connection reset by peer, errno = 104, address = 0.0.0.0, port = 80
Unhandled exception:
SocketException: OS Error: Connection reset by peer, errno = 104, address = 0.0.0.0, port = 80
#0 _rootHandleUncaughtError.<anonymous closure>.<anonymous closure> (dart:async/zone.dart:713)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#3 _asyncRunCallback (dart:async/schedule_microtask.dart:36)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:119)
Serge
UPDATE - 28 April
The problem seems to have been resolved in Dart SDK version 1.3.3. My server has been running for 2 days without a hitch.
Serge

Did you upgrade to Dart 1.3? The problem shall be caused by Issue 17468, and it was fixed in Dart 1.3.
For the issue of HttpException...Chunked, I don't have the experience of it. You have to check Dart API, or make a simple case to reproduce the issue.

The fix for issue 17468 contained a bug. Streams belongs to the zone where they are listened to, not created. I've fixed this mistake with r35071.
While this will not fix the 1.3 binary, it should be possible to check out the 1.3 source and apply this patch.

Related

Getting 'unknown error: net::ERR_CONNECTION_CLOSED' Error running webdriver in Docker Linux

I am trying to web scrape my companies website. To speed up, I have used Asynchronous Web Scraping library Arsenic.
When I run this Code I see mutliple drivers are spawned at different local ports.
Starting ChromeDriver 109.0.5414.74 (e7c5703604daa9cc128ccf5a5d3e993513758913-refs/branch-heads/5414#{#1172}) on port 59479
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
[1674821791.415][SEVERE]: bind() failed: Cannot assign requested address (99)
ChromeDriver was started successfully.
Starting ChromeDriver 109.0.5414.74 (e7c5703604daa9cc128ccf5a5d3e993513758913-refs/branch-heads/5414#{#1172}) on port 40633
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
[1674821791.853][SEVERE]: bind() failed: Cannot assign requested address (99)
ChromeDriver was started successfully.
Starting ChromeDriver 109.0.5414.74 (e7c5703604daa9cc128ccf5a5d3e993513758913-refs/branch-heads/5414#{#1172}) on port 47115
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
[1674821791.952][SEVERE]: bind() failed: Cannot assign requested address (99)
ChromeDriver was started successfully.
Starting ChromeDriver 109.0.5414.74 (e7c5703604daa9cc128ccf5a5d3e993513758913-refs/branch-heads/5414#{#1172}) on port 58835
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
[1674821792.358][SEVERE]: bind() failed: Cannot assign requested address (99)
ChromeDriver was started successfully.
Note: The bind() failed error is a non-issue here as the chromeDriver started succesfully despite this error.
It works but after scraping some urls it is giving an Error, which I am not able to understand.
2023-01-27 12:16.44 [error ]
error data={'error': 'unknown error', 'message': 'unknown error: net::ERR_CONNECTION_CLOSED\n (Session info: headless chrome=109.0.5414.119)', 'stacktrace': '#0 0x55e6edd7e303 <unknown>\n#1 0x55e6edb52d37 <unknown>\n#2 0x55e6edb4ad85 <unknown>\n#3 0x55e6edb3df87 <unknown>\n#4 0x55e6edb3f4e9 <unknown>\n#5 0x55e6edb3e2fe <unknown>\n#6 0x55e6edb3d432 <unknown>\n#7 0x55e6edb3d285 <unknown>\n#8 0x55e6edb3bc77 <unknown>\n#9 0x55e6edb3c2a4 <unknown>\n#10 0x55e6edb54c48 <unknown>\n#11 0x55e6edbc7f15 <unknown>\n#12 0x55e6edbaf982 <unknown>\n#13 0x55e6edbc788c <unknown>\n#14 0x55e6edbaf753 <unknown>\n#15 0x55e6edb82a14 <unknown>\n#16 0x55e6edb83b7e <unknown>\n#17 0x55e6eddcd32e <unknown>\n#18 0x55e6eddd0c0e <unknown>\n#19 0x55e6eddb3610 <unknown>\n#20 0x55e6eddd1c23 <unknown>\n#21 0x55e6edda5545 <unknown>\n#22 0x55e6eddf26a8 <unknown>\n#23 0x55e6eddf2836 <unknown>\n#24 0x55e6ede0dd13 <unknown>\n#25 0x7fae53b0fea5 start_thread\n'} message=unknown error: net::ERR_CONNECTION_CLOSED
(Session info: headless chrome=109.0.5414.119) stacktrace=#0 0x55e6edd7e303 <unknown>
#1 0x55e6edb52d37 <unknown>
#2 0x55e6edb4ad85 <unknown>
#3 0x55e6edb3df87 <unknown>
#4 0x55e6edb3f4e9 <unknown>
#5 0x55e6edb3e2fe <unknown>
#6 0x55e6edb3d432 <unknown>
#7 0x55e6edb3d285 <unknown>
#8 0x55e6edb3bc77 <unknown>
#9 0x55e6edb3c2a4 <unknown>
#10 0x55e6edb54c48 <unknown>
#11 0x55e6edbc7f15 <unknown>
#12 0x55e6edbaf982 <unknown>
#13 0x55e6edbc788c <unknown>
#14 0x55e6edbaf753 <unknown>
#15 0x55e6edb82a14 <unknown>
#16 0x55e6edb83b7e <unknown>
#17 0x55e6eddcd32e <unknown>
#18 0x55e6eddd0c0e <unknown>
#19 0x55e6eddb3610 <unknown>
#20 0x55e6eddd1c23 <unknown>
#21 0x55e6edda5545 <unknown>
#22 0x55e6eddf26a8 <unknown>
#23 0x55e6eddf2836 <unknown>
#24 0x55e6ede0dd13 <unknown>
#25 0x7fae53b0fea5 start_thread
status=500 type=<class 'arsenic.errors.UnknownError'>
failed getting session
I am running this in Docker using Linux RHEL 7 image.
Python 3.8
Arsenic 21.8
Chrome v109
ChromeDriver v109
Here Is the Code.
import asyncio
from arsenic import get_session, stop_session, browsers, services
def initialize_webdriver():
service = services.Chromedriver(binary=os.environ.get('CHROMEDRIVER_PATH'))
browser = browsers.Chrome()
browser.capabilities = {
"goog:chromeOptions": {"args": ["--no-sandbox", "--headless", "--verbose",
"--disable-gpu", "--disable-web-security", "--allow_insecure_localhost",
"--disable-dev-shm-usage", "--enable-javascript",
f"--proxy-server={os.environ.get('http_proxy')}"
]
}
}
return service, browser
async def scraper(limit, service, browser, url):
async with limit:
try:
async with get_session(service, browser) as session:
# print("inside scraper")
await session.get(url)
try:
<code to get web elements>
return results
except asyncio.TimeoutError as msg:
print("failed scraping url ", url)
await stop_session(session)
print(msg)
return []
except (arsenic.errors.UnknownArsenicError, arsenic.errors.UnknownError, arsenic.errors.ArsenicError)as msg:
print("failed getting session")
global failed_urls
failed_urls.append(urls)
limit.release()
return []
async def run(service, browser, urls):
limit = asyncio.Semaphore(30)
results = await asyncio.gather(*[scraper(limit, service, browser,
url) for url in urls)])
print(results)
if __name__ == "__main__":
failed_urls = []
urls = extract_urls() # it collects urls from website's sitemap url
service, browser = initialize_webdriver()
asyncio.run(run(service, browser, urls))
After reducing the semaphore to 20, I am getting the same issue.
Need to understand why this error is occurring and how to resolve this.
I ran into a problem of a slightly different nature "ERR_CONNECTION_REFUSED", but under similar conditions (Docker).
I wrote the field with value "80" in my nginx setting in docker-compose.yaml(you can see it on the picture).
And I also added "127.0.0.1:8000" to my uwsgi file.ini because i was sending some requests to this IP.
May be you should try to look for solution in docker/uwsgi or in their relationship between each other.

Android Studio - Relay for Figma plugin - Figma Importer error

I have been using the Relay for Figma plugin in Android Studio.
Two days ago, I started receiving an error and I have not been able import the Figma file.
Android Studio Dolphin | 2021.3.1 Patch 1 Build #AI-213.7172.25.2113.9123335
JDK: 11.0.13; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
OS: Windows 10
Plugin to blame: Relay for Android Studio version: 0.3.01
This is the Adroid Studio error log:
`
INFO - o.plugin.importer.FigmaService - fetching UI Package from Figma
WARN - o.plugin.importer.FigmaService - Unable to set permissions on C:\Users\developer\AppData\Roaming\Google\AndroidStudio2021.3\plugins\relay_android_studio\bin\win64\figma_to_adin: null
INFO - .plugin.utilities.ShellCommand - Running shell command: C:\Users\developer\AppData\Roaming\Google\AndroidStudio2021.3\plugins\relay_android_studio\bin\win64\figma_to_adin
INFO - .plugin.utilities.ShellCommand - Shell command returned value: 2
INFO - .plugin.utilities.ShellCommand - Shell command stdOut:
INFO - .plugin.utilities.ShellCommand - Shell command stdErr: Severe: Failed to transform https://www.figma.com/file/8lPrZW0qV8DVxbeDuTpWVw/HelloFigma?node-id=0%3A1&t=F47q81Q6Ir5WFqex-1&version-id=2763233317:
NoSuchMethodError: The getter 'entries' was called on null.
Receiver: null
Tried calling: entries
#0 _componentsFromJson (package:figma_to_adin/src/figma_client.dart:392)
#1 _$FileResponseFromJson (package:figma_to_adin/src/figma_client.g.dart:17)
#2 new FileResponse.fromJson (package:figma_to_adin/src/figma_client.dart:343)
#3 FigmaClient.getFile (package:figma_to_adin/src/figma_client.dart:80)
<asynchronous suspension>
#4 FigmaRestDataResolver.resolveAll (package:figma_to_adin/src/figma_data.dart:172)
<asynchronous suspension>
#5 resolveUIPackagesSet (package:figma_to_adin/src/figma_resolver.dart:31)
<asynchronous suspension>
#6 main (file:///t:/src/git/montage/figma_to_adin/bin/figma_to_adin.dart:111)
<asynchronous suspension>
ERROR - gin.importer.FigmaImportWorker - null
com.google.relay.androidstudio.plugin.importer.FigmaServiceException: Command:
C:\Users\developer\AppData\Roaming\Google\AndroidStudio2021.3\plugins\relay_android_studio\bin\win64\figma_to_adin
Stack Trace:
Severe: Failed to transform https://www.figma.com/file/8lPrZW0qV8DVxbeDuTpWVw/HelloFigma?node-id=0%3A1&t=F47q81Q6Ir5WFqex-1&version-id=2763233317:
NoSuchMethodError: The getter 'entries' was called on null.
Receiver: null
Tried calling: entries
#0 _componentsFromJson (package:figma_to_adin/src/figma_client.dart:392)
#1 _$FileResponseFromJson (package:figma_to_adin/src/figma_client.g.dart:17)
#2 new FileResponse.fromJson (package:figma_to_adin/src/figma_client.dart:343)
#3 FigmaClient.getFile (package:figma_to_adin/src/figma_client.dart:80)
<asynchronous suspension>
#4 FigmaRestDataResolver.resolveAll (package:figma_to_adin/src/figma_data.dart:172)
<asynchronous suspension>
#5 resolveUIPackagesSet (package:figma_to_adin/src/figma_resolver.dart:31)
<asynchronous suspension>
#6 main (file:///t:/src/git/montage/figma_to_adin/bin/figma_to_adin.dart:111)
<asynchronous suspension>
at com.google.relay.androidstudio.plugin.importer.FigmaService.importFile(FigmaService.kt:279)
at com.google.relay.androidstudio.plugin.importer.FigmaService.importPackagesToTemp(FigmaService.kt:127)
at com.google.relay.androidstudio.plugin.importer.FigmaImportWorker.doInBackground(FigmaImportWorker.java:71)
at com.google.relay.androidstudio.plugin.importer.FigmaImportWorker.doInBackground(FigmaImportWorker.java:26)
at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
ERROR - gin.importer.FigmaImportWorker - Android Studio Dolphin | 2021.3.1 Patch 1 Build #AI-213.7172.25.2113.9123335
ERROR - gin.importer.FigmaImportWorker - JDK: 11.0.13; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
ERROR - gin.importer.FigmaImportWorker - OS: Windows 10
ERROR - gin.importer.FigmaImportWorker - Plugin to blame: Relay for Android Studio version: 0.3.01
ERROR - gin.importer.FigmaImportWorker - Last Action: EditorPaste
It may be a coincidence, but the day before I started receiving this error, I updated windows 10 with pack December 13, 2022—KB5021233 (OS Builds 19042.2364, 19043.2364, 19044.2364, and 19045.2364)
I receive the error using the files available in the Relay for Figma tutorial.
They have worked before.
I removed and installed the plugin again.
I checked the permission for the directory "...AndroidStudio2021.3\plugins\relay_android_studio\bin\win64", given the log message "Unable to set permissions on..."
Has anyone seen the same errors? Suggestions on what I should try?
I had the same problem a few days ago, I raised the issue here and got a reply, simply put, it's a google services API issue, so the fix is on the server side, no need to reinstall relay
Today I was able to import the Figma file.
There were no changes in my computers from yesterday to today, so I assume Figma modified some file format or Relay for Figma had some internal bug that was fixed.
I was not able to find any documentation or information about it.

Why a SIGABRT permission denied error appeared during a zmq_poll()?

I am using zmq PUSH and PULL sockets. And recently started observing SIGABRT crash, in zmq_poll() operation.
The error/exit log is "Permission denied (src/tcp_connecter.cpp:361)"
(gdb) bt
#0 0x00007ffff76d053f in raise () from /lib64/libc.so.6
#1 0x00007ffff76ba895 in abort () from /lib64/libc.so.6
#2 0x00007ffff7f59ace in zmq::zmq_abort(char const*) () from /lib64/libzmq.so.5
#3 0x00007ffff7f9ef36 in zmq::tcp_connecter_t::connect() () from /lib64/libzmq.so.5
#4 0x00007ffff7f9f060 in zmq::tcp_connecter_t::out_event() () from /lib64/libzmq.so.5
#5 0x00007ffff7f6bc2c in zmq::epoll_t::loop() () from /lib64/libzmq.so.5
#6 0x00007ffff7f9ffba in thread_routine () from /lib64/libzmq.so.5
#7 0x00007ffff75d058e in start_thread () from /lib64/libpthread.so.0
#8 0x00007ffff77956a3 in clone () from /lib64/libc.so.6
Could anyone help me here ??
Process is a part of a container running in Kubernates. And this issue started occuring suddenly. And couldn't be able to recover.
Thanks,
Meanwhile, I resolved the issue.
The zmq interface in host A was trying to connect to Host B. And above error is observed in Host A.
And this issue started occuring once after restarting HostB. And I could notice, there is an ip6table rule got added in HostB as part of its restart. This rule was doing "reject with admin prohibited" in INPUT and forward chain in HostB. (I have to search my notes for exact rule.)
As part of this, zmq client in HostA was ending up in above mentioned crash. I believe crash (SIGABRT) should not be solution for hitting such rule in peer end. Since SIGABRT exception is unable to handle in code.

Android Studio Flutter debugging FileSystemException

I am developing a Flutter application in Android Studio. When I place a breakpoint somewhere in the code it gets hit and execution stops, but after half a second the application exits with the following error:
Unhandled exception:
FileSystemException: Cannot open file, path = 'build\app.dill.track.dill.incremental.dill' (OS Error: The requested operation cannot be performed on a file with a user-mapped section open.
, errno = 1224)
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:364:9)
#1 _RootZone.runUnary (dart:async/zone.dart:1379:54)
#2 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#3 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#4 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#5 Future._completeWithValue (dart:async/future_impl.dart:483:5)
#6 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:513:7)
#7 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#8 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#9 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#10 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)
Unhandled exception:
SocketException: Write failed (OS Error: The pipe is being closed.
, errno = 232), port = 0
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:1112:29)
#1 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#2 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)
If I run application without debugging it works normally. Has anyone had similar error and solved it successfully?
The breakpoint seems to work as expected. What happens here looks like a function in the app expects a value that wasn't provided after the breakpoint. Debug the app by checking if there's any function expecting a value that's blocked by the breakpoint.

Fatal error: Uncaught Cassandra\Exception\RuntimeException: Keyspace 'opspot' does not exist in

Though I am using the docker facing this issue. The same things are working fine on other systems
Fatal error: Uncaught Cassandra\Exception\RuntimeException: Keyspace 'opspot' does not exist in /var/www/Opspot/engine/Core/Data/Cassandra/Client.php:32 Stack trace: #0 /var/www/Opspot/engine/Core/Data/Cassandra/Client.php(32): Cassandra\DefaultCluster->connect('opspot') #1 /var/www/Opspot/engine/Core/Data/DataProvider.php(38): Opspot\Core\Data\Cassandra\Client->__construct() #2 [internal function]: Opspot\Core\Data\DataProvider->Opspot\Core\Data{closure}(Object(Opspot\Core\Di\Di)) #3 /var/www/Opspot/engine/Core/Di/Di.php(25): call_user_func(Object(Closure), Object(Opspot\Core\Di\Di)) #4 /var/www/Opspot/engine/Core/Blogs/Legacy/Repository.php(43): Opspot\Core\Di\Di->get('Database\Cassan...') #5 /var/www/Opspot/engine/Core/Blogs/Repository.php(29): Opspot\Core\Blogs\Legacy\Repository->__construct() #6 /var/www/Opspot/engine/Core/Blogs/Manager.php(46): Opspot\Core\Blogs\Repository->__construct() #7 /var/www/Opspot/engine/Core/Blogs/Events.php(23): Opspot\Core\Blogs\Manager->__construct() #8 /var/www/Opspot/engine/Core/Eve in /var/www/Opspot/engine/Core/Data/Cassandra/Client.php on line 32
Warning: Cannot modify header information - headers already sent in /var/www/Opspot/engine/lib/elgglib.php on line 985
An error occurred.
Sorry, the page you are looking for is currently unavailable.
Please try again later.

Resources