Issues with docker-compose.yml
I was getting the error "ERROR: Named volume "rfproxy_log_data:/var/log/scot:rw" is used in service "rfproxy" but no declaration was found in the volumes section.". I changed two lines in docker-compose.yml which possibly solved this (still troubleshooting):
rfproxy: volumes: - "./rfproxy_log_data:/var/log/scot/"
image: sandialabs/scot_perl
It seems the sandialabs/scot_rfproxy directory doesn't exist?
Also, the /etc/timezone files in the docker-compose.yml file for mongo, apache, rfproxy and scot were throwing the following error: ERROR: for apache Cannot start service apache: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: rootfs_linux.go:59: mounting "/home/ec2-user/scot/etc/timezone" to rootfs at "/var/lib/docker/overlay2/6f815a39db2b8d8d95fc94c554bd55f82ae4fe55aba678c35baaa4f56df788ef/merged/etc/timezone" caused: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
So I commented them out.
# - "/etc/timezone:/etc/timezone:ro" # - "/etc/localtime:/etc/localtime:ro"
Finally, the apache build had the following error: ERROR: for apache Cannot create container for service apache: maximum retry count cannot be used with restart policy 'always'
Need to change that line to "on-failure":
deploy: restart_policy: condition: on-failure delay: 5s max_attempts: 3
Thank you for the bug reports. Can you share the docker version and the host OS you are running your containers on? This will allow me to test updates.
Hello, @loucdg thank you for the tips, I also encountered problems using the docker-compose on a freshly installed ubuntu server 20.04.2 version. Docker version: Docker version 20.10.8, build 3967b7d Docker-compose version: docker-compose version 1.29.2, build 5becea4c
First the error with rfproxy docker not being available, I then commented it in the docker-compose.yml file, and seemed to fix it, but don't know how crucial that container is:

Then also had the issue that got resolved with the restart policy setting it to "on-failure":

Now I'm having troubles with the scot container exiting after starting: Can't load application from file "/opt/scot/script/Scot": Can't locate object method "requires" via package "Mojolicious::Routes::Route" at /opt/scot/script/../lib/Scot/Util/CSRFProtection.pm line 39.

Any tips of how to fix this? I really enjoyed the demo site and wanted to give this a try.
Thank you for your time reading this and all the development done, the project seems awesome.
The rfproxy container is a proxy service to Recorded Future. If you do not have a Recorded Future account or do not want to query RF for information from SCOT you can disable and forget about it.
The second error is truly an error from a recent change. I will not be able to address it until next week. Essentially, a library that was used for CSRF protection on the login form is no longer supported. I have inlined a replacement, but I have not yet uploaded that code to the public repository.
Thank you for checking SCOT out and my apologies for the difficulties. I will post something here when the fixes are in place.
@.***
On Thu, Aug 19, 2021 at 6:18 AM digoblin @.***> wrote:
Hello, @loucdg https://github.com/loucdg thank you for the tips, I also encountered problems using the docker-compose on a freshly installed ubuntu server 20.04.2 version. Docker version: Docker version 20.10.8, build 3967b7d Docker-compose version: docker-compose version 1.29.2, build 5becea4c
First the error with rfproxy docker not being available, I then commented it in the docker-compose.yml file, and seemed to fix it, but don't know how crucial that container is: [image: rfproxy error] https://user-images.githubusercontent.com/4185420/130073858-4e61f6e3-275e-4fe4-8f5b-aca3b6604914.png
Then also had the issue that got resolved with the restart policy setting it to "on-failure": [image: on-failure error] https://user-images.githubusercontent.com/4185420/130074000-b09f4637-46c9-4d18-b9af-c323816348bd.png
Now I'm having troubles with the scot container exiting after starting: Can't load application from file "/opt/scot/script/Scot": Can't locate object method "requires" via package "Mojolicious::Routes::Route" at /opt/scot/script/../lib/Scot/Util/CSRFProtection.pm line 39.
[image: containers] https://user-images.githubusercontent.com/4185420/130074848-e417d40a-2394-4f00-b75d-0ac6ac35c826.png
Any tips of how to fix this? I really enjoyed the demo site and wanted to give this a try.
Thank you for your time reading this and all the development done, the project seems awesome.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sandialabs/scot/issues/62#issuecomment-901908526, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACQBEXPXAWIPEZL2UCTT33T5UABHANCNFSM4Z2LEARQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
I have a fix for the CSRF issue to get it running for people that want to check out SCOT - I will preface this that I have no idea how this effects the CSRF protections and this is just a dirty hack - but it works:
Edit the Dockerfile-Scot file and add the following line after the "EXPOSE 3000" Line: RUN sed -i 's/requires/over/' /opt/scot/lib/Scot/Util/CSRFProtection.pm
Rebuild the Scot docker image: docker build -f ./Dockerfile-Scot . --tag sandialabs/scot_scot
Start the system: docker-compose up -d
Should be able to log in - but I am having issues with the API to get alerts in.
Hope this helps.
Yes, that is the fix and will not affect CSRF protections. Thanks TheScaz for posting this, it had slipped off my radar. I'm working on a pretty major update and this fix will be included.
@.***
On Sat, Oct 23, 2021 at 7:26 AM TheScaz @.***> wrote:
I have a fix for the CSRF issue to get it running for people that want to check out SCOT - I will preface this that I have no idea how this effects the CSRF protections and this is just a dirty hack - but it works:
Edit the Dockerfile-Scot file and add the following line after the "EXPOSE 3000" Line: RUN sed -i 's/requires/over/' /opt/scot/lib/Scot/Util/CSRFProtection.pm
Rebuild the Scot docker image: docker build -f ./Dockerfile-Scot . --tag sandialabs/scot_scot
Start the system: docker-compose up -d
Should be able to log in
Hope this helps.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sandialabs/scot/issues/62#issuecomment-950152695, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACQBERCC6XFW7FKVSKJ6PLUIKZZ3ANCNFSM4Z2LEARQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.