Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communicate with bootnodes, mailservers and whisper nodes by :443 (staging, test, beta) #7382

Merged
merged 1 commit into from
Feb 14, 2019

Conversation

mandrigin
Copy link
Contributor

@mandrigin mandrigin commented Jan 30, 2019

fixes #6645
fixes #6351

Summary:

Essentially, we use HTTPS port :443 to connect to our nodes.

TODO:

  • Test, then deploy :443 mirroring on the eth.beta too.

Areas that maybe impacted (optional)

Functional

  • 1-1 chats
  • public chats
  • group chats
  • mailservers

NB! "test" or "staging" fleet should be used to test it.

Steps to test:

  • Restrict connections on the network to ports :443 and :80
  • Launch Status, switch to the staging fleet.
  • Chat should work, the app shouldn't be offline.

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Jan 30, 2019

Jenkins Builds

Click to see older builds (15)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 19dc2c3 #1 2019-01-30 17:03:38 ~16 min ios-e2e 📦 pkg
✔️ 19dc2c3 #1 2019-01-30 17:06:29 ~19 min ios 📦 ipa
✔️ 19dc2c3 #1 2019-01-30 17:06:38 ~19 min macos 📦 dmg
✔️ 19dc2c3 #1 2019-01-30 17:08:49 ~22 min android-e2e 📦 apk
✔️ 19dc2c3 #1 2019-01-30 17:09:22 ~22 min android 📦 apk
✔️ 19dc2c3 #1 2019-01-30 17:13:32 ~26 min linux 📦 App
✔️ 19dc2c3 #1 2019-01-30 17:14:46 ~27 min windows 📦 exe
a25a3a2 #2 2019-01-31 13:15:03 ~2 min windows 📄 log
✔️ a25a3a2 #2 2019-01-31 13:28:34 ~15 min ios 📦 ipa
✔️ a25a3a2 #2 2019-01-31 13:28:45 ~16 min ios-e2e 📦 pkg
✔️ a25a3a2 #2 2019-01-31 13:29:46 ~17 min android 📦 apk
✔️ a25a3a2 #2 2019-01-31 13:30:22 ~17 min android-e2e 📦 apk
✔️ a25a3a2 #2 2019-01-31 13:31:42 ~19 min macos 📦 dmg
✔️ a25a3a2 #2 2019-01-31 13:33:15 ~20 min linux 📦 App
✔️ a25a3a2 #3 2019-01-31 13:36:39 ~18 min windows 📦 exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 16fcb55 #3 2019-01-31 14:41:59 ~15 min ios-e2e 📦 pkg
✔️ 16fcb55 #3 2019-01-31 14:42:05 ~15 min android 📦 apk
✔️ 16fcb55 #3 2019-01-31 14:44:10 ~18 min android-e2e 📦 apk
✔️ 16fcb55 #4 2019-01-31 14:45:10 ~18 min windows 📦 exe
✔️ 16fcb55 #3 2019-01-31 14:45:32 ~19 min ios 📦 ipa
✔️ 16fcb55 #3 2019-01-31 14:47:30 ~21 min linux 📦 App
✔️ 16fcb55 #3 2019-01-31 14:52:22 ~26 min macos 📦 dmg
f21e378 #4 2019-02-14 10:06:07 ~1 min ios 📄 log
f21e378 #4 2019-02-14 10:06:09 ~1 min ios-e2e 📄 log
f21e378 #5 2019-02-14 10:07:44 ~1 min ios 📄 log
f21e378 #5 2019-02-14 10:07:45 ~1 min ios-e2e 📄 log
f21e378 #6 2019-02-14 10:19:48 ~10 min ios-e2e 📄 log
✔️ f21e378 #4 2019-02-14 10:20:08 ~15 min macos 📦 dmg
f21e378 #6 2019-02-14 10:21:18 ~10 min ios 📄 log
✔️ f21e378 #4 2019-02-14 10:26:43 ~22 min android 📦 apk
✔️ f21e378 #4 2019-02-14 10:26:47 ~22 min android-e2e 📦 apk
f21e378 #7 2019-02-14 10:29:40 ~8 min ios-e2e 📄 log
✔️ f21e378 #5 2019-02-14 10:34:23 ~29 min windows 📦 exe
✔️ f21e378 #4 2019-02-14 10:35:54 ~31 min linux 📦 App
✔️ f21e378 #8 2019-02-14 11:46:03 ~16 min ios-e2e 📦 pkg
✔️ f21e378 #7 2019-02-14 11:59:12 ~14 min ios 📦 ipa

@mandrigin
Copy link
Contributor Author

I tried it locally in iOS simulator where Little Snitch blocked all Status trafic except :80 and :443 and it seems to help. On eth.beta the app is ever-"connecting" or "Offline" whereas on eth.staging I can connect and send message.

@mandrigin
Copy link
Contributor Author

@jakubgs it looks like we can proceed and setup the same stuff on eth.beta. But keep in mind public keys of the nodes, make sure that all of them will be still available on eth.beta.

This PR changes a few of them for eth.staging I don't exactly know why.

@jakubgs
Copy link
Member

jakubgs commented Jan 30, 2019

This PR changes a few of them for eth.staging I don't exactly know why.

Ah yeah, because I was updating keys in Consul by hand, I must have missed one or two, my bad. I'll make sure to not do that on Beta.

@mandrigin
Copy link
Contributor Author

@jakubgs so, ping me when you will do that and then I will be able to update and un-WIP this PR.

@mandrigin mandrigin changed the title [WIP] Communicate with bootnodes, mailservers and whisper nodes by :443 (staging, test) Communicate with bootnodes, mailservers and whisper nodes by :443 (staging, test) Jan 31, 2019
@mandrigin mandrigin changed the title Communicate with bootnodes, mailservers and whisper nodes by :443 (staging, test) Communicate with bootnodes, mailservers and whisper nodes by :443 (staging, test, beta) Jan 31, 2019
@status-github-bot
Copy link

status-github-bot bot commented Jan 31, 2019

Pull Request Checklist

  • Have you updated the documentation, if impacted (e.g. docs.status.im)?

@status-github-bot status-github-bot bot added this to TO TEST in Pipeline for QA Jan 31, 2019
@statustestbot
Copy link

100% of end-end tests have passed

Total executed tests: 58
Failed tests: 0
Passed tests: 58

Passed tests (58)

Click to expand
1. test_create_account
Device sessions

2. test_user_can_switch_network
Device sessions

3. test_filters_from_daap
Device sessions

4. test_copy_and_paste_messages
Device sessions

5. test_send_transaction_from_daap
Device sessions

6. test_request_and_receive_tokens_in_1_1_chat
Device sessions

7. test_delete_cut_and_paste_messages
Device sessions

8. test_deploy_contract_from_daap
Device sessions

9. test_offline_login
Device sessions

10. test_pass_phrase_validation
Device sessions

11. test_public_chat_messaging
Device sessions

12. test_password_in_logcat_sign_in
Device sessions

13. test_set_profile_picture
Device sessions

14. test_text_message_1_1_chat
Device sessions

15. test_add_to_contacts
Device sessions

16. test_unread_messages_counter_1_1_chat
Device sessions

17. test_logcat_send_transaction_from_daap
Device sessions

18. test_onboarding_screen_when_requesting_tokens_for_new_account
Device sessions

19. test_logcat_send_transaction_from_wallet
Device sessions

20. test_send_token_with_7_decimals
Device sessions

21. test_modify_transaction_fee_values
Device sessions

22. test_token_with_more_than_allowed_decimals
Device sessions

23. test_send_eth_from_wallet_to_address
Device sessions

24. test_send_transaction_details_in_1_1_chat
Device sessions

25. test_manage_assets
Device sessions

26. test_wallet_set_up
Device sessions

27. test_logcat_send_transaction_in_1_1_chat
Device sessions

28. test_request_and_receive_eth_in_1_1_chat
Device sessions

29. test_swipe_to_delete_public_chat
Device sessions

30. test_passphrase_whitespaces_ignored_while_recovering_access
Device sessions

31. test_send_emoji
Device sessions

32. test_add_contact_by_pasting_public_key
Device sessions

33. test_logcat_recovering_account
Device sessions

34. test_messaging_in_different_networks
Device sessions

35. test_send_tokens_in_1_1_chat
Device sessions

36. test_network_mismatch_for_send_request_commands
Device sessions

37. test_logcat_sign_message_from_daap
Device sessions

38. test_swipe_to_delete_1_1_chat
Device sessions

39. test_switch_users_and_add_new_account
Device sessions

40. test_send_stt_from_wallet
Device sessions

41. test_send_eth_in_1_1_chat
Device sessions

42. test_login_with_new_account
Device sessions

43. test_send_eth_from_wallet_to_contact
Device sessions

44. test_add_contact_from_public_chat
Device sessions

45. test_send_request_not_enabled_tokens
Device sessions

46. test_send_message_to_newly_added_contact
Device sessions

47. test_password_in_logcat_creating_account
Device sessions

48. test_backup_recovery_phrase
Device sessions

49. test_offline_status
Device sessions

50. test_open_google_com_via_open_dapp
Device sessions

51. test_unread_messages_counter_public_chat
Device sessions

52. test_sign_message_from_daap
Device sessions

53. test_user_can_remove_profile_picture
Device sessions

54. test_share_contact_code_and_wallet_address
Device sessions

55. test_request_eth_in_wallet
Device sessions

56. test_refresh_button_browsing_app_webview
Device sessions

57. test_backup_recovery_phrase_warning_from_wallet
Device sessions

58. test_recover_account
Device sessions

@Serhy
Copy link
Contributor

Serhy commented Feb 13, 2019

Latest builds here for Android, iOS, MacOS builds were tested.
I can't tweak with coworking wifi settings, so MacOS (and iOS with Android too) tested on a matter of regressions which were not found.
I also went to macdonalds and local store nearby to use their public wifi (with iOS and Android devices) :) Confirmed with each mailserver there, from staging fleet and some mailsevers from fleets.beta (except do-ams3.eth.beta mailservers), that offline inbox history fetched, can exchange messages between two contacts, can receive PNs.

From netstat output (for emulator) it's visible that mailservers ips are using https (so 443) port with established connection, means that with using updated ports everything works properly.

@mandrigin do we intentionally keep mail-03.do-ams3.eth.beta, mail-03.do-ams3.eth.beta, mail-03.do-ams3.eth.beta staying to use 30504 port? If yes, then it ready for merge

@mandrigin
Copy link
Contributor Author

mandrigin commented Feb 14, 2019

@Serhy yeah, I just followed whatever is in http://fleets.status.im

@jakubgs
Copy link
Member

jakubgs commented Feb 14, 2019

I don't see 30504 anywhere in https://fleets.status.im, so this change is just a bit stale.

@mandrigin mandrigin force-pushed the use-https-port-for-whisper-nodes branch from 16fcb55 to f21e378 Compare February 14, 2019 10:04
@mandrigin
Copy link
Contributor Author

fixed that

@mandrigin
Copy link
Contributor Author

@Serhy can we re-run e2e tests on this branch when the build is complete? I fixed the last ports, so if e2e pass, I think it is safe to merge.

@Serhy
Copy link
Contributor

Serhy commented Feb 14, 2019

@mandrigin, @jakubgs thanks for update.
Once builds made, will run e2e tests, yes.

@mandrigin
Copy link
Contributor Author

@Serhy android-e2e is done, so we can run tests now.

@Serhy
Copy link
Contributor

Serhy commented Feb 14, 2019

e2e tests are in progress now...

@statustestbot
Copy link

100% of end-end tests have passed

Total executed tests: 58
Failed tests: 0
Passed tests: 58

Passed tests (58)

Click to expand
1. test_create_account
Device sessions

2. test_user_can_switch_network
Device sessions

3. test_filters_from_daap
Device sessions

4. test_copy_and_paste_messages
Device sessions

5. test_send_transaction_from_daap
Device sessions

6. test_request_and_receive_tokens_in_1_1_chat
Device sessions

7. test_delete_cut_and_paste_messages
Device sessions

8. test_deploy_contract_from_daap
Device sessions

9. test_offline_login
Device sessions

10. test_pass_phrase_validation
Device sessions

11. test_public_chat_messaging
Device sessions

12. test_password_in_logcat_sign_in
Device sessions

13. test_set_profile_picture
Device sessions

14. test_text_message_1_1_chat
Device sessions

15. test_add_to_contacts
Device sessions

16. test_unread_messages_counter_1_1_chat
Device sessions

17. test_logcat_send_transaction_from_daap
Device sessions

18. test_onboarding_screen_when_requesting_tokens_for_new_account
Device sessions

19. test_logcat_send_transaction_from_wallet
Device sessions

20. test_send_token_with_7_decimals
Device sessions

21. test_modify_transaction_fee_values
Device sessions

22. test_token_with_more_than_allowed_decimals
Device sessions

23. test_send_eth_from_wallet_to_address
Device sessions

24. test_send_transaction_details_in_1_1_chat
Device sessions

25. test_manage_assets
Device sessions

26. test_wallet_set_up
Device sessions

27. test_logcat_send_transaction_in_1_1_chat
Device sessions

28. test_request_and_receive_eth_in_1_1_chat
Device sessions

29. test_swipe_to_delete_public_chat
Device sessions

30. test_passphrase_whitespaces_ignored_while_recovering_access
Device sessions

31. test_send_emoji
Device sessions

32. test_add_contact_by_pasting_public_key
Device sessions

33. test_logcat_recovering_account
Device sessions

34. test_messaging_in_different_networks
Device sessions

35. test_send_tokens_in_1_1_chat
Device sessions

36. test_network_mismatch_for_send_request_commands
Device sessions

37. test_logcat_sign_message_from_daap
Device sessions

38. test_swipe_to_delete_1_1_chat
Device sessions

39. test_switch_users_and_add_new_account
Device sessions

40. test_send_stt_from_wallet
Device sessions

41. test_send_eth_in_1_1_chat
Device sessions

42. test_login_with_new_account
Device sessions

43. test_send_eth_from_wallet_to_contact
Device sessions

44. test_add_contact_from_public_chat
Device sessions

45. test_send_request_not_enabled_tokens
Device sessions

46. test_send_message_to_newly_added_contact
Device sessions

47. test_password_in_logcat_creating_account
Device sessions

48. test_backup_recovery_phrase
Device sessions

49. test_offline_status
Device sessions

50. test_open_google_com_via_open_dapp
Device sessions

51. test_unread_messages_counter_public_chat
Device sessions

52. test_sign_message_from_daap
Device sessions

53. test_user_can_remove_profile_picture
Device sessions

54. test_share_contact_code_and_wallet_address
Device sessions

55. test_request_eth_in_wallet
Device sessions

56. test_refresh_button_browsing_app_webview
Device sessions

57. test_backup_recovery_phrase_warning_from_wallet
Device sessions

58. test_recover_account
Device sessions

@Serhy
Copy link
Contributor

Serhy commented Feb 14, 2019

@mandrigin for me mail-01.do-ams3.eth.beta always fails to establish the connection.
It's all with nightly build (where 30504 port), but once updated to the latest PR builds the 'Failed to connect to mailserver' pop-up appears.
Only with mail-01.do-ams3.eth.beta, the rest mailservers are ok.

@jakubgs
Copy link
Member

jakubgs commented Feb 14, 2019

@Serhy what is your IP or peer ID? You might be a stale peer on that mailserver.

@Serhy
Copy link
Contributor

Serhy commented Feb 14, 2019

@jakubgs My IP: 213.160.136.62

@jakubgs
Copy link
Member

jakubgs commented Feb 14, 2019

Hmmm, I don't see you in peers on mail-01.do-ams3.eth.beta.

But I checked on the host and it was missing the firewall rule:

admin@mail-01.do-ams3.eth.beta:~ % sudo iptables -t nat -L PREROUTING
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
DOCKER     all  --  anywhere             anywhere             ADDRTYPE match dst-type LOCAL

And I saw that the healtcheck was failing:
https://canary.status.im/icingaweb2/dashboard#!/icingaweb2/monitoring/service/show?host=mail-01.do-ams3.eth.beta&service=statusd-mail
So I ran ansible on it, it should be fine now:

admin@mail-01.do-ams3.eth.beta:~ % sudo iptables -t nat -L PREROUTING
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
DOCKER     all  --  anywhere             anywhere             ADDRTYPE match dst-type LOCAL
REDIRECT   tcp  --  anywhere             anywhere             tcp dpt:https /* Redirect 443 to 30504 */ redir ports 30504

Thanks for reporting this.

@Serhy
Copy link
Contributor

Serhy commented Feb 14, 2019

I don't see you in peers on mail-01.do-ams3.eth.beta

Yeah, at that time I was on this PR build, and failing to establish the connection with mail-01.
Thanks for noticing and adding the redirect rule! Yes, I can confirm with MacOS and Android connection established with mail-01.do-ams3.eth.beta, offline messages featched.

iOS builds failing to succeed, @jakubgs could you take a look please?

@jakubgs
Copy link
Member

jakubgs commented Feb 14, 2019

Yeah, no idea what that's about. Xcode fails to build but there is no error whatsoever.

@mandrigin
Copy link
Contributor Author

@Serhy @jakubgs is it just this PR? makes no sense, it fails to compile Firebase...

@mandrigin
Copy link
Contributor Author

@Serhy now it passes. I've no idea what was it...

@Serhy
Copy link
Contributor

Serhy commented Feb 14, 2019

Cool! Mailservers are OK with iOS build too.
Lets merge this, @mandrigin !

@Serhy Serhy moved this from IN TESTING to MERGE in Pipeline for QA Feb 14, 2019
…aging, test)

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
@mandrigin mandrigin force-pushed the use-https-port-for-whisper-nodes branch from f21e378 to 2c77822 Compare February 14, 2019 12:45
@mandrigin mandrigin merged commit 2c77822 into develop Feb 14, 2019
Pipeline for QA automation moved this from MERGE to DONE Feb 14, 2019
@delete-merged-branch delete-merged-branch bot deleted the use-https-port-for-whisper-nodes branch February 14, 2019 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
6 participants