Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Mac DE 2nd run of start-object-server.command kills all running apps #48

Closed
AndyDentFree opened this issue Nov 13, 2016 · 11 comments
Closed
Assignees

Comments

@AndyDentFree
Copy link

AndyDentFree commented Nov 13, 2016

If you run the start command whilst a server is already running it can kill all your (GUI) apps.

(Changelog says this is Object Server 1.0.0-beta-4.2)

  • Double-clicked on the start-object-server.command
  • later, after laptop sleep, didn't realise was still running first copy
  • Double-clicked on the start-object-server.command
  • in the Terminal window was prompted Another instance...already running
  • typed yes to terminate the other instance
  • all running Mac apps died leaving only the Terminal going

This is 100% repeatable.

(full log available from Terminal window but may want to just forward privately - unsure if things like the Admin token should be public here)

@teotwaki
Copy link
Contributor

@AndyDentFree What's the behaviour you would expect?

@AndyDentFree
Copy link
Author

AndyDentFree commented Nov 28, 2016

Expected behaviour - It should not affect any other apps. It should just replace the server instance.

When I say all running Mac apps died, I am not talking about any other apps related to Realm or Mac DE. Every single app on my machine died.

I just repeated the test on a different Mac.

As soon as I typed in yes to terminate the server instance, it killed off:

  • Chrome (each process for each tab)
  • Evernote
  • Preview
  • SourceTree

@AndyDentFree
Copy link
Author

Just to clarify, the only things left running after the crash described above were:

  • Finder
  • Terminal
  • Chrome, with a series of crashed windows, because every process backing them had been killed.

@radu-tutueanu
Copy link
Contributor

@AndyDentFree What is the absolute path for the start-object-server.command file?

@radu-tutueanu radu-tutueanu self-assigned this Nov 28, 2016
@teotwaki
Copy link
Contributor

@AndyDentFree I can't reproduce this, and neither can @radu-tutueanu. Any chance you could give more details about your setup (paths and stuff). I think that might have a fairly important impact here (especially spaces in usernames and stuff like that).

Thanks.

@AndyDentFree
Copy link
Author

First run of server, after moving the folder to the user root.

Last login: Mon Nov 28 17:43:20 on ttys000
AndyDMBR13:~ andydent$ /Users/andydent/realm-mobile-platform/start-object-server.command ; exit;

Your admin access token is: ewoJImlkZW50aXR5IjogImFkbWluIiwKCSJhY2Nlc3MiOiBbInVwbG9hZCIsICJkb3dubG9hZCIsICJtYW5hZ2UiXQp9Cg==:C5cvsDDd43JhqNRTr83zp+w3ivo8PKa7dvPe2qxMRj7YB2ARjJzKwccVjyvYoYK9e9DQPAbXf/38lYeaGSKDrUQKnpAEXDS1KpVFTCRNIoihCil9WhwGlkHaSAAattn4yrD20Ej5mPDHPMvXcbEepotbg5bQYsteiBs5Ehudbw3Stl5NW9jwKhdNxtOAOoEp/iwIHHCOAkQDBEJCnjf9tI0OIoWhMknPgmBLgYUBiX0pogmtr2fzLvK/O84z+hObdzqf39YC2JniIkZnzBpn645zBKJP0Q0aJ3YaL+IEOzsupUhc2+opq/LtxdD9UgoTEd2w8miXFh3A/G2wS4wMbw==
~/realm-mobile-platform/realm-object-server/object-server ~
~
2016-11-28T15:20:16.084Z - info: Logging to console at level 'info'.
2016-11-28T15:20:16.158Z - info: Realm Object Server sync server listening on 127.0.0.1:27800.
2016-11-28T15:20:16.186Z - info: Realm Object Server web server listening on 127.0.0.1:27080.
2016-11-28T15:20:16.187Z - info: http proxy listening on :::9080.
2016-11-28T15:20:16.188Z - info: sync-server: Realm sync server started ([realm-core-2.1.4], [realm-sync-1.0.0-BETA-3.3])
2016-11-28T15:20:16.188Z - info: sync-server: Directory holding persistent state: /Users/andydent/realm-mobile-platform/realm-object-server/object-server/root_dir/user_data
2016-11-28T15:20:16.189Z - info: sync-server: Listening on 127.0.0.1:27800 (sync protocol version 15)
2016-11-28T15:20:17.113Z - info: sync-server: Connection[1]: Connection from 127.0.0.1:60867
2016-11-28T15:20:17.114Z - info: sync-server: Connection[1]: Received: CLIENT(protocol_version=15, client_info_size=2, client_info='{}')
2016-11-28T15:20:17.114Z - info: sync-server: Connection[1]: Session[1]: Session initiated (session_ident=1).
2016-11-28T15:20:17.114Z - info: sync-server: Connection[1]: Session[1]: Received: BIND(server_path=/__admin, signed_user_token='...gf/vhVS8J0IfZWMTQmW8TLM0KzyQ==', need_file_ident_pair=0)
2016-11-28T15:20:17.120Z - info: sync-server: Connection[1]: Session[1]: Received: IDENT(server_file_ident=7967867699069015867, client_file_ident=1, client_file_ident_secret=86404675054086023, scan_server_version=14, scan_client_version=23, latest_server_version=14, latest_server_session_ident=1742012256816635708)
2016-11-28T15:20:17.121Z - info: sync-server: Connection[1]: Session[2]: Session initiated (session_ident=2).
2016-11-28T15:20:17.121Z - info: sync-server: Connection[1]: Session[2]: Received: BIND(server_path=/__admin, signed_user_token='...gf/vhVS8J0IfZWMTQmW8TLM0KzyQ==', need_file_ident_pair=0)
2016-11-28T15:20:17.124Z - info: sync-server: Connection[1]: Session[2]: Received: IDENT(server_file_ident=7967867699069015867, client_file_ident=2, client_file_ident_secret=331263474452070079, scan_server_version=14, scan_client_version=12, latest_server_version=14, latest_server_session_ident=1742012256816635708)
2016-11-28T15:20:17.124Z - error: sync-server: Connection[1]: Session[2]: Bad changeset received: Unsupported instruction for merge. (message_type='upload')
2016-11-28T15:20:17.125Z - info: sync-server: Connection[1]: Session[1]: Session terminated (session_ident=1).
2016-11-28T15:20:17.125Z - info: sync-server: Connection[1]: Session[2]: Session terminated (session_ident=2).
2016-11-28T15:20:17.125Z - info: sync-server: Connection[1]: Sending: ERROR(error_code=212, message_size=22, try_again=0, session_ident=2)
2016-11-28T15:20:17.125Z - info: sync-server: Connection[1]: Connection closed by client: End of input
2016-11-28T15:20:35.963Z - info: sync-server: Connection[2]: Connection from 127.0.0.1:60918
2016-11-28T15:20:35.963Z - info: sync-server: Connection[2]: Connection closed by client: End of input

@AndyDentFree
Copy link
Author

Ran 2nd run with it at root and no problems

@AndyDentFree
Copy link
Author

Run server after moving back to path that, yes, had spaces in it:

Last login: Mon Nov 28 23:20:41 on ttys001
/Users/andydent/dev/Realm/scratch\ dotnet\ on\ MBR/realm-mobile-platform/start-object-server.command ; exit;
AndyDMBR13:~ andydent$ /Users/andydent/dev/Realm/scratch\ dotnet\ on\ MBR/realm-mobile-platform/start-object-server.command ; exit;

Your admin access token is: ewoJImlkZW50aXR5IjogImFkbWluIiwKCSJhY2Nlc3MiOiBbInVwbG9hZCIsICJkb3dubG9hZCIsICJtYW5hZ2UiXQp9Cg==:C5cvsDDd43JhqNRTr83zp+w3ivo8PKa7dvPe2qxMRj7YB2ARjJzKwccVjyvYoYK9e9DQPAbXf/38lYeaGSKDrUQKnpAEXDS1KpVFTCRNIoihCil9WhwGlkHaSAAattn4yrD20Ej5mPDHPMvXcbEepotbg5bQYsteiBs5Ehudbw3Stl5NW9jwKhdNxtOAOoEp/iwIHHCOAkQDBEJCnjf9tI0OIoWhMknPgmBLgYUBiX0pogmtr2fzLvK/O84z+hObdzqf39YC2JniIkZnzBpn645zBKJP0Q0aJ3YaL+IEOzsupUhc2+opq/LtxdD9UgoTEd2w8miXFh3A/G2wS4wMbw==
~/dev/Realm/scratch dotnet on MBR/realm-mobile-platform/realm-object-server/object-server ~
~
2016-11-28T15:24:01.935Z - info: Logging to console at level 'info'.
2016-11-28T15:24:01.969Z - info: Realm Object Server sync server listening on 127.0.0.1:27800.
2016-11-28T15:24:01.982Z - info: Realm Object Server web server listening on 127.0.0.1:27080.
2016-11-28T15:24:01.985Z - info: http proxy listening on :::9080.
2016-11-28T15:24:01.987Z - info: sync-server: Realm sync server started ([realm-core-2.1.4], [realm-sync-1.0.0-BETA-3.3])
2016-11-28T15:24:01.987Z - info: sync-server: Directory holding persistent state: /Users/andydent/dev/Realm/scratch dotnet on MBR/realm-mobile-platform/realm-object-server/object-server/root_dir/user_data
2016-11-28T15:24:01.987Z - info: sync-server: Listening on 127.0.0.1:27800 (sync protocol version 15)
2016-11-28T15:24:02.875Z - info: sync-server: Connection[1]: Connection from 127.0.0.1:61398
2016-11-28T15:24:02.875Z - info: sync-server: Connection[1]: Received: CLIENT(protocol_version=15, client_info_size=2, client_info='{}')
2016-11-28T15:24:02.875Z - info: sync-server: Connection[1]: Session[1]: Session initiated (session_ident=1).
2016-11-28T15:24:02.875Z - info: sync-server: Connection[1]: Session[1]: Received: BIND(server_path=/__admin, signed_user_token='...gf/vhVS8J0IfZWMTQmW8TLM0KzyQ==', need_file_ident_pair=0)
2016-11-28T15:24:02.875Z - info: sync-server: Connection[1]: Session[1]: Received: IDENT(server_file_ident=7967867699069015867, client_file_ident=1, client_file_ident_secret=86404675054086023, scan_server_version=15, scan_client_version=26, latest_server_version=15, latest_server_session_ident=2372956426350803828)
2016-11-28T15:24:02.875Z - info: sync-server: Connection[1]: Session[2]: Session initiated (session_ident=2).
2016-11-28T15:24:02.875Z - info: sync-server: Connection[1]: Session[2]: Received: BIND(server_path=/__admin, signed_user_token='...gf/vhVS8J0IfZWMTQmW8TLM0KzyQ==', need_file_ident_pair=0)
2016-11-28T15:24:02.875Z - info: sync-server: Connection[1]: Session[2]: Received: IDENT(server_file_ident=7967867699069015867, client_file_ident=2, client_file_ident_secret=331263474452070079, scan_server_version=14, scan_client_version=12, latest_server_version=14, latest_server_session_ident=1742012256816635708)
2016-11-28T15:24:02.875Z - error: sync-server: Connection[1]: Session[2]: Bad changeset received: Unsupported instruction for merge. (message_type='upload')
2016-11-28T15:24:02.876Z - info: sync-server: Connection[1]: Session[1]: Session terminated (session_ident=1).
2016-11-28T15:24:02.876Z - info: sync-server: Connection[1]: Session[2]: Session terminated (session_ident=2).
2016-11-28T15:24:02.876Z - info: sync-server: Connection[1]: Sending: ERROR(error_code=212, message_size=22, try_again=0, session_ident=2)
2016-11-28T15:24:02.876Z - info: sync-server: Connection[1]: Connection closed by client: End of input

@AndyDentFree
Copy link
Author

Yes - good call. When I moved it back to that location with spaces in the path, it killed everything.

@teotwaki
Copy link
Contributor

Can you test with @radu-tutueanu's fix in https://github.com/realm/realm-sync-services/issues/540? It just adds quotes, so should be able to handle spaces in the path.

@AndyDentFree
Copy link
Author

👍 yep, that fixed it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants