chaoss / grimoirelab

GrimoireLab: platform for software development analytics and insights
https://chaoss.github.io/grimoirelab/
GNU General Public License v3.0
475 stars 179 forks source link

Application not running on M1 pro #681

Open dj13may91 opened 1 month ago

dj13may91 commented 1 month ago

Trying to run out of the box service but not able to get it running on M1 pro. Using branch : master

Mordred Traceback (most recent call last): File "/usr/local/bin/sirmordred", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/sirmordred/bin/sirmordred.py", line 66, in main logger = setup_logs(logs_dir, debug_mode, short_name) File "/usr/local/lib/python3.8/site-packages/sirmordred/bin/sirmordred.py", line 98, in setup_logs fh = logging.FileHandler(fh_filepath) File "/usr/local/lib/python3.8/logging/__init__.py", line 1147, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/local/lib/python3.8/logging/__init__.py", line 1176, in _open return open(self.baseFilename, self.mode, encoding=self.encoding) PermissionError: [Errno 13] Permission denied: '/home/grimoire/logs/all.log'

kibiter runtime: failed to create new OS thread (have 2 already; errno=22) fatal error: runtime.newosproc runtime stack: runtime.throw(0x56be06) /usr/src/go/src/runtime/panic.go:491 +0xad runtime.newosproc(0xc208020000, 0xc208030000) /usr/src/go/src/runtime/os_linux.c:170 +0x10a newm(0x430700, 0x0) /usr/src/go/src/runtime/proc.c:1157 +0xc5 runtime.newsysmon() /usr/src/go/src/runtime/proc.c:169 +0x33 runtime.onM(0x57cb30) /usr/src/go/src/runtime/asm_amd64.s:257 +0x68 runtime.mstart() /usr/src/go/src/runtime/proc.c:818

dj13may91 commented 1 month ago

Fixed above for now,: fixes:

Morded --> has /tmp/ mounted which had permission issue

kibiter --> used kibana and ES for now

Now facing below error: Traceback (most recent call last): File "/usr/local/bin/sirmordred", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/sirmordred/bin/sirmordred.py", line 64, in main debug_mode = config_dict['general']['debug'] KeyError: 'debug'

dj13may91 commented 1 month ago

@zhquan please help with above

zhquan commented 1 month ago

Hi @dj13may91

Your setup.cfg seems incorrect or your volume is not mounted correctly. Could you share your docker-compose.yml and the path of your setup.cfg and docker-compose.yml?

dj13may91 commented 1 month ago

I am using the default that is present in project. Expecting this setup to pull data of grimoire lab project. This is my setup.cfg, no changes : https://github.com/chaoss/grimoirelab/blob/master/default-grimoirelab-settings/setup-opensearch.cfg Also, using a modified docker compose with default elastic versions, but still not able to get the project up and running. Docker compose :

version: "3.8"


volumes:
certs:
driver: local
esdata01:
driver: local
kibanadata:
driver: local
sortinghat-static:
mariadb_data:

networks: default: name: elastic external: false

services: setup: image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION} volumes:

zhquan commented 1 month ago

I don't have any issues running on Linux using the default configurations.

$ docker-compose -f docker-compose-opensearch.yml up -d
Starting docker-compose_redis_1                 ... done
Starting docker-compose_opensearch-node1_1      ... done
Starting docker-compose_mariadb_1               ... done
Starting docker-compose_opensearch-dashboards_1 ... done
Starting docker-compose_sortinghat_1            ... done
Starting docker-compose_sortinghat_worker_1     ... done
Starting docker-compose_nginx_1                 ... done
Starting docker-compose_mordred_1               ... done
But I can reproduce the error if I change the permission of the file to `600` (`docker` user cannot read the `setup.cfg` file)

$ docker logs --tail=10 docker-compose_mordred_1 sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/sirmordred/bin/sirmordred.py", line 64, in main debug_mode = config_dict['general']['debug'] KeyError: 'debug' Traceback (most recent call last): File "/usr/local/bin/sirmordred", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/sirmordred/bin/sirmordred.py", line 64, in main debug_mode = config_dict['general']['debug'] KeyError: 'debug'



Could you try again but change the permission to `777` for `../default-grimoirelab-settings/setup-opensearch.cfg` and `../default-grimoirelab-settings/projects.json`?