Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.07k stars 1.5k forks source link

Installing transcription plugin fails with strange error messages #6317

Closed lonesomewalker closed 6 months ago

lonesomewalker commented 6 months ago

Describe the current behavior

This is somewhat not understandable for me, but maybe related to docker.

When installing the official transcription plugin, either by cli or webinterface, the following errors occur:

root@peertube:/opt/peertube# docker compose exec -u peertube peertube npm run plugin:install -- --npm-name peertube-plugin-transcription

> peertube@6.0.3 plugin:install
> node ./dist/scripts/plugin/install.js --npm-name peertube-plugin-transcription

[some.domain.tld:443] 2024-04-08 13:05:21.282 info: Installing plugin peertube-plugin-transcription.
[some.domain.tld:443] 2024-04-08 13:05:32.666 info: Successful installation of plugin peertube-plugin-transcription.
npm notice
npm notice New minor version of npm available! 10.2.3 -> 10.5.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.5.1
npm notice Run npm install -g npm@10.5.1 to update!
npm notice
root@peertube:/opt/peertube#

Looking good, right? Nope :-(

warn[8.4.2024, 15:05:05] Cannot unregister plugin peertube-plugin-transcription.
{
  "err": {
    "stack": "Error: Unknown plugin peertube-plugin-transcription to unregister\n    at PluginManager.unregister (file:///app/dist/core/lib/plugins/plugin-manager.js:198:19)\n    at PluginManager.uninstall (file:///app/dist/core/lib/plugins/plugin-manager.js:280:28)\n    at uninstallPlugin (file:///app/dist/core/controllers/api/plugins.js:69:34)\n    at file:///app/dist/core/middlewares/async.js:17:32\n    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)\n    at next (/app/node_modules/express/lib/router/route.js:144:13)\n    at uninstallPluginValidator (file:///app/dist/core/middlewares/validators/plugins.js:118:16)\n    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)\n    at next (/app/node_modules/express/lib/router/route.js:144:13)\n    at middleware (/app/node_modules/express-validator/src/middlewares/check.js:16:13)",
    "message": "Unknown plugin peertube-plugin-transcription to unregister"
  }
}

Looks like that the plugin is not known? Even after a restart of the docker container, i get:

error[8.4.2024, 15:15:05] Cannot register plugin transcription, skipping.
{
  "err": {
    "stack": "Error: connect ECONNREFUSED 127.0.1.1:443\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)",
    "message": "connect ECONNREFUSED 127.0.1.1:443",
    "errno": -111,
    "code": "ECONNREFUSED",
    "syscall": "connect",
    "address": "127.0.1.1",
    "port": 443
  }
}

So, did i miss something?

Thank you :-)

Steps to reproduce

  1. docker compose exec -u peertube peertube npm run plugin:install -- --npm-name peertube-plugin-transcription
  2. docker compose down
  3. docker compose up -d

Describe the expected behavior

After the installation no errors should be shown :-) Also configuration options should be available.

Additional information

lonesomewalker commented 6 months ago

Okay, nevermind... For all the other idiots like me, who use Ubuntu: edit your /etc/hosts file and check for proper ip to hostname Ubuntu writes 127.0.1.1 (and i was wondering why the docker would connect to that ip...)

After changing that, EVERYTHING is working now.