Herby VojÄÃk wrote:
Nicolai Hess wrote:
2017-07-26 13:08 GMT+02:00 Herby VojÄÃk <herby@mailbox.sk <mailto:herby@mailbox.sk>>:
Nicolai Hess wrote:
2017-07-26 12:09 GMT+02:00 <herby@mailbox.sk <mailto:herby@mailbox.sk> <mailto:herby@mailbox.sk <mailto:herby@mailbox.sk>>>:
On July 26, 2017 11:53:41 AM GMT+02:00, Sven Van Caekenberghe <sven@stfx.eu <mailto:sven@stfx.eu> <mailto:sven@stfx.eu <mailto:sven@stfx.eu>>> wrote:
On 25 Jul 2017, at 19:46, Cyril Ferlicot D. <cyril.ferlicot@gmail.com <mailto:cyril.ferlicot@gmail.com>
<mailto:cyril.ferlicot@gmail.com <mailto:cyril.ferlicot@gmail.com>>> wrote:
Le 25/07/2017 à 19:37, Sven Van Caekenberghe a écrit :
Hi,
User Herby VojÄÃk seems to have an issue with the
--headless option on Windows 10
https://pharo.fogbugz.com/f/cases/20271/ZnServer-managedServers-disappear-wh...
<https://pharo.fogbugz.com/f/cases/20271/ZnServer-managedServers-disappear-wh...>
<https://pharo.fogbugz.com/f/cases/20271/ZnServer-managedServers-disappear-wh...
<https://pharo.fogbugz.com/f/cases/20271/ZnServer-managedServers-disappear-when-headless-mode-used>>
I cannot reproduce his problem.
Maybe there are Windows users out there who can have a look
and help him ?
Anyone ?
I can reproduce the strange output:
pharo --headless Pharo.image st sample.st <http://sample.st> <http://sample.st>
with sample.st <http://sample.st> <http://sample.st> contains
(ZnServer startOn: 8888) register. Smalltalk snapshot: true andQuit: true.
Now starting the pharo image in gui mode
pharo --headless Pharo.image
This should probably be without --headless to be less strange (running in gui mode does not need --headless, if --headless starts gui without cli args in Win, that is probably another issue that should be raised for win vm)
Oh, yes of course, I meant running pharo Pharo.image
I can access localhost:8888
but ZnServer managedServers evaluates to "an IdentitySet()"
running
pharo --headless Pharo.image eval "ZnServer managedServers" shows an IdentitySet(a ZnManagingMultiThreadedServer(stopped 8888))
Wow, it did not come to my mind to check that. That means it is indeed the headless to gui transition that is problematic as headless to headless is fine.
running eval without headless option:
pharo Pharo.image eval "ZnServer managedServers" the set is again empty: an IdentitySet()
Thanks, Herby
It lools like ZnServer resets the ManagedServers variable, if the image starts without the headless option.
The problem is not image started without headless. It works fine if it started without headless, just the sample.st must also be run without headless. Only problem is sample.st run with headless and subsequently image run without headless.
It unregisters it as a result of [ :each | each start ] during startup phase in which the server(s) is(are) already in running state, as shown in my last pharodebug.log posted here.
Maybe it launches startup phase twice, first doing it correctly, second time failing it because start message is in fact startWhenStoppedButRestartAndUnregisterWhenRunnning.
It indeed looks like startup is happening twice (or Zinc installs two startup hooks). I changed ZnSingleThreadedServer >> start to include Transcript cr; show: '--- ZnServer >> start ---'; show: DateAndTime now; show: ' ---'; cr; print: self; cr. as the first statement, added 5 second pause between the --headless script and gui image start and got this in the transcript window: --- ZnServer >> start ---2017-07-26T14:40:57.478631+02:00 --- a ZnManagingMultiThreadedServer(stopped 4998) --- ZnServer >> start ---2017-07-26T14:40:57.705631+02:00 --- a ZnManagingMultiThreadedServer(running 4998) Now for the scarier part: when I ran the script in gui, and subsequently loaded the image, the transcript shows: Loaded -> Mocketry-Domain-Tests-cypress.1 --- github://dionisiydk/Mocketry:v4.0.x [c21364a:v4.0.x] --- cache ...finished baseline --- ZnServer >> start ---2017-07-26T14:51:12.643052+02:00 --- a ZnManagingMultiThreadedServer(stopped 4998) --- ZnServer >> start ---2017-07-26T14:51:18.359584+02:00 --- a ZnManagingMultiThreadedServer(stopped 4998) It seems only one start was sent in second image, because there is 5 second delay. But it is at the same time scary, as in brings more questions than answers.
Herby