Dockerfile works locally but is crashing on Railway

FROM softwaresecurityproject/zap-stable

ARG API_KEY
ARG PORT

ENV API_KEY=$API_KEY
ENV PORT=$PORT


# Expose the ZAP proxy port
EXPOSE $PORT

# Start ZAP in daemon mode with the specified configuration
CMD zap.sh -daemon -host 0.0.0.0 -port $PORT -config api.addrs.addr.name=.* -config api.addrs.addr.regex=true -config api.key=$API_KEY
FROM softwaresecurityproject/zap-stable

ARG API_KEY
ARG PORT

ENV API_KEY=$API_KEY
ENV PORT=$PORT


# Expose the ZAP proxy port
EXPOSE $PORT

# Start ZAP in daemon mode with the specified configuration
CMD zap.sh -daemon -host 0.0.0.0 -port $PORT -config api.addrs.addr.name=.* -config api.addrs.addr.regex=true -config api.key=$API_KEY
This works when I run locally. When I run online I am getting the following error in stdout. changed url with xxxx:xxxx
ZAP Error [org.apache.hc.core5.http.NoHttpResponseException]: xxxx:xxxx failed to respond
ZAP Error [org.apache.hc.core5.http.NoHttpResponseException]: xxxx:xxxx failed to respond
What seems to be the issue?
17 Replies
Percy
Percy10mo ago
Project ID: N/A
kmskrishna
kmskrishna10mo ago
Brody
Brody10mo ago
the xxxx:xxxx is kinda (very) important debugging information
kmskrishna
kmskrishna10mo ago
sadly I deleted the project already. But replication is straight forward. Just run that Dockerfile. Port=8080 key=anything and then do to the domain:8080 TCP tunneling.
Brody
Brody10mo ago
okay then would xxxx:xxxx have been an internal or public address and port?
kmskrishna
kmskrishna10mo ago
Yes. external one. Hi @Brody did you get a chance to test this?
Brody
Brody10mo ago
I haven't sorry, will try to test today would it be hard for me to obtain a zap api key? i wasn’t able to reproduce the ZAP Error [org.apache.hc.core5.http.NoHttpResponseException]: xxxx:xxxx failed to respond error. i deployed the softwaresecurityproject/zap-stable image with a start command set to /bin/sh -c "zap.sh -daemon -host [::] -port $PORT" opened the public url and was greeted with ERR_TOO_MANY_REDIRECTS
kmskrishna
kmskrishna10mo ago
Did you do TCP tunneling? @Brody and not visit the given URL directly.
Brody
Brody10mo ago
is this not an http service? i mean it says Http in your error
kmskrishna
kmskrishna10mo ago
It is. But it is mainly run on local servers or cloud VMs, on the IP. I figured you should use the TCP tunneling in order to make it work
Brody
Brody10mo ago
then you dont get any ssl cert
kmskrishna
kmskrishna10mo ago
Yes. SSL cert not needed.
Brody
Brody10mo ago
still, its an http service, it doesn't make sense to use the tcp proxy
kmskrishna
kmskrishna10mo ago
For now even if we use TCP proxy it throws this error.
Brody
Brody10mo ago
use the https domain and let me know if you are able to configure zap to stop sending the redirects
kmskrishna
kmskrishna10mo ago
I don't think that will work. I faced the same issue earlier.
Brody
Brody10mo ago
yeah it's not gonna work if zap keeps sending the redirects for whatever reason
Want results from more Discord servers?
Add your server