Getting error message on new project

This is my first time using Pontoon and heroku so I assume any of my question could be interpreted as dum by advance users, but that’s just me learning …

So on my recently deployed heroku app I would like to add a new project. I fill the form as followed:

type = "git"
url = "git@github.com:12rambau/sepal_ui.git"
path_to_toml_file = "l10n.toml"
repository = "https://github.com/12rambau/sepal_ui"

the other parameters are unrelevants.
When I click on sync nothing happens but the when I check the logs I see the following error:

2022-02-08T16:13:49.025213+00:00 app[worker.1]: [2022-02-08 16:13:49,024: ERROR/ForkPoolWorker-5] Task pontoon.sync.tasks.sync_project[77e42e50-7a19-4eed-8765-71f4f9bc7db3] raised unexpected: MemcachedException('Code: 32 Message: None', 32)
2022-02-08T16:13:49.025220+00:00 app[worker.1]: Traceback (most recent call last):
2022-02-08T16:13:49.025221+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/celery/app/trace.py", line 385, in trace_task
2022-02-08T16:13:49.025221+00:00 app[worker.1]: R = retval = fun(*args, **kwargs)
2022-02-08T16:13:49.025222+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/newrelic/hooks/application_celery.py", line 99, in wrapper
2022-02-08T16:13:49.025223+00:00 app[worker.1]: return wrapped(*args, **kwargs)
2022-02-08T16:13:49.025223+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/celery/app/trace.py", line 648, in __protected_call__
2022-02-08T16:13:49.025224+00:00 app[worker.1]: return self.run(*args, **kwargs)
2022-02-08T16:13:49.025224+00:00 app[worker.1]: File "/app/pontoon/sync/core.py", line 59, in wrapped_func
2022-02-08T16:13:49.025224+00:00 app[worker.1]: if not cache.add(lock_name, True, timeout=timeout):
2022-02-08T16:13:49.025225+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/django/core/cache/backends/memcached.py", line 72, in add
2022-02-08T16:13:49.025225+00:00 app[worker.1]: return self._cache.add(key, value, self.get_backend_timeout(timeout))
2022-02-08T16:13:49.025227+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/newrelic/api/datastore_trace.py", line 196, in _nr_datastore_trace_wrapper_
2022-02-08T16:13:49.025227+00:00 app[worker.1]: return wrapped(*args, **kwargs)
2022-02-08T16:13:49.025227+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/bmemcached/client/replicating.py", line 187, in add
2022-02-08T16:13:49.025228+00:00 app[worker.1]: returns.append(server.add(key, value, time, compress_level=compress_level))
2022-02-08T16:13:49.025228+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/bmemcached/protocol.py", line 653, in add
2022-02-08T16:13:49.025229+00:00 app[worker.1]: return self._set_add_replace('add', key, value, time, compress_level=compress_level)
2022-02-08T16:13:49.025229+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/bmemcached/protocol.py", line 567, in _set_add_replace
2022-02-08T16:13:49.025230+00:00 app[worker.1]: self._send(struct.pack(self.HEADER_STRUCT +
2022-02-08T16:13:49.025230+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/bmemcached/protocol.py", line 247, in _send
2022-02-08T16:13:49.025231+00:00 app[worker.1]: self._open_connection()
2022-02-08T16:13:49.025231+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/bmemcached/protocol.py", line 161, in _open_connection
2022-02-08T16:13:49.025231+00:00 app[worker.1]: self._send_authentication()
2022-02-08T16:13:49.025231+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/bmemcached/protocol.py", line 322, in _send_authentication
2022-02-08T16:13:49.025232+00:00 app[worker.1]: raise MemcachedException('Code: %d Message: %s' % (status, extra_content), status)
2022-02-08T16:13:49.025232+00:00 app[worker.1]: bmemcached.exceptions.MemcachedException: ('Code: 32 Message: None', 32)

Can somenone explain me what if the problem is coming from my repository or from my app configuration ? Even better if you can explain what I need to change that would be amazing.

That seems to come from https://github.com/jaysonsantos/python-binary-memcached/blob/b894f0c1502283aa4b6bd983316c4b7c798545c0/bmemcached/protocol.py#L275, which indicates that you might have an authentication problem

thanks for the link. What I was expecting is the error above (“Incorrect username or password”). The one I’m getting is the more generic one unfortunatelly and does not provide any information on the actual problem from pontoon side.

Let’s go one step prior in the ssh config of my app:

SSH_CONFIG:

StrictHostKeyChecking=no

Host github.com
User git

and SSH_KEY is an ed25519 key generated as suggested by Github. It is registered on my github account and working on my mac.

should I change something there ? should I replace “git” in user ? should I use a different key type ?

PS: I’m working with an app generated from the deploy to heroku button from the doc

ok so moving forward, the problem was not coming from Pontoon but Heroku, after 30 days of inactivity MemCache is deactivated. I started it back from the console and I now face the following issue that seems more related to the SSH key:

2022-02-09T12:09:20.156334+00:00 app[worker.1]: Syncing project sepal-ui.
2022-02-09T12:09:20.156363+00:00 app[worker.1]: [2022-02-09 12:09:20,156: INFO/ForkPoolWorker-8] Syncing project sepal-ui.
2022-02-09T12:09:20.156411+00:00 app[worker.1]: Pulling source changes for project sepal-ui started.
2022-02-09T12:09:20.156447+00:00 app[worker.1]: [2022-02-09 12:09:20,156: INFO/ForkPoolWorker-8] Pulling source changes for project sepal-ui started.
2022-02-09T12:09:20.169106+00:00 app[worker.1]: Git: [Errno 2] No such file or directory: '/app/media/projects/sepal-ui/git@github.com:12rambau/sepal_ui.git/templates'
2022-02-09T12:09:20.169198+00:00 app[worker.1]: [2022-02-09 12:09:20,168: INFO/ForkPoolWorker-8] Git: [Errno 2] No such file or directory: '/app/media/projects/sepal-ui/git@github.com:12rambau/sepal_ui.git/templates'
2022-02-09T12:09:21.413759+00:00 app[worker.1]: [2022-02-09 12:09:21,413: ERROR/ForkPoolWorker-8] Task pontoon.sync.tasks.sync_project[45a54751-12b8-47a8-a731-d54b8285ec9e] raised unexpected: PullFromRepositoryException('Cloning into \'/app/media/projects/sepal-ui/git@github.com:12rambau/sepal_ui.git/templates\'...\nWarning: Permanently added \'github.com,140.82.121.4\' (ECDSA) to the list of known hosts.\r\nLoad key "/app/.ssh/id_rsa": invalid format\r\ngit@github.com: Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n')
2022-02-09T12:09:21.413766+00:00 app[worker.1]: Traceback (most recent call last):
2022-02-09T12:09:21.413767+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/celery/app/trace.py", line 385, in trace_task
2022-02-09T12:09:21.413767+00:00 app[worker.1]: R = retval = fun(*args, **kwargs)
2022-02-09T12:09:21.413767+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/newrelic/hooks/application_celery.py", line 99, in wrapper
2022-02-09T12:09:21.413768+00:00 app[worker.1]: return wrapped(*args, **kwargs)
2022-02-09T12:09:21.413769+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/celery/app/trace.py", line 648, in __protected_call__
2022-02-09T12:09:21.413769+00:00 app[worker.1]: return self.run(*args, **kwargs)
2022-02-09T12:09:21.413770+00:00 app[worker.1]: File "/app/pontoon/sync/core.py", line 68, in wrapped_func
2022-02-09T12:09:21.413770+00:00 app[worker.1]: return func(self, *args, **kwargs)
2022-02-09T12:09:21.413770+00:00 app[worker.1]: File "/app/pontoon/sync/tasks.py", line 98, in sync_project
2022-02-09T12:09:21.413771+00:00 app[worker.1]: source_changes = sync_sources(db_project, now, force, no_pull)
2022-02-09T12:09:21.413771+00:00 app[worker.1]: File "/app/pontoon/sync/tasks.py", line 127, in sync_sources
2022-02-09T12:09:21.413772+00:00 app[worker.1]: has_source_repo_changed = pull_source_repo_changes(db_project)
2022-02-09T12:09:21.413772+00:00 app[worker.1]: File "/app/pontoon/sync/core.py", line 314, in pull_source_repo_changes
2022-02-09T12:09:21.413773+00:00 app[worker.1]: pulled_revisions = source_repo.pull()
2022-02-09T12:09:21.413773+00:00 app[worker.1]: File "/app/pontoon/base/models.py", line 1979, in pull
2022-02-09T12:09:21.413773+00:00 app[worker.1]: update_from_vcs(self.type, self.url, self.checkout_path, self.branch)
2022-02-09T12:09:21.413774+00:00 app[worker.1]: File "/app/pontoon/sync/vcs/repositories.py", line 272, in update_from_vcs
2022-02-09T12:09:21.413774+00:00 app[worker.1]: obj.pull()
2022-02-09T12:09:21.413775+00:00 app[worker.1]: File "/app/pontoon/sync/vcs/repositories.py", line 53, in pull
2022-02-09T12:09:21.413775+00:00 app[worker.1]: raise PullFromRepositoryException(str(error))
2022-02-09T12:09:21.413781+00:00 app[worker.1]: pontoon.sync.vcs.repositories.PullFromRepositoryException: Cloning into '/app/media/projects/sepal-ui/git@github.com:12rambau/sepal_ui.git/templates'...
2022-02-09T12:09:21.413781+00:00 app[worker.1]: Warning: Permanently added 'github.com,140.82.121.4' (ECDSA) to the list of known hosts.
2022-02-09T12:09:21.413782+00:00 app[worker.1]: Load key "/app/.ssh/id_rsa": invalid format
2022-02-09T12:09:21.413782+00:00 app[worker.1]: git@github.com: Permission denied (publickey).
2022-02-09T12:09:21.413782+00:00 app[worker.1]: fatal: Could not read from remote repository.
2022-02-09T12:09:21.413782+00:00 app[worker.1]:
2022-02-09T12:09:21.413782+00:00 app[worker.1]: Please make sure you have the correct access rights
2022-02-09T12:09:21.413783+00:00 app[worker.1]: and the repository exists.
2022-02-09T12:09:21.413784+00:00 app[worker.1]:

Everything seems to work now or anyone getting here someday:

  • check that the memchache add-on is running
  • check that the ssh-config is set
  • use RSA key, the ed25519 is not yet supported
2 Likes