Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Fixes the node start IPC connection #841

Merged
merged 6 commits into from
Jun 29, 2016
Merged

Fixes the node start IPC connection #841

merged 6 commits into from
Jun 29, 2016

Conversation

frozeman
Copy link
Contributor

This PR is adding a loop to test an IPC connection. When a connection timeout is set, it tries to connect every 200ms to the connection, if not it fails.

This speeds up the connection process, as we don't have to wait arbitrary 4 seconds anymore (which weren't enough for eth)

@hiddentao This PR works, but if you set a wrong IPC path it doesn't quit gracefully, instead i delivers an uncaught exception. Could you please look into this.
Simply let the eth node start (Change the node files content in ~/Library/App..Support/Mist/node to eth)
Before change the pic path in the getIPCPath.js to some other path.

You will see it fails, but not gracefully, as the error seems to travers through and doesn't get catched.

This error is created in the socket.js line 84

[2016-06-16 16:44:28.827] [INFO] Sockets/node-ipc - Connect to {"path":"/Users/frozeman/Library/Ethereum/gethdddd.ipc"}
[2016-06-16 16:44:38.965] [ERROR] Sockets/node-ipc - { Error: connect ENOENT /Users/frozeman/Library/Ethereum/gethdddd.ipc
    at Object.exports._errnoException (util.js:949:11)
    at exports._exceptionWithHostPort (util.js:972:20)
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'connect',
  address: '/Users/frozeman/Library/Ethereum/gethdddd.ipc' }
Error: connect ENOENT /Users/frozeman/Library/Ethereum/gethdddd.ipc
    at Object.exports._errnoException (util.js:949:11)
    at exports._exceptionWithHostPort (util.js:972:20)
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
[2016-06-16 16:44:38.967] [ERROR] main - UNCAUGHT EXCEPTION { Error: connect ENOENT /Users/frozeman/Library/Ethereum/gethdddd.ipc
    at Object.exports._errnoException (util.js:949:11)
    at exports._exceptionWithHostPort (util.js:972:20)
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'connect',
  address: '/Users/frozeman/Library/Ethereum/gethdddd.ipc' }
Error: connect ENOENT /Users/frozeman/Library/Ethereum/gethdddd.ipc
    at Object.exports._errnoException (util.js:949:11)
    at exports._exceptionWithHostPort (util.js:972:20)
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)

@@ -289,8 +289,8 @@ class EthereumNode extends EventEmitter {
this._saveUserData('network', this._network);

return this._socket.connect({ path: ipcPath }, {
timeout: 30000 /* 30s */
})
timeout: 10000 /* 30s */
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to increase this to 30s again after its fixed

@hiddentao
Copy link
Contributor

I will refactor the interval timer loop.

@hiddentao
Copy link
Contributor

hiddentao commented Jun 17, 2016

Changes:

  • Commented out the master password window and logic, eth now just works
  • Refactored the socket connection code, so that it waits for a result before re-connecting
  • Now fails gracefully
  • Added node and network cli parameters

@hiddentao
Copy link
Contributor

@frozeman let me know what you think.

@hiddentao
Copy link
Contributor

hiddentao commented Jun 17, 2016

Also noticed that the splash screen is showing state download info, but for Eth there isn't any. This needs to be removed before this PR is complete.

Update: now fixed.

@hiddentao
Copy link
Contributor

Only pending issue - should we just remove the master password logic from the node startup?

@hiddentao
Copy link
Contributor

Final changes made, ready for review.

@alexvandesande
Copy link

What's the status of this? Is it going in 0.7.6?

# Conflicts:
#	interface/client/templates/popupWindows/onboardingScreen.js
@hiddentao
Copy link
Contributor

This is done and ready for review. It should definitely go into 0.7.6.

@hiddentao
Copy link
Contributor

To test eth startup:

$ electron . --loglevel debug --node eth --network test

@frozeman
Copy link
Contributor Author

we should remove the master password logic. And provide a script for people to get rid of it

@hiddentao
Copy link
Contributor

It's removed.

@luclu
Copy link
Contributor

luclu commented Jun 22, 2016

Seems to work well - both windows 7 and OSX.
Tested starting, switching networks/nodes, detaching.
But I had to remove eth's config folder.


@luclu luclu mentioned this pull request Jun 24, 2016
@hiddentao hiddentao modified the milestones: 0.7.6, 0.8 Jun 27, 2016
@alexvandesande alexvandesande merged commit 995d347 into develop Jun 29, 2016
alexvandesande pushed a commit that referenced this pull request Jul 11, 2016
* bump version to 0.7.6

* updated os timesync

* adding setting to change UI language (fixes #813) (#896)

* simple language setting menu

* use i18n label in menu

* simple language setting menu

* use i18n label in menu

* change language of menu bar by triggering 'backendAction_setLanguage'

* adds translations for language names

* remove duplicate 'gulp update-nodes' (#897)

* add i18n entry for OSX's 'Services' (#887)

* add i18n entry for OSX's 'Services'

* update missing osx menu strings

* update-popup-window: prevent maximize (#885)

* update-popup-window prevent maximize

* add resizable:false

* added shrinkwrap (#903)

* fixed webview tagd and updated electrong to 1.2.5 (#905)

* Fixes the node start IPC connection (#841)

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* Adds Toggle password visibility to on boarding screen (#909)

* add password visibilty toggle to onboarding

* replaced 'showPassword' with 'passwordInputType'

* changed id into class

* 18n cleanup (former #889) (#910)

* Renamed Korean and Albanian to ISO standards
* Added menu items to set to Dutch,  Farsi, Albanian and Italian (these three are rather incomplete)

* changed log error to warn

* fixed ipcBackend notifications

* Fixing wallet tab insertion (#911)

* small cleanup

* added admin:true permission

* removed webview duplicate

* Fully automated UI testing (#788)


* got app launching via test

* work towards testing - private net integration

* change how we name options to pass directly to geth, so that test suite works

* refactor preloader scripts

* cleanly quitting the app at the end of tests

* trying to get electron working properly, upgrade to 1.2.2

* upgrade spectron

* work towards getting tests to work

* dont use NODE_ENV var as Meteor production uses it

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* got basic test working

* update travis build

* trigger build

* update readme, travis

* fix gulp-download-stream use

* fix build command

* testing account creation

* added account creation test

* only do a shallow clone

* final deposit test

* should be able to find geth executable now

* adds the wallet as the default tab (#924)

* Text updates

Fix typos and make writing more clear and accurate

* Capitalization consistency

* adds the wallet as the default tab

* always upsert

* Update version to 0.8 (#930)

* update to 0.8

* fixes menu margin clipping

* remove comma

* fix ipcpath bug
alexvandesande pushed a commit that referenced this pull request Jul 17, 2016
* bump version to 0.7.6

* updated os timesync

* adding setting to change UI language (fixes #813) (#896)

* simple language setting menu

* use i18n label in menu

* simple language setting menu

* use i18n label in menu

* change language of menu bar by triggering 'backendAction_setLanguage'

* adds translations for language names

* remove duplicate 'gulp update-nodes' (#897)

* add i18n entry for OSX's 'Services' (#887)

* add i18n entry for OSX's 'Services'

* update missing osx menu strings

* update-popup-window: prevent maximize (#885)

* update-popup-window prevent maximize

* add resizable:false

* added shrinkwrap (#903)

* fixed webview tagd and updated electrong to 1.2.5 (#905)

* Fixes the node start IPC connection (#841)

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* Adds Toggle password visibility to on boarding screen (#909)

* add password visibilty toggle to onboarding

* replaced 'showPassword' with 'passwordInputType'

* changed id into class

* 18n cleanup (former #889) (#910)

* Renamed Korean and Albanian to ISO standards
* Added menu items to set to Dutch,  Farsi, Albanian and Italian (these three are rather incomplete)

* changed log error to warn

* fixed ipcBackend notifications

* Fixing wallet tab insertion (#911)

* small cleanup

* added admin:true permission

* removed webview duplicate

* Fully automated UI testing (#788)


* got app launching via test

* work towards testing - private net integration

* change how we name options to pass directly to geth, so that test suite works

* refactor preloader scripts

* cleanly quitting the app at the end of tests

* trying to get electron working properly, upgrade to 1.2.2

* upgrade spectron

* work towards getting tests to work

* dont use NODE_ENV var as Meteor production uses it

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* got basic test working

* update travis build

* trigger build

* update readme, travis

* fix gulp-download-stream use

* fix build command

* testing account creation

* added account creation test

* only do a shallow clone

* final deposit test

* should be able to find geth executable now

* adds the wallet as the default tab (#924)

* Text updates

Fix typos and make writing more clear and accurate

* Capitalization consistency

* adds the wallet as the default tab

* always upsert

* Update version to 0.8 (#930)

* update to 0.8

* fixes menu margin clipping

* remove comma

* work towards new minimonogo sync

* fix ipcpath bug

* got basic persistence working

* minor error

* refactor sendTransaction error alerts (#959)

* "Change language" translated in mist.nb.i18n.json (#953)

"Change language" translated in mist.nb.i18n.json

* timer delay on menu refreshing from tab updates

* rename 'passwordError' to 'wrongPassword' for consistency (#951)

* sync not specific to a window

* refactor to enable access to mongo sync from all windows

* update .meteor paths on .gitignore (#977)

* DAO fork support (#970)

* created DAO fork dummy code

* text update

* added node flags choice 

* changed DAO fork texts

* disable eth-node switch until hardfork is supported (#975)

* disable eth-node until hardfork is supported

* remove test function

* reworded the disclaimer link
alexvandesande pushed a commit that referenced this pull request Jul 23, 2016
Merging of Choose account popup #814

* Creating change account modals

* connect popup

* fixing typo

* connect account popup

* Straightens checkbox on connect account modal

* Connect account popup interface

* fixing scroll gradient on choose account popup

* Informing account names on connect popup

* Adding animations on account and dapp info

* Improvements on connect popup

* Tweaking URL breakdown to show arrows when necessary

* Fixing edgy cases on breadcrumb

* Removing browserBar interface

* Removing browser bar fold-down element

* Vertical flexbox - window stretches appropriately

* Popup updates

* change dapp style and icon (#1)

* more working code

* Reload permissions and code cleaning

* Website placeholder icon

* Cleaning code

* Unpin tab

* Not showing remove button on wallet tab

* Merge Hard Fork choice - Mist into master (#979)

* bump version to 0.7.6

* updated os timesync

* adding setting to change UI language (fixes #813) (#896)

* simple language setting menu

* use i18n label in menu

* simple language setting menu

* use i18n label in menu

* change language of menu bar by triggering 'backendAction_setLanguage'

* adds translations for language names

* remove duplicate 'gulp update-nodes' (#897)

* add i18n entry for OSX's 'Services' (#887)

* add i18n entry for OSX's 'Services'

* update missing osx menu strings

* update-popup-window: prevent maximize (#885)

* update-popup-window prevent maximize

* add resizable:false

* added shrinkwrap (#903)

* fixed webview tagd and updated electrong to 1.2.5 (#905)

* Fixes the node start IPC connection (#841)

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* Adds Toggle password visibility to on boarding screen (#909)

* add password visibilty toggle to onboarding

* replaced 'showPassword' with 'passwordInputType'

* changed id into class

* 18n cleanup (former #889) (#910)

* Renamed Korean and Albanian to ISO standards
* Added menu items to set to Dutch,  Farsi, Albanian and Italian (these three are rather incomplete)

* changed log error to warn

* fixed ipcBackend notifications

* Fixing wallet tab insertion (#911)

* small cleanup

* added admin:true permission

* removed webview duplicate

* Fully automated UI testing (#788)


* got app launching via test

* work towards testing - private net integration

* change how we name options to pass directly to geth, so that test suite works

* refactor preloader scripts

* cleanly quitting the app at the end of tests

* trying to get electron working properly, upgrade to 1.2.2

* upgrade spectron

* work towards getting tests to work

* dont use NODE_ENV var as Meteor production uses it

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* got basic test working

* update travis build

* trigger build

* update readme, travis

* fix gulp-download-stream use

* fix build command

* testing account creation

* added account creation test

* only do a shallow clone

* final deposit test

* should be able to find geth executable now

* adds the wallet as the default tab (#924)

* Text updates

Fix typos and make writing more clear and accurate

* Capitalization consistency

* adds the wallet as the default tab

* always upsert

* Update version to 0.8 (#930)

* update to 0.8

* fixes menu margin clipping

* remove comma

* work towards new minimonogo sync

* fix ipcpath bug

* got basic persistence working

* minor error

* refactor sendTransaction error alerts (#959)

* "Change language" translated in mist.nb.i18n.json (#953)

"Change language" translated in mist.nb.i18n.json

* timer delay on menu refreshing from tab updates

* rename 'passwordError' to 'wrongPassword' for consistency (#951)

* sync not specific to a window

* refactor to enable access to mongo sync from all windows

* update .meteor paths on .gitignore (#977)

* DAO fork support (#970)

* created DAO fork dummy code

* text update

* added node flags choice 

* changed DAO fork texts

* disable eth-node switch until hardfork is supported (#975)

* disable eth-node until hardfork is supported

* remove test function

* reworded the disclaimer link

* Syncing Tabs after account connection

* Enable Tabs sync and persistence in all windows (#2)

* sync not specific to a window

* refactor to enable access to mongo sync from all windows

* Pin/unpin Tabs

* Adding show password on Create account popup

* change remove button animation

* add globe image as default non-icon
@luclu luclu deleted the fixEthStart branch September 27, 2016 10:26
@lock
Copy link

lock bot commented Mar 31, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot unassigned hiddentao Mar 31, 2018
@lock lock bot locked and limited conversation to collaborators Mar 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants