tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

Simulated IOCs fail on macOS (outside Docker)

Open hyperrealist opened this issue 2 years ago • 0 comments

After following the installation instructions on macOS, running supervisor/start_supervisor.sh status shows the following output:

decay                            BACKOFF   Exited too quickly (process log may have details)
mini_beamline                    BACKOFF   Exited too quickly (process log may have details)
random_walk                      BACKOFF   Exited too quickly (process log may have details)
random_walk_horiz                BACKOFF   Exited too quickly (process log may have details)
random_walk_vert                 BACKOFF   Exited too quickly (process log may have details)
simple                           BACKOFF   Exited too quickly (process log may have details)
thermo_sim                       BACKOFF   Exited too quickly (process log may have details)
trigger_with_pc                  BACKOFF   Exited too quickly (process log may have details)

Attempting to restart IOCs using supervisor/start_supervisor.sh restart all generate the following error message.

decay: ERROR (spawn error)
random_walk: ERROR (spawn error)
random_walk_vert: ERROR (spawn error)
mini_beamline: ERROR (spawn error)
random_walk_horiz: ERROR (spawn error)
simple: ERROR (spawn error)
thermo_sim: ERROR (spawn error)
trigger_with_pc: ERROR (spawn error)

Apparent Cause macOS loopback interface only configures address 127.0.0.1 by default. But the supervisor script attempts to bind to udp ports on other local addresses, e.g: in decay.conf,

command = /usr/bin/env python3 -m caproto.ioc_examples.decay -v --interfaces=127.0.0.5

Possible Solution Add temporary aliases to macOS loopback interface, e.g:

sudo ifconfig lo0 alias 127.0.0.5

hyperrealist avatar Jan 30 '23 06:01 hyperrealist