Errno::ECONNREFUSED: Connection refused with multiple refresh listeners


#1

I was wondering if it’s possible to have a service dialog element set to refresh multiple elements in the service dialog. It seems like I can have one element refresh a different single element, but as soon as I try to update multiple elements (who are set to auto-refresh) I start receiving the error:

[----] E, [2016-04-27T10:57:28.517907 #2952:10048ac] ERROR -- : Method STDERR: The following error occurred during inline method preamble evaluation:
[----] E, [2016-04-27T10:57:28.518073 #2952:10048ac] ERROR -- : Method STDERR:   DRb::DRbConnError: druby://127.0.0.1:35852 - #<Errno::ECONNREFUSED: Connection refused - connect(2) for "127.0.0.1" port 35852>
[----] E, [2016-04-27T10:57:28.518211 #2952:10048ac] ERROR -- : Method STDERR:   /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:744:in `rescue in block in open'
[----] E, [2016-04-27T10:57:28.518533 #2952:10048ac] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:738:in `block in open'
[----] E, [2016-04-27T10:57:28.520348 #2952:10048ac] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:737:in `each'
[----] E, [2016-04-27T10:57:28.520549 #2952:10048ac] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:737:in `open'
[----] E, [2016-04-27T10:57:28.520771 #2952:10048ac] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1248:in `initialize'
[----] E, [2016-04-27T10:57:28.520904 #2952:10048ac] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1228:in `new'
[----] E, [2016-04-27T10:57:28.521006 #2952:10048ac] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1228:in `open'
[----] E, [2016-04-27T10:57:28.521106 #2952:10048ac] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1141:in `block in method_missing'
[----] E, [2016-04-27T10:57:28.521213 #2952:10048ac] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1160:in `with_friend'
[----] E, [2016-04-27T10:57:28.521317 #2952:10048ac] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1140:in `method_missing'
[----] E, [2016-04-27T10:57:28.521412 #2952:10048ac] ERROR -- : Method STDERR: -:31:in `<main>'
[----] E, [2016-04-27T10:57:28.521518 #2952:10048ac] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:744:in `rescue in block in open': druby://127.0.0.1:35852 - #<Errno::ECONNREFUSED: Connection refused - connect(2) for "127.0.0.1" port 35852> (DRb::DRbConnError)
[----] E, [2016-04-27T10:57:28.521620 #2952:10048ac] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:738:in `block in open'
[----] E, [2016-04-27T10:57:28.521797 #2952:10048ac] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:737:in `each'
[----] E, [2016-04-27T10:57:28.521904 #2952:10048ac] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:737:in `open'
[----] E, [2016-04-27T10:57:28.522010 #2952:10048ac] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1248:in `initialize'
[----] E, [2016-04-27T10:57:28.522112 #2952:10048ac] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1228:in `new'
[----] E, [2016-04-27T10:57:28.522212 #2952:10048ac] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1228:in `open'
[----] E, [2016-04-27T10:57:28.522314 #2952:10048ac] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1141:in `block in method_missing'
[----] E, [2016-04-27T10:57:28.522416 #2952:10048ac] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1160:in `with_friend'
[----] E, [2016-04-27T10:57:28.522516 #2952:10048ac] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1140:in `method_missing'
[----] E, [2016-04-27T10:57:28.522616 #2952:10048ac] ERROR -- : Method STDERR:  from -:31:in `<main>'
[----] I, [2016-04-27T10:57:28.523360 #2952:10e2b84]  INFO -- : <AEMethod [/Seagate/Dialogs/Methods/selected_user]> Ending
[----] E, [2016-04-27T10:57:28.523620 #2952:10e2b84] ERROR -- : Aborting instantiation (unknown method return code) because [Method exited with rc=Unknown RC: [1]]

I’ll also see that it calls the instances associated with the dialog element multiple times. I’m currently testing build master.20160426130611_0e9dc42

For a little background I’ve been working on creating a service dialog where a user will select an OpenStack tenant from a drop down list and it will then refresh other fields in the service dialog. These fields will read the value of $evm.root['dialog_cloud_tenant'] and then update their info. For example, one field is a dropdown box that displays the networks available in the OpenStack tenant. I’ll build the dropdown list values like this:

$evm.vmdb('CloudTenant').find(cloud_tenant_id)
.
.
.
cloud_tenant.cloud_networks.each do |network| 
  networks[network.id] = network.name 
end

Updating a single element like this will usually work but as soon as I try to update two it will start breaking. It can be intermittent as well.

A while ago I opened https://github.com/ManageIQ/manageiq/issues/7272 because the dropdown list selections weren’t refreshing other elements at all. As of a couple of weeks ago they started working but maybe work is ongoing on this issue.

Thanks.


#2

@dclarizio can you review this question from @sg_chris and forward to a SME if necessary.


#3

@eclarizio can you comment on this?


#4

The way it works is that when you have something set to trigger an auto-refresh, it sends out a message saying that an auto-refresh needs to happen. Any fields that are set to auto-refresh are listening for that message and attempt to refresh themselves when that message is published.

So, as long as the multiple fields that are being refreshed do not depend on each other, there shouldn’t be an issue, since those will fire at the same time and will complete asynchronously. I just set up a simple dialog where one field was set to refresh two others, and wasn’t able to reproduce the issue.

The error you’re getting seems unrelated to this issue, but it’s very odd that you can reproduce with the same steps. You’re in the operations UI, right? Are you getting any javascript errors, maybe?


#5

I’m going to paste some screenshots to show what I’m doing. For this test I used a freshly deployed Pre-release (darga-1-beta1) running on vSphere.

Created my instances and methods

Edited the schema and added execute

Instance: ToggleTest1

Instance: ToggleTest1

Method: toggle_test1

Method: toggle_test2

Created a new Service Dialog

Tenant

Selected Tenant Name 1

Selected Tenant Name 2

Created the service

Ordering the service

This part always looks good when you first load it.

Select Tenant B

Sometimes this works. Sometimes it doesn’t. Sometimes the “Selected Tenant Name 1” will have the error and other times it’s the same as the screenshot. If I remove “Seletect Tenant Name 2” from the dialog, I’m able to select any tenant from the drop down list and it correctly displays in “Selected Tenant Name 1”

automation.log contains

[----] E, [2016-04-29T13:43:01.002288 #2924:154e4c0] ERROR -- : Method STDERR:   DRb::DRbConnError: druby://127.0.0.1:54376 - #<Errno::ECONNREFUSED: Connection refused - connect(2) for "127.0.0.1" port 54376>
[----] E, [2016-04-29T13:43:01.002424 #2924:154e4c0] ERROR -- : Method STDERR:   /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:744:in `rescue in block in open'
[----] E, [2016-04-29T13:43:01.002530 #2924:154e4c0] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:738:in `block in open'
[----] E, [2016-04-29T13:43:01.002632 #2924:154e4c0] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:737:in `each'
[----] E, [2016-04-29T13:43:01.002742 #2924:154e4c0] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:737:in `open'
[----] E, [2016-04-29T13:43:01.002844 #2924:154e4c0] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1248:in `initialize'
[----] E, [2016-04-29T13:43:01.002948 #2924:154e4c0] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1228:in `new'
[----] E, [2016-04-29T13:43:01.003057 #2924:154e4c0] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1228:in `open'
[----] E, [2016-04-29T13:43:01.003196 #2924:154e4c0] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1141:in `block in method_missing'
[----] E, [2016-04-29T13:43:01.003338 #2924:154e4c0] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1160:in `with_friend'
[----] E, [2016-04-29T13:43:01.003446 #2924:154e4c0] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1140:in `method_missing'
[----] E, [2016-04-29T13:43:01.003543 #2924:154e4c0] ERROR -- : Method STDERR: -:31:in `<main>'
[----] E, [2016-04-29T13:43:01.003660 #2924:154e4c0] ERROR -- : Method STDERR: /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:744:in `rescue in block in open': druby://127.0.0.1:54376 - #<Errno::ECONNREFUSED: Connection refused - connect(2) for "127.0.0.1" port 54376> (DRb::DRbConnError)
[----] E, [2016-04-29T13:43:01.003780 #2924:154e4c0] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:738:in `block in open'
[----] E, [2016-04-29T13:43:01.003888 #2924:154e4c0] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:737:in `each'
[----] E, [2016-04-29T13:43:01.003991 #2924:154e4c0] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:737:in `open'
[----] E, [2016-04-29T13:43:01.004093 #2924:154e4c0] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1248:in `initialize'
[----] E, [2016-04-29T13:43:01.004260 #2924:154e4c0] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1228:in `new'
[----] E, [2016-04-29T13:43:01.004380 #2924:154e4c0] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1228:in `open'
[----] E, [2016-04-29T13:43:01.004485 #2924:154e4c0] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1141:in `block in method_missing'
[----] E, [2016-04-29T13:43:01.004583 #2924:154e4c0] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1160:in `with_friend'
[----] E, [2016-04-29T13:43:01.004685 #2924:154e4c0] ERROR -- : Method STDERR:  from /opt/rubies/ruby-2.2.4/lib/ruby/2.2.0/drb/drb.rb:1140:in `method_missing'
[----] E, [2016-04-29T13:43:01.004794 #2924:154e4c0] ERROR -- : Method STDERR:  from -:31:in `<main>'
[----] I, [2016-04-29T13:43:01.042659 #2924:f38c84]  INFO -- : <AEMethod [/Seagate/Dialogs/Methods/toggle_test2]> Ending
[----] I, [2016-04-29T13:43:01.042798 #2924:f38c84]  INFO -- : Method exited with rc=MIQ_OK
[----] I, [2016-04-29T13:43:01.062962 #2924:f38a68]  INFO -- : <AEMethod [/Seagate/Dialogs/Methods/toggle_test1]> Ending
[----] I, [2016-04-29T13:43:01.122544 #2924:f38a68]  INFO -- : Method exited with rc=MIQ_OK
[----] I, [2016-04-29T13:43:01.136712 #2924:f388c4]  INFO -- : <AEMethod [/Seagate/Dialogs/Methods/toggle_test2]> Ending
[----] E, [2016-04-29T13:43:01.178004 #2924:f388c4] ERROR -- : Aborting instantiation (unknown method return code) because [Method exited with rc=Unknown RC: [1]]```

I'm not seeing any Javascript errors in the browser. I tried to keep this test as simple as possible. In my real environment I have exception handling, but get the same result. Hope this helps. thanks.

#6

I’m not sure what the protocol is here. Should I create an issue in Git for this? I just tested on the current nightly build and the issue persist. Thanks.


#7

@sg_chris Please see https://github.com/ManageIQ/manageiq/pull/9860 to try to address the issue you described. /cc @mkanoor