sigstore / cosign

Code signing and transparency for containers and binaries
Apache License 2.0
4.38k stars 537 forks source link

getting error while running e2e test locally #3498

Closed viveksahu26 closed 7 months ago

viveksahu26 commented 8 months ago

Description Normally e2e test is triggered when pull request event is triggered. But for the testing purpose an developers needs to run e2e locally to see changes. On running e2e locally it throws below errors:

$ ./test/e2e_test.sh

~/fulcio ~ ~/go/src/github.com/sigstore/cosign
+ sudo docker compose up -d
[+] Running 7/7
 ✔ Container fulcio-mysql-1                Started                                                                                    0.2s 
 ✔ Container fulcio-dex-idp-1              Started                                                                                    0.2s 
 ✔ Container fulcio-trillian-log-server-1  Started                                                                                    0.1s 
 ✔ Container fulcio-trillian-log-signer-1  Started                                                                                    0.1s 
 ✔ Container fulcio-ctfe_init-1            Started                                                                                    0.0s 
 ✔ Container fulcio-ct_server-1            Started                                                                                    0.0s 
 ✔ Container fulcio-fulcio-server-1        Created                                                                                    0.0s 
Error response from daemon: driver failed programming external connectivity on endpoint fulcio-fulcio-server-1 (c95568a2f1fd590f020d1b4a2c86d26445dd21c8ade257541198b7fa33dae239): Bind for 0.0.0.0:2112 failed: port is already allocated

The error says that port 2112 is binded, but before running this script, port 2112 is free. But then also it throws an error. I don't understand why it is happening so ?

As far as I know the port is conflicting b/w 2 of the services. rekor-rekor-server-1 as well as fulcio-fulcio-server-1 both trying to use same port 2112.

Solution On changing the port for fulcio-fulcio-server-1 works i.e. from "${FULCIO_METRICS_PORT:-2112}:2112" to "${FULCIO_METRICS_PORT:-2115}:2112"

This PR has changes related to above.

haydentherapper commented 7 months ago

LGTM on the fix to update the script to set the metrics port for fulcio

viveksahu26 commented 7 months ago

/assign

viveksahu26 commented 7 months ago

I'm sorry it works by exporting the FULCIO_METRICS_PORT. So, closing it.