Skip to content

Comments

41 error data server host environment variable is not set cannot continue#47

Merged
RussBerg merged 10 commits intomasterfrom
41-error-data_server_host-environment-variable-is-not-set-cannot-continue
Nov 19, 2025
Merged

41 error data server host environment variable is not set cannot continue#47
RussBerg merged 10 commits intomasterfrom
41-error-data_server_host-environment-variable-is-not-set-cannot-continue

Conversation

@RussBerg
Copy link
Collaborator

@RussBerg RussBerg commented Nov 3, 2025

  • Removed support for windows paths, merged data directory env vars to just DATA_DIRECTORY
  • Merged environment variables for Pixelator and nx-server to just use DATA_SUB_PORT
  • Added updates to README for startup and configuration

@RussBerg RussBerg linked an issue Nov 3, 2025 that may be closed by this pull request
@RussBerg RussBerg requested a review from benajamin November 3, 2025 17:36
@benajamin
Copy link
Collaborator

benajamin commented Nov 6, 2025

I'm testing with a clean copy of this branch. miniforge is already installed, but not on by default (i.e. is not in .bashrc) and I will activate it first with source miniforge/bin/activate pyStxm. Then I do:

  • cd pyStxm
  • pip install -r requirements.txt - already satisfied.
  • edited reqd_env_vars.sh to set DCS_HOST and DATA_SERVER_HOST to "127.0.0.1" (Why not make this the default instead of "IP ADDR HERE"?) and set the DATA_DIR. Where you refer to "NeXusDiscardSubDirectory", it should be "NeXusLocalBaseDirectory".
  • checked cls/applications/pyStxm/app.ini but it was already set for pollux. Might be better to have a config for the NoHardware pixelator settings in addition to real beamline configs.
  • xrandr gives:
Screen 0: minimum 320 x 200, current 3440 x 1440, maximum 16384 x 16384
HDMI-A-1 connected primary 3440x1440+0+0 (normal left inverted right x axis y axis) 795mm x 334mm
   3440x1440     60.00*+  99.99    50.00

This is less of an instruction and more of a "sucks to be you".

  • I start the pyStxm branch of Pixelator
  • ./runpyStxm - the pyStxm window appears.

That looks like success to me.

@benajamin
Copy link
Collaborator

I tried to run a scan and Pixelator crashed because I hadn't set the "NeXusBaseDirectory" config to something sensible. PyStxm refused to close (^C also gave weird errors that didn't close it down) and I had to send it a kill signal!

Set config properly and the next attempt at a sample scan worked OK.

@RussBerg
Copy link
Collaborator Author

RussBerg commented Nov 6, 2025

I'm testing with a clean copy of this branch. miniforge is already installed, but not on by default (i.e. is not in .bashrc) and I will activate it first with source miniforge/bin/activate pyStxm. Then I do:

  • cd pyStxm
  • pip install -r requirements.txt - already satisfied.
  • edited reqd_env_vars.sh to set DCS_HOST and DATA_SERVER_HOST to "127.0.0.1" (Why not make this the default instead of "IP ADDR HERE"?)

I treat things like this like they are a red emergency switch, once thrown it requires human intervention, for example if a person forgets to set the variable the error is reported "Can't connect to data server host IP ADDR HERE" gives a pretty good indication as to what is wrong and how to fix it. So in the case where there is a locally running Pixelator for settingsNoHardware and they forget to set it, if it was automatically 127.0.0.1 it will appear to be working but then they might waste time trying to understand why they can't change energy for example because they thought they were connected to the production Pixelator, thats the reasoning anyway.

@RussBerg RussBerg merged commit 04feb06 into master Nov 19, 2025
1 check passed
@RussBerg RussBerg deleted the 41-error-data_server_host-environment-variable-is-not-set-cannot-continue branch November 19, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ERROR: DATA_SERVER_HOST environment variable is not set, cannot continue

2 participants