Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cometa Installation on M1 Chip #1

Open
tcolo opened this issue Oct 3, 2022 · 11 comments
Open

Cometa Installation on M1 Chip #1

tcolo opened this issue Oct 3, 2022 · 11 comments

Comments

@tcolo
Copy link

tcolo commented Oct 3, 2022

./cometa.sh
[2022-10-03T20:40:15][INFO][cometa.sh:21] - This is ./cometa.sh version 2022-09-08 running for your convinience
sed: 1: "docker-compose.yml": extra characters at the end of d command
[2022-10-03T20:40:15][INFO][cometa.sh:76] - Created schedules directory
[2022-10-03T20:40:15][INFO][cometa.sh:91] - Created crontab file
[2022-10-03T20:40:15][INFO][cometa.sh:99] - Created browsers.json file
sed: 1: "docker-compose.yml": extra characters at the end of d command
sed: 1: "docker-compose.yml": extra characters at the end of d command
[2022-10-03T20:40:15][INFO][cometa.sh:119] - The default string in accounts.google.com.client was replaced with something else - hopefully your google oAuth client credentials
[2022-10-03T20:40:15][INFO][cometa.sh:125] - Starting containers
1 error(s) decoding:

  • error decoding 'Ports': Invalid hostPort: <outside_port>
    ./cometa.sh: line 126: warn: command not found
    [2022-10-03T20:40:18][INFO][cometa.sh:137] - Downloading latest browser versions
    [2022-10-03T20:40:19][INFO][deploy_selenoid.sh:8] - Executing Deploy Selenoid Script
    [2022-10-03T20:40:19][INFO][deploy_selenoid.sh:24] - *********************** COMETA ***********************
    [2022-10-03T20:40:19][INFO][deploy_selenoid.sh:25] - This script automatically retrieves the latest browsers
    [2022-10-03T20:40:19][INFO][deploy_selenoid.sh:26] - for Selenoid and recreates/updates the docker.
    [2022-10-03T20:40:19][INFO][deploy_selenoid.sh:27] - ******************************************************
    [2022-10-03T20:40:19][INFO][deploy_selenoid.sh:31] - jq: already installed.
    ./getLatestBrowsers.sh: line 36: realpath: command not found
    usage: dirname string [...]
    ./getLatestBrowsers.sh: line 84: /../../helpers/logger.sh: No such file or directory
    ./getLatestBrowsers.sh: line 143: log_wfr: command not found
    ./getLatestBrowsers.sh: line 172: log_res: command not found
    ./getLatestBrowsers.sh: line 143: log_wfr: command not found
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    ./getLatestBrowsers.sh: line 172: log_res: command not found
    ./getLatestBrowsers.sh: line 143: log_wfr: command not found
    ./getLatestBrowsers.sh: line 194: log_wfr: command not found
    ./getLatestBrowsers.sh: line 195: log_res: command not found

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[2022-10-03T20:41:11][INFO][deploy_selenoid.sh:38] - pulling selenoid/video-recorder
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[2022-10-03T20:41:11][INFO][deploy_selenoid.sh:51] - Replacing background image volume in Selenoid images ...
sed: 1: "browsers.json": undefined label 'rowsers.json'
[2022-10-03T20:41:11][INFO][deploy_selenoid.sh:58] - Replacing downloads folder in Selenoid Chrome Image ...
sed: 1: "browsers.json": undefined label 'rowsers.json'
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[2022-10-03T20:41:12][INFO][deploy_selenoid.sh:71] - Selenoid docker was not found or exited, recreating docker ... -> [failed]
[2022-10-03T20:41:12][INFO][cometa.sh:153] - Waiting for parseBrowsersCannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Error response from daemon: dial unix docker.raw.sock: connect: connection refused
Error: No such container: cometa_django
Error: No such container: cometa_django

jq is also not normally installed - there are no arm64 packages. I compiled it myself for other purposes.

@ArslanSB
Copy link
Contributor

ArslanSB commented Oct 4, 2022

I've update the scripts so sed commands should be working now. Also added check for docker if it's installed and running.
Missing jq I'll try adding a compile function to the script if jq package is missing in package manager.

@raro42
Copy link
Member

raro42 commented Nov 28, 2023

Closing this issue, as M1 installation without native support of JQ is a real pain.

Recommend to use Vmware or VirtualBox to run linux flavors that support jq.

If that is not ok for you, you might as well re-open this issue.

@raro42 raro42 closed this as completed Nov 28, 2023
@isoctcolo
Copy link

If this should work on M1 https://formulae.brew.sh/formula/jq

the jq was already ported

@raro42 raro42 reopened this Nov 29, 2023
@raro42
Copy link
Member

raro42 commented Nov 29, 2023

Re-opening and testing

@tcolo
Copy link
Author

tcolo commented Dec 5, 2023

.cometa.sh is working

The cometa_front docker imgage is not starting (it is going in a strange loop)

Adding logfile from docker.
docker.log

@raro42
Copy link
Member

raro42 commented Dec 6, 2023

Thanks for testing!

So bringing up the front container is the problem.

2023-12-05 11:38:21 make: g++: Command not found

It should be installed via start.sh in ./front directory
image

Can you please attache the docker-compose file you used?

2023-12-05 11:44:39 httpd: Syntax error on line 589 of /usr/local/apache2/conf/httpd.conf: Syntax error on line 45 of /usr/local/apache2/conf/openidc.conf: Cannot load modules/mod_auth_openidc.so into server: /usr/local/apache2/modules/mod_auth_openidc.so: cannot open shared object file: No such file or directory
This is a followup from the before.

There are permission issues in the cometa_front docker container.
2023-12-05 11:35:11 sed: couldn't open temporary file /code/src/sedDNZQp1: Permission denied

Can you check the permissions on /front are "rw" for "root" and did you execute the ./cometa.sh as "root"?

@tcolo
Copy link
Author

tcolo commented Dec 7, 2023

Adding docker-compose.tgz - yml upload is not allowed.
I really have to check the issue here:
The permissions shouldn't be an issue because I check it out as my mac user and run it as my mac user so it should be readable and writeable for all directories.
I check some szenarios and test.

docker-compose.tgz

@tcolo
Copy link
Author

tcolo commented Jan 13, 2024

The path /data/cometa/videos is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
This has to be configured in the Docker Desktop so this directory points to a local director

On the / direcory on mac you cannot create a directory - Solution is to change in the docker-compose.yml the data directory. The best solution is to use /Users/[User]/ as a base directory due to permissions.

@tcolo
Copy link
Author

tcolo commented Jan 13, 2024

It is important to start cometa.sh with "bash cometa.sh" otherwise zsh is used.

@tcolo
Copy link
Author

tcolo commented Jan 13, 2024

I added g++ to the start.sh and the error g++ command not found is gone.

apt-get install -y pkg-config make gcc g++ gdb lcov valgrind vim curl iputils-ping wget

@tcolo
Copy link
Author

tcolo commented Jan 13, 2024

I get in cometa_django

2024-01-13 17:31:49 Internal Server Error: /parseBrowsers/
2024-01-13 17:31:49 Traceback (most recent call last):
2024-01-13 17:31:49 File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
2024-01-13 17:31:49 response = get_response(request)
2024-01-13 17:31:49 File "/opt/code/backend/middlewares/authentication.py", line 75, in call
2024-01-13 17:31:49 result = self.createSession(request)
2024-01-13 17:31:49 File "/opt/code/backend/middlewares/authentication.py", line 114, in createSession
2024-01-13 17:31:49 superuser = Permissions.objects.filter(permission_name="SUPERUSER")[0]
2024-01-13 17:31:49 File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 318, in getitem
2024-01-13 17:31:49 return qs._result_cache[0]
2024-01-13 17:31:49 IndexError: list index out of range
2024-01-13 17:31:59 Internal Server Error: /parseBrowsers/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants