[Support] ContainerNursery


Echolot

Recommended Posts

1 minute ago, Echolot said:

@Alfy1080 Thanks for the log entry and bug report. It looks to me like Docker generates an event with some malformed JSON which leads to ContainerNursery crashing. I will wrap the code in some error handling to prevent crashes of ContainerNursery in such an event and release a bug fix release in the next few days.

Wow, that was an amazingly fast reply 😋

Thanks for the info. Looking forward to the fix :) 

Link to comment

Thanks so much for the quick bugfix. I've been running the new version for a few hours now and no crash. Previously it was sometimes crashing even once every 30 minutes so i guess it is fixed now. Will let you know if i encounter any similar issues.

Ido have another question but i'm not sure what details to provide since the logs show no error regarding this:

I've set up ContainerNursery as a proxy for binhex-code-server. In terms of turning off and back on the container everything works as expected through ContainerNursery. However when the container is off and i try to access it i see the "Waking up binhex-code-server" screen, the container turns on with no error but the page never refreshes. If i refresh it manually i still see the same message and there is no way of bypassing it and accessing the actual application (binhex-code-server). The only difference between this and the other containers that i am running is the fact that this one uses https between the proxy and the container while the others are on http. Is this a limitation of ContainerNursery?

Thank you! :)

EDIT:

Sorry to be a bummer but the previously reported issue just reoccurred today. Here's the output of the log: 

 

undefined:1
{"read":"2021-12-01T07:22:27.505501532Z","preread":"2021-12-01T07:22:26.473666205Z","pids_stats":{"current":27},"blkio_stats":{"io_service_bytes_recursive":[{"major":8,"minor":112,"op":"Read","value":127119360},{"major":8,"minor":112,"op":"Write","value":24576},{"major":8,"minor":112,"op":"Sync","value":127143936},{"major":8,"minor":112,"op":"Async","value":0},{"major":8,"minor":112,"op":"Discard","value":0},{"major":8,"minor":112,"op":"Total","value":127143936},{"major":8,"minor":160,"op":"Read","value":127336448},{"major":8,"minor":160,"op":"Write","value":114688},{"major":8,"minor":160,"op":"Sync","value":127451136},{"major":8,"minor":160,"op":"Async","value":0},{"major":8,"minor":160,"op":"Discard","value":0},{"major":8,"minor":160,"op":"Total","value":127451136},{"major":7,"minor":2,"op":"Read","value":254455808},{"major":7,"minor":2,"op":"Write","value":139264},{"major":7,"minor":2,"op":"Sync","value":254595072},{"major":7,"minor":2,"op":"Async","value":0},{"major":7,"minor":2,"op":"Discard","value":0},{"major":7,"minor":2,"op":"Total","value":254595072}],"io_serviced_recursive":[{"major":8,"minor":112,"op":"Read","value":31035},{"major":8,"minor":112,"op":"Write","value":4},{"major":8,"minor":112,"op":"Sync","value":31039},{"major":8,"minor":112,"op":"Async","value":0},{"major":8,"minor":112,"op":"Discard","value":0},{"major":8,"minor":112,"op":"Total","value":31039},{"major":8,"minor":160,"op":"Read","value":31088},{"major":8,"minor":160,"op":"Write","value":4},{"major":8,"minor":160,"op":"Sync","value":31092},{"major":8,"minor":160,"op":"Async","value":0},{"major":8,"minor":160,"op":"Discard","value":0},{"major":8,"minor":160,"op":"Total","value":31092},{"major":7,"minor":2,"op":"Read","value":5139},{"major":7,"minor":2,"op":"Write","value":12},{"major":7,"minor":2,"op":"Sync","value":5151},{"major":7,"minor":2,"op":"Async","value":0},{"major":7,"minor":2,"op":"Discard","value":0},{"major":7,"minor":2,"op":"Total","value":5151}],"io_queue_recursive":[],"io_service_time_recursive":[],"io_wait_time_recursive":[],"io_merged_recursive":[],"io_time_recursive":[],"sectors_recursive":[]},"num_procs":0,"storage_stats":{},"cpu_stats":{"cpu_usage":{"total_usage":3158656747708,"percpu_usage":[320216365757,241831431537,260410379634,271224941458,273237346625,284666589481,229500011658,246267939121,254619708670,257061754896,258131560619,261488718252,0,0,0,0],"usage_in_kernelmode":227000000000,"usage_in_usermode":2831690000000},"system_cpu_usage":4545438260000000,"online_cpus":12,"throttling_data":{"periods":0,"throttled_periods":0,"throttled_time":0}},"precpu_stats":{"cpu_usage":{"total_usage":3158631397724,"percpu_usage":[320216365757,241831408353,260410219422,271224941458,273224184053,284666589481,229488007642,246267939121,254619708670,257061754896,258131560619,261488718252,0,0,0,0],"usage_in_kernelmode":227000000000,"usage_in_usermode":2831670000000},"system_cpu_usage":4545425980000000,"online_cpus":12,"throttling_data":{"periods":0,"throttled_periods":0,"throttled_time":0}},"memory_stats":{"usage":116506624,"max_usage":154386432,"stats":{"active_anon":0,"active_file":8622080,"cache":11489280,"dirty":0,"hierarchical_memory_limit":9223372036854771712,"hierarchical_memsw_limit":9223372036854771712,"inactive_anon":96825344,"inactive_file":2641920,"mapped_file":9056256,"pgfault":10224126,"pgmajfault":0,"pgpgin":10187991,"pgpgout":10170424,"rss":97030144,"rss_huge":0,"total_active_anon":0,"total_active_file":8622080,"total_cache":11489280,"total_dirty":0,"total_inactive_anon":96825344,"total_inactive_file":2641920,"total_mapped_file":9056256,"total_pgfault":10224126,"total_pgmajfault":0,"total_pgpgin":10187991,"total_pgpgout":10170424,"total_rss":97030144,"total_rss_huge":0,"total_unevictable":0,"total_writeback":0,"unevictable":0,"writeback":0},"limit":12552155136},"name":"/binhex-code-server","id":"305be059e0bdd278048a749dceaef576e90d4aa6903e90e36a8c065820a3f721","networks":{"eth0":{"rx_bytes":593909382,"rx_packets":5242541,"rx_errors":0,"rx_dropped":0,"tx_bytes":1023558065,"tx_packets":4654336,"tx_errors":0,"tx_dropped"

SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at IncomingMessage.<anonymous> (/usr/src/app/build/DockerManager.js:112:62)
at IncomingMessage.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at IncomingMessage.Readable.push (node:internal/streams/readable:234:10)
at HTTPParser.parserOnBody (node:_http_common:141:24)
at HTTPParser.execute (<anonymous>)
at Socket.socketOnData (node:_http_client:487:22)
at Socket.emit (node:events:390:28)

Node.js v17.1.0

 

Edited by Alfy1080
Link to comment
On 11/29/2021 at 8:13 PM, Alfy1080 said:

I've set up ContainerNursery as a proxy for binhex-code-server. In terms of turning off and back on the container everything works as expected through ContainerNursery. However when the container is off and i try to access it i see the "Waking up binhex-code-server" screen, the container turns on with no error but the page never refreshes. If i refresh it manually i still see the same message and there is no way of bypassing it and accessing the actual application (binhex-code-server). The only difference between this and the other containers that i am running is the fact that this one uses https between the proxy and the container while the others are on http. Is this a limitation of ContainerNursery?

EDIT:

Sorry to be a bummer but the previously reported issue just reoccurred today. Here's the output of the log: 

 @Alfy1080 I'm an idiot and forgot to run the build command before building the new docker image 😑 The newest release should now properly contain the error handling methods we discussed and should fix your issue (hopefully for real this time 😉).

 

At the moment ContainerNursery only supports HTTP. If this is however a feature that you and maybe some others have a great need for, I would consider implementing it.

Link to comment

Thanks for that. I applied the update. Will monitor the behavior of the container and let you know if the issue reoccurs. 

Regarding the https issue, personally since i use nginx proxy manager as the main reverse proxy, i can keep the connection between the containers, ContainerNursery and nginx as http and only encrypt traffic between the client and nginx. This only becomes an issue when the containers only support https. Luckily i have very few containers which don't support http but it would be really appreciated if you consider https support for a future release.

Thanks for all your help! 

Link to comment
  • 2 months later...
  • Echolot changed the title to [Support] ContainerNursery

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.