Topic on Talk:Parsoid

curl: (7) Failed to connect to localhost port 8142: Connection refused

5
Summary by Arlolra

Update where module in /etc/mediawiki/parsoid/config.yaml points to

210.195.7.193 (talkcontribs)

Hi, been trying to install parsoid for days. still got this error. anyone can help?


OS: Ubuntu 18.04

PHP: 7.3

Web Server: Nginx

Nodejs: 12.5.0

service parsoid status replied:

parsoid.service - LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back

  Loaded: loaded (/etc/init.d/parsoid; generated)

  Active: active (running) since Mon 2019-07-01 14:20:30 UTC; 10min ago

    Docs: man:systemd-sysv-generator(8)

  Process: 4557 ExecStop=/etc/init.d/parsoid stop (code=exited, status=0/SUCCESS)

  Process: 4565 ExecStart=/etc/init.d/parsoid start (code=exited, status=0/SUCCESS)

    Tasks: 12 (limit: 2344)

  CGroup: /system.slice/parsoid.service

          ├─4583 /bin/sh -c /usr/bin/nodejs /usr/lib/parsoid/src/bin/server.js -c /etc/mediawiki/parsoid/config.yaml >> /var/log/parsoid/parsoid.log 2>&1

          └─4585 /usr/bin/nodejs /usr/lib/parsoid/src/bin/server.js -c /etc/mediawiki/parsoid/config.yaml

Jul 01 14:20:25 homestead systemd[1]: Stopped LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back.

Jul 01 14:20:25 homestead systemd[1]: Starting LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back...

Jul 01 14:20:25 homestead parsoid[4565]: Started Parsoid server on port 8142

Jul 01 14:20:30 homestead systemd[1]: Started LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back.


But still the error was displayed when trying to curl to localhost:8142


Please help. Thanks


210.195.7.193 (talkcontribs)

/var/log/parsoid/parsoid.log


{"name":"parsoid","hostname":"homestead","pid":5784,"level":30,"levelPath":"info/service-runner","msg":"master(5784) initializing 1 workers","time":"2019-07-01T14:43:04.066Z","v":0}

{"name":"parsoid","hostname":"homestead","pid":5796,"level":60,"code":"MODULE_NOT_FOUND","requireStack":["/usr/lib/parsoid/node_modules/service-runner/lib/base_service.js","/usr/lib/parsoid/node_modules/service-runner/lib/master.js","/usr/lib/parsoid/node_modules/service-runner/service-runner.js"],"moduleName":"../src/lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Cannot find module '../src/lib/index.js'\nRequire stack:\n- /usr/lib/parsoid/node_modules/service-runner/lib/base_service.js\n- /usr/lib/parsoid/node_modules/service-runner/lib/master.js\n- /usr/lib/parsoid/node_modules/service-runner/service-runner.js","time":"2019-07-01T14:43:04.338Z","v":0}

{"name":"parsoid","hostname":"homestead","pid":5784,"level":40,"message":"first worker died during startup, continue startup","worker_pid":5796,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2019-07-01T14:43:05.358Z","v":0}

Arlolra (talkcontribs)

Is the file "/usr/lib/parsoid/src/lib/index.js" present?

Arlolra (talkcontribs)

Most likely the module in /etc/mediawiki/parsoid/config.yaml needs to be updated to point to the right place.

31.166.159.122 (talkcontribs)

arlolra is right

edit config.yaml

point module: /usr/lib/parsoid/src/lib/index.js

thats it :)