Topic on Project:Support desk

Jump to navigation Jump to search

Parsoid running but not listening on port?

7
MichaelSFO (talkcontribs)

Hello,

I am not the strongest at *nix, but I can puzzle most things out. This problem has got me baffled.


This is a Bitnami aws image of MediaWiki.


I am running:

Product Version
MediaWiki 1.32.1
PHP 7.1.28 (fpm-fcgi)
MySQL 5.7.26
ICU 64.2
VisualEditor 0.1.0 (6414119)10:41, 3 June 2019


MediaWiki doesn't have Parsoid on its Special:Version page. When I run:


npm version

{ npm: '3.5.2',

  ares: '1.10.1-DEV',

  http_parser: '2.5.0',

  icu: '55.1',

  modules: '46',

  node: '4.2.6',

  openssl: '1.0.2g',

  uv: '1.8.0',

  v8: '4.5.103.35',

  zlib: '1.2.8' }


This would indicate it's not running, but then I get:


~$ service parsoid status

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

  Loaded: loaded (/etc/init.d/parsoid; bad; vendor preset: enabled)

  Active: active (running) since Wed 2019-07-10 16:58:54 UTC; 10h ago

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

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

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

    Tasks: 10

  Memory: 27.8M

      CPU: 3.107s

  CGroup: /system.slice/parsoid.service

          ├─9539 /bin/sh -c /usr/bin/nodejs /usr/lib/parsoid/src/bin/server.js -c /etc/mediawiki/parsoid/config.yaml >> /var/log/par

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

Jul 10 16:58:49 ip-172-31-36-234 systemd[1]: Stopped LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back.

Jul 10 16:58:49 ip-172-31-36-234 systemd[1]: Starting LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back...

Jul 10 16:58:49 ip-172-31-36-234 parsoid[9530]: Started Parsoid server on port 8142

Jul 10 16:58:54 ip-172-31-36-234 systemd[1]: Started LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back.

Jul 11 02:54:10 ip-172-31-36-234 systemd[1]: Started LSB: Web service converting HTML+RDFa to MediaWiki wikitext and back.


So I know it's running, and allegedly listening on 8142. But when I try to do a curl to that port, the connection is refused. Curl sees mediawiki, so I know it works.


I installed all of these from the instructions here at mediawiki.org.


Where should I go from here?


Thanks!

Michael

MarkAHershberger (talkcontribs)

Check your config.yaml and verify that it is pointing to 8142. It may be listening on another port.

Check what the log in /var/log/parsoid says.

MichaelSFO (talkcontribs)

I looked in the config. I have serverPort:8142 un-commented. Still refusing.


tailing the parsoid log gives:


{"name":"parsoid","hostname":"ip-172-31-36-234","pid":9550,"level":60,"moduleName":"../src/lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Unexpected token {","time":"2019-07-10T16:58:50.452Z","v":0}

{"name":"parsoid","hostname":"ip-172-31-36-234","pid":9541,"level":40,"message":"first worker died during startup, continue startup","worker_pid":9550,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2019-07-10T16:58:51.464Z","v":0}

Killed

{"name":"parsoid","hostname":"ip-172-31-36-234","pid":16782,"level":30,"levelPath":"info/service-runner","msg":"master(16782) initializing 1 workers","time":"2019-07-12T23:18:37.374Z","v":0}

{"name":"parsoid","hostname":"ip-172-31-36-234","pid":16791,"level":60,"moduleName":"../src/lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Unexpected token {","time":"2019-07-12T23:18:38.016Z","v":0}

{"name":"parsoid","hostname":"ip-172-31-36-234","pid":16782,"level":40,"message":"first worker died during startup, continue startup","worker_pid":16791,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2019-07-12T23:18:39.026Z","v":0}

Killed

{"name":"parsoid","hostname":"ip-172-31-36-234","pid":16830,"level":30,"levelPath":"info/service-runner","msg":"master(16830) initializing 1 workers","time":"2019-07-12T23:21:02.452Z","v":0}

{"name":"parsoid","hostname":"ip-172-31-36-234","pid":16839,"level":60,"moduleName":"../src/lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Unexpected token {","time":"2019-07-12T23:21:03.004Z","v":0}

{"name":"parsoid","hostname":"ip-172-31-36-234","pid":16830,"level":40,"message":"first worker died during startup, continue startup","worker_pid":16839,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2019-07-12T23:21:04.013Z","v":0}


Thanks!

Michael

MarkAHershberger (talkcontribs)

I don't have enough experience to tell you what is going on, but it looks like the server keeps crashing because of "Unexpected token {".

Maybe there is a { in your config.yaml where there shouldn't be?

MichaelSFO (talkcontribs)

I stripped the config.yaml down to the essentials, no free whitespace as mentioned elsewhere. No joy. Also upgraded to node 10.


I will reinstall for one more try and then go on to other projects. It seems very difficult to fix this error from what I've read, and no-one has a definitive fix.


Thanks for helping,

Michael

Bawolff (talkcontribs)

Not very familar with node, but the error message makes it sound as if there is a syntax error in ../src/lib/index.js

Ciencia Al Poder (talkcontribs)

Parsoid needs a version of nodejs greater or equal to 4, but you're using 3.5.2. That's not compatible.

Reply to "Parsoid running but not listening on port?"