Closed HChughtai closed 2 months ago
Hi @p-j-smith and @drmatthews,
Do you recall the rationale for the server block within the stream block here?
{% if nginx_upstream_port is defined and nginx_upstream_listen_port is defined %}
stream {
upstream backend {
server localhost:{{ nginx_upstream_port }};
}
server {
listen {{ nginx_upstream_listen_port }};
proxy_pass backend;
}
}
{% endif %}
Right now by default nginx_upstream_listen_port
== nginx_upstream_port
== default XNAT DICOM SCP port = 8104 which is causing issues as two things are trying to listen on the same port.
Looking at older commits, the stream block was the same structure as here (but with different variable names) The difference was that one port was 104
and the other was 8104
which meant there wasn't a clash.
Looking at older commits, the stream block was the same structure as here (but with different variable names) The difference was that one port was 104 and the other was 8104 which meant there wasn't a clash.
Looks like it was changed in this pr to resolve this issue. Shall we change the defaults back to 104 and 8104?
Ah, so it was my fault 🤦🏽 for not realising why those ports were different. It is a bit confusing that the XNAT interface will say 8104, whilst the port to use will be 104. I'm tempted to say that we stream the port directly through
Ah, so it was my fault 🤦🏽 for not realising why those ports were different.
No worries 😄 I also should have checked what those ports were for before making the changes.
I'm tempted to say that we stream the port directly through
Do you know how do we do this? Does the nginx config need changing?
Do you know how do we do this? Does the nginx config need changing?
Yeah, we can just remove the entire stream
block so nginx doesn't handle connections on the DICOM port. The firewall will still allow connections on the DICOM port but will connection directly to Tomcat:8104
ah I see, yeah that sounds like a much better way of doing it
I'm planning to do a PR next week when I'm back on an ARC sprint. Going to think about how we might allow configuration of multiple DICOM SCP ports at the same time.
Looking at older commits, the stream block was the same structure as here (but with different variable names) The difference was that one port was 104 and the other was 8104 which meant there wasn't a clash.
Should we change the defaults back to 104 and 8104 for now? Or remove the stream block?
Should we change the defaults back to 104 and 8104 for now? Or remove the stream block?
I've got the change for removing the stream block pretty much ready to go. I'll open a PR with that, and we can do further changes to handling multiple DICOM ports as we need to.
Short Description
Identified through UCL-MIRSG/UCLMedicalImagingEnv#401, the default configuration for the
nginx
role clashes with the default DICOM SCP receiver that XNAT starts on port 8104.As nginx starts up first, it starts listening on
nginx_upstream_listen_port
(by default8104
and so preventst XNAT/Tomcat from listening on it. This means that the DICOM SCP receiver is blocked from starting up.Evidence/Steps to Reproduce
See UCL-MIRSG/UCLMedicalImagingEnv#401
Acceptance Criteria/Expected Behaviour
Details
No response
Resolution
No response