parsoid cannot find module - wikimedia

Error: Cannot find module '/etc/mediawiki/parsoid/bin/server.js'
With UBUNTU 14 LTS, on command
nodejs bin/server.js
... There are a /etc/mediawiki/parsoid/settings.js but no server.js.
Using the standard procedures.
I need to install on my localhost, so at /etc/mediawiki/parsoid/settings.js used
parsoidConfig.setMwApi({
prefix: 'localhost', uri: 'http://localhost/mywiki/api.php'
});

Related

How is the correct syntax/call to get the sls-file working - salt

I'm trying to build a reactor sls file, which starts running when an event occurs.
The content of the sls file should be as the following cli commands:
sudo salt minion git.add /srv/salt .
sudo salt minion git.commit /srv/salt test
sudo salt minion git.push /srv/salt origin master identity=/home/autogit/.ssh/id_rsa
If i run the code bellow triggered by the reactor. I get the following error message.
[DEBUG ] Reactor is populating module client cache
[ERROR ] An un-handled exception from the multiprocessing process 'Reactor-9:1' was caught:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/utils/process.py", line 765, in _run
return self._original_run()
File "/usr/lib/python2.7/dist-packages/salt/utils/reactor.py", line 271, in run
self.call_reactions(chunks)
File "/usr/lib/python2.7/dist-packages/salt/utils/reactor.py", line 228, in call_reactions
self.wrap.run(chunk)
File "/usr/lib/python2.7/dist-packages/salt/utils/reactor.py", line 330, in run
self.populate_client_cache(low)
File "/usr/lib/python2.7/dist-packages/salt/utils/reactor.py", line 324, in populate_client_cache
self.reaction_class[reaction_type](self.opts['conf_file'])
KeyError: u'module'
[CRITICAL] Engine 'reactor' could not be started!
I've tried different syntax (old style and new style) but couldn't figure out what the problem is. Always getting an KeyError: u'module' or u'git'.
Also tried it with runner function to run it locally on the master.
git pull:
module.run:
- git.pull:
- cwd: /srv/salt
- remote: git#git.xyz.com:user/sbt.git
- identity: /home/autogit/.ssh/id_rsa
- git.add:
- cwd: /srv/salt
- filename: .
- git.commit:
- cwd: /srv/salt
- remote: git#git.xyz.com:user/sbt.git
- git.push:
- cwd: /srv/salt
- remote: git#git.xyz.com:user/sbt.git
- identity: /home/autogit/.ssh/id_rsa
salt --versions-report
Salt Version:
Salt: 2019.2.0
Dependency Versions:
cffi: Not Installed
cherrypy: unknown
dateutil: 2.6.1
docker-py: Not Installed
gitdb: 2.0.3
gitpython: 2.1.8
ioflo: Not Installed
Jinja2: 2.10
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.7
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
python-gnupg: 0.4.1
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: 2.0.3
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.2.5
System Versions:
dist: Ubuntu 18.04 bionic
locale: UTF-8
machine: x86_64
release: 4.15.0-46-generic
system: Linux
version: Ubuntu 18.04 bionic
Since i'm quite new to Salt, hopefully you can give me a hint what i'm doing wrong:
You didn't provide the master config.
About module.run confusion: add in your settings (minion and maybe to master since I don't know your use-case)
use_superseded:
- module.run
That will enable your syntax, more doc about this here: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html#salt.states.module.run
In general: you are executing execution modules from the place that state modules are allowed only (the term module is heavily overused in salt...)
You didn't provide the full Master config. Reactor requires dedicated config to match events to sls files:
https://docs.saltstack.com/en/latest/ref/configuration/master.html#master-reactor-settings
You can also check the doc I've written some time ago about events and reactors:
https://github.com/kiemlicz/util/wiki/Salt-Events-and-Reactor
Assuming you've configured your events-to-sls-files-matching in master config, your provided sls:
git pull:
module.run:
- git.pull:
- cwd: /srv/salt
- remote: git#git.xyz.com:user/
...
will not work.
Mind that reaction happens on Salt Master thus the reaction sls file need to provide type of reaction (local, runner etc.) since it's no longer 'view of one minion' but possibly of tons of minions!
First create runner reaction type (which delegates to some orchestration sls file which will contain your logic wrapped with (I think) salt.function )
Help yourself with aforementioned github link to my attempt of explaining Reactor.
Refer to official doc as well: https://docs.saltstack.com/en/latest/topics/reactor/index.html

PHP 7.0 on Ubuntu 16 - pdo_mysql.so: undefined symbol: mysqlnd_connect

I'm gettind this PDOException could not find driver
here is my /etc/php/7.0/apache2/php.ini file
;extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
;extension=php_ftp.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on it
;extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
and when I run php in my server I get this warning PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_mysql.so' - /usr/lib/php/20151012/pdo_mysql.so: undefined symbol: mysqlnd_connect in Unknown on line 0
I had to make sure that /usr/lib/php/20151012/mysqlnd.so exists and my modules were been enabled by the /etc/php/7.0/mods-available directory, there were multiple .ini files, except for mysqlnd.ini
so I created it
sudo nano mysqlnd.ini
and put this content:
; configuration for php common module
; priority=10
extension=mysqlnd.so
restarted apache
sudo service apache2 restart

Trying to install apache on CentOS7 using Chef

I'm trying to use Chef on CentOS7 and I'm at the beginning ... following the tutorial I0m trying to install apache using this recipe.
package 'apache2' do
action :install
end
service 'apache2' do
action [:enable, :start]
end
file '/var/www/index.html' do
content '<html>
<body>
<h1>Hello world!!</h1>
</body>
</html>'
end
When I try to execute I obtain this error ...
[osboxes#osboxes chef-repo]$ sudo chef-apply hello.rb
Recipe: (chef-apply cookbook)::(chef-apply recipe)
* yum_package[apache2] action install
* No candidate version available for apache2
================================================================================
Error executing action `install` on resource 'yum_package[apache2]'
================================================================================
Chef::Exceptions::Package
-------------------------
No candidate version available for apache2
The same if I use a simpler recipe like this
package 'apache2'
My Chef client workstation installation is the following
[osboxes#osboxes chef-repo]$ chef --version
Chef Development Kit Version: 3.0.36
chef-client version: 14.1.12
delivery version: master (7206afaf4cf29a17d2144bb39c55b7212cfafcc7)
berks version: 7.0.2
kitchen version: 1.21.2
inspec version: 2.1.72
On CentOS / RHEL etc (and on Fedora) the package name for Apache is "httpd".
Alternatively, there is a standard cookbook for installing and configuring Apache2:
https://supermarket.chef.io/cookbooks/apache2
It is fairly sophisticated, and includes recipes for configuring a number of common Apache modules.

Apache http server, Solaris 8

While starting the apache http server, I am getting the below error:
httpd: Syntax error on line 67 of /isgwtld/lsam/apache/conf/httpd.conf: Cannot load modules/mod_wl_22.so into server: ld.so.1: httpd: fatal: relocation error: file /isgwtld/lsam/apache/modules/mod_wl_22.so: symbol unixd_set_global_mutex_perms: referenced symbol not found
Configuration used currently:
OS: Solaris 8
APACHE HTTP SERVER : 2.4.27
weblogic: 10.3.0
Probably you are using an old version of the module or a mod_wl module compiled for an older httpd version (2.0 or 2.2).
In my case, I solved using an updated mod_wl version compiled for apache 2.4.

osx 10.9 php 5.4 pecl_http - class HttpRequest not found

I am running php 5.4.17 on OS X 10.9.1.
I have installed pear using this command:
wget http://pear.php.net/go-pear.phar
php -d detect_unicode=0 go-pear.phar
Then I have installed pecl_http with:
pecl install pecl_http
I have added extension lines to my php.ini and add 'x' permission to library binaries. If I run php -i I get:
http
HTTP Support => enabled
Extension Version => 2.0.4
Used Library => Compiled => Linked
libz => 1.2.5 => 1.2.5
libcurl => 7.30.0 => 7.30.0
libevent => disabled => disabled
Directive => Local Value => Master Value
http.etag.mode => crc32b => crc32b
But if I try to run php script with HttpRequest inside I still get:
Fatal error: Class 'HttpRequest' not found
Can somebody give me a clue what am I doing wrong?
You are using pecl_http 2.0.4 and probably refer to documentation from http://www.php.net/manual/en/class.httprequest.php which is for older version. There is a post that's already explained your problem:
PECL_HTTP not recognised php ubuntu
In fact, you should refer to the documentation defined here:
http://devel-m6w6.rhcloud.com/mdref/http
To verify: if (class_exists('http\Client\Request')) printf 'pecl_http v2 is installed'