mediawiki DBLoadBalancer error while setting up wiki - mediawiki

I've just installed MediaWiki 1.28 on arch linux with nginx 1.10.3, php 7.1.1, php-fpm, and sqlite 3.16.2. I followed the arch wiki guide: https://wiki.archlinux.org/index.php/MediaWiki. I've installed the required PHP extensions and PHP, sqlite, nginx all seem to run fine on their own.
Now when I'm trying to do the setting up LocalSettings.php part of the MediaWiki installation, I go to 0.0.0.0/mediawiki in the browser, click the setup and get the error below. Maybe it's a setting for sqlite that has to be enabled?
[1449c8c65e65734059748f4e] /mw-config/index.php MediaWiki\Services\ServiceDisabledException from line 340 of /usr/share/webapps/mediawiki/includes/services/ServiceContainer.php: Service disabled: DBLoadBalancer
Backtrace:
#0 /usr/share/webapps/mediawiki/includes/MediaWikiServices.php(509): MediaWiki\Services\ServiceContainer->getService(string)
#1 /usr/share/webapps/mediawiki/includes/GlobalFunctions.php(3089): MediaWiki\MediaWikiServices->getDBLoadBalancer()
#2 /usr/share/webapps/mediawiki/includes/GlobalFunctions.php(3075): wfGetLB(boolean)
#3 /usr/share/webapps/mediawiki/includes/cache/LinkCache.php(267): wfGetDB(integer)
#4 /usr/share/webapps/mediawiki/includes/Title.php(3184): LinkCache->addLinkObj(Title)
#5 /usr/share/webapps/mediawiki/includes/Title.php(934): Title->getArticleID(integer)
#6 /usr/share/webapps/mediawiki/includes/content/ContentHandler.php(282): Title->getContentModel()
#7 /usr/share/webapps/mediawiki/includes/Title.php(4684): ContentHandler::getForTitle(Title)
#8 /usr/share/webapps/mediawiki/includes/parser/Parser.php(867): Title->getPageLanguage()
#9 /usr/share/webapps/mediawiki/includes/parser/Parser.php(2110): Parser->getTargetLanguage()
#10 /usr/share/webapps/mediawiki/includes/parser/Parser.php(2075): Parser->replaceInternalLinks2(string)
#11 /usr/share/webapps/mediawiki/includes/parser/Parser.php(1290): Parser->replaceInternalLinks(string)
#12 /usr/share/webapps/mediawiki/includes/parser/Parser.php(441): Parser->internalParse(string)
#13 /usr/share/webapps/mediawiki/includes/installer/Installer.php(675): Parser->parse(string, Title, ParserOptions, boolean)
#14 /usr/share/webapps/mediawiki/includes/installer/WebInstaller.php(681): Installer->parse(string, boolean)
#15 /usr/share/webapps/mediawiki/includes/installer/WebInstaller.php(657): WebInstaller->getInfoBox(string, string, string)
#16 /usr/share/webapps/mediawiki/includes/installer/WebInstaller.php(401): WebInstaller->getErrorBox(string)
#17 /usr/share/webapps/mediawiki/mw-config/index.php(54): WebInstaller->showError(Message, string)
#18 /usr/share/webapps/mediawiki/mw-config/index.php(38): wfInstallerMain()
#19 {main}

The problem was I had my php/sessions directory in /tmp. I moved it to session.save_path = "/var/lib/php/sessions" in php.ini and repeated these steps:
mkdir -p /var/lib/php/sessions
chown http:http /var/lib/php/sessions
chmod go-rwx /var/lib/php/sessions

Regardless of what Tgr said above, fixing the sessions did fix the issue for me. I'm using Apache ITK so the resolution I use is slightly different since each virtual host runs under its own unique uid.
First I create a separate directory for the sessions and change ownership
mkdir /var/lib/php/sessions-wiki
chown wiki. /var/lib/php/sessions-wiki
Then in my VirtualHosts directive I tell Apache/php where to find the session files by adding
php_admin_value session.save_path "/var/lib/php/sessions-wiki"
Then to make sure your config didn't break it.
apachectl configtest
Finally reload your config
apachectl graceful

Related

Typo3 Cache Flush Exception - How to debug

I have a dockerized TYPO3 instance on a server and try to flush the typo3 cache manually.
So, I use the following command to do that, inside my docker container:
vendor/.bin/typo3cms cache:flush
However, it fails and returns this error:
[ TYPO3\CMS\Core\Error\Exception ]
Warning: rename(): The first argument to copy() function cannot be a directory in /home/app/vendor/typo3/cms/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 2432
How I can debug this and find out what the problem is?
Full stack trace with -vvv
[ TYPO3\CMS\Core\Error\Exception ]
Warning: rename(): The first argument to copy() function cannot be a directory in /home/app/vendor/typo3/cms/typo3/sysext/core/Classes/Utili
ty/GeneralUtility.php line 2432
Exception code: 1
Exception trace:
#0 ()
vendor/helhum/typo3-console/Classes/Console/Error/ErrorHandler.php:86
#1 Helhum\Typo3Console\Error\ErrorHandler->handleError()
#2 rename()
typo3/sysext/core/Classes/Utility/GeneralUtility.php:2432
#3 TYPO3\CMS\Core\Utility\GeneralUtility::flushDirectory()
vendor/helhum/typo3-console/Classes/Compatibility/TYPO3v87/Service/CacheLowLevelCleaner.php:31
#4 Helhum\Typo3Console\TYPO3v87\Service\CacheLowLevelCleaner->forceFlushCachesFiles()
vendor/helhum/typo3-console/Classes/Console/Command/Cache/CacheFlushCommand.php:69
#5 Helhum\Typo3Console\Command\Cache\CacheFlushCommand->execute()
vendor/symfony/console/Command/Command.php:255
#6 Symfony\Component\Console\Command\Command->run()
vendor/symfony/console/Application.php:1000
#7 Symfony\Component\Console\Application->doRunCommand()
vendor/helhum/typo3-console/Classes/Console/Mvc/Cli/Symfony/Application.php:169
#8 Helhum\Typo3Console\Mvc\Cli\Symfony\Application->doRunCommand()
vendor/symfony/console/Application.php:271
#9 Symfony\Component\Console\Application->doRun()
vendor/symfony/console/Application.php:147
#10 Symfony\Component\Console\Application->run()
vendor/helhum/typo3-console/Classes/Console/Core/Kernel.php:148
#11 Helhum\Typo3Console\Core\Kernel->handle()
vendor/helhum/typo3-console/Scripts/typo3-console.php:30
#12 {closure}()
vendor/helhum/typo3-console/Scripts/typo3-console.php:32
#13 require()
vendor/helhum/typo3-console/typo3cms:3
cache:flush [--files-only]
This was a known issue and fixed with version 5.8.6 of the TYPO3 Console.
Well, the question was: How to debug this. Even if the problem is now solved, this may help:
You got the exception trace. You set a breakpoint in GeneralUtility.php line 2432.
If you already have xdebug set up, you only need to start the command line command with appropriate options, e.g with -e for generating debug information.
You can also look at DDEV. The last time I tried it, it worked pretty nicely to get the debugger to run, see https://ddev.readthedocs.io/en/stable/users/step-debugging/
I usually use xdebug in combination with PhpStorm.

Using httpClient from a web application results in an error(cakephp3 App On GCE)

I am in great trouble, so I would like you to help me.
I made a web application with cakephp3 and run it on GCE.
When trying to communicate using Http Client, the following error appears.
++++
cakephp version 3.6.2
OS CentOS7 -
++++
2018-06-20 17:14:19 Error: [Cake\Core\Exception\Exception] fopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known
fopen(https:/XXXX): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
Request URL: /XXX/?callback=jQuery33100918089472164082_1529482454011
Referer URL: https://{request_host}/XXX/
Stack Trace:
#0 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/Client/Adapter/Stream.php(252): Cake\Http\Client\Adapter\Stream->_open(Object(Zend\Diactoros\Uri))
#1 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/Client/Adapter/Stream.php(82): Cake\Http\Client\Adapter\Stream->_send(Object(Cake\Http\Client\Request))
#2 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/Client.php(430): Cake\Http\Client\Adapter\Stream->send(Object(Cake\Http\Client\Request), Array)
#3 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/Client.php(399): Cake\Http\Client->_sendRequest(Object(Cake\Http\Client\Request), Array)
#4 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/Client.php(366): Cake\Http\Client->send(Object(Cake\Http\Client\Request), Array)
#5 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/Client.php(229): Cake\Http\Client->_doRequest('GET', 'https://{request_host}', NULL, Array)
#6 /usr/local/apache/vhosts/{my_host}/htdocs/src/Controller/Api/XXXController.php(489): Cake\Http\Client->get('https:/request_host}')
#7 /usr/local/apache/vhosts/{my_host}/htdocs/src/Controller/Api/XXXController.php(406): App\Controller\Api\XXXController->__hogeAction('XXX')
#8 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Controller/Controller.php(596): App\Controller\Api\XXXController->invite()
#9 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(120): Cake\Controller\Controller->invokeAction()
#10 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(94): Cake\Http\ActionDispatcher->_invoke(Object(App\Controller\Api\XXXController))
#11 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/BaseApplication.php(228): Cake\Http\ActionDispatcher->dispatch(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#12 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/Runner.php(65): Cake\Http\BaseApplication->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#13 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php(158): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#14 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/Runner.php(65): Cake\Routing\Middleware\RoutingMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#15 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php(88): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#16 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/Runner.php(65): Cake\Routing\Middleware\AssetMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#17 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php(98): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#18 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/Runner.php(65): Cake\Error\Middleware\ErrorHandlerMiddleware->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response), Object(Cake\Http\Runner))
#19 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/Runner.php(51): Cake\Http\Runner->__invoke(Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#20 /usr/local/apache/vhosts/{my_host}/htdocs/vendor/cakephp/cakephp/src/Http/Server.php(98): Cake\Http\Runner->run(Object(Cake\Http\MiddlewareQueue), Object(Cake\Http\ServerRequest), Object(Cake\Http\Response))
#21 /usr/local/apache/vhosts/{my_host}/htdocs/webroot/index.php(34): Cake\Http\Server->run()
#22 {main}
I checked resolve.conf, but it is colected.
Because it is working properly on my localhost, I think that it is a problem of setting up the server and the network.
I am glad if you can help me. Thank you.
Take a look at the Firewall Rule in the GCP. Make sure that you allow ingress traffic for the ports 80, 443.
Eventually, try to test the URL connection and the ports within the GCE VM instance, or outside the GCP. Below are some examples:
$ curl http://[external-IP-vm-address]:80
$ telnet localhost 80
$ nmap <external-ip-vm-address>
$ netstat -plant
There are other network tests that you could perform. You may consult this discussion thread from Stackexchange.

Yii2 php yii migration

I just have installed yii2 on linux mint, using xampp, and my php yii migrate doesn't work.
basic # php yii migrate
Yii Migration Tool (based on Yii v2.0.10)
Exception 'yii\db\Exception' with message 'could not find driver'
in /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/db/Connection.php:549
Stack trace:
#0 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/db/Connection.php(863): yii\db\Connection->open()
#1 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/db/Connection.php(850): yii\db\Connection->getMasterPdo()
#2 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/db/Command.php(219): yii\db\Connection->getSlavePdo()
#3 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/db/Command.php(894): yii\db\Command->prepare(true)
#4 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/db/Command.php(362): yii\db\Command->queryInternal('fetchAll', NULL)
#5 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/db/mysql/Schema.php(198): yii\db\Command->queryAll()
#6 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/db/mysql/Schema.php(97): yii\db\mysql\Schema->findColumns(Object(yii\db\TableSchema))
#7 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/db/Schema.php(147): yii\db\mysql\Schema->loadTableSchema('migration')
#8 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/console/controllers/MigrateController.php(199): yii\db\Schema->getTableSchema('{{%migration}}', true)
#9 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(771): yii\console\controllers\MigrateController->getMigrationHistory(NULL)
#10 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(135): yii\console\controllers\BaseMigrateController->getNewMigrations()
#11 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#12 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
#13 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/base/Controller.php(154): yii\base\InlineAction->runWithParams(Array)
#14 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/console/Controller.php(128): yii\base\Controller->runAction('', Array)
#15 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/base/Module.php(454): yii\console\Controller->runAction('', Array)
#16 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate', Array)
#17 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('migrate', Array)
#18 /opt/lampp/htdocs/basic/vendor/yiisoft/yii2/base/Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request))
#19 /opt/lampp/htdocs/basic/yii(20): yii\base\Application->run()
#20 {main}
you're missing php-mysql or php-mysqlnd
run this
apt-get install php-mysql
update:
there's also a requirements.php file in yii. You might wanna check that out and see exactly what your system is missing. it could be pdo-mysql
either way, check the requirements and a phpinfo(). see what you need and make sure you have it installed and configured propperly
Just like the error message states - there is no database driver installed. Choose your database and install correct driver.
Here is the solution to the problem... yiisitenamne/backend/common/config
look for the php file main-local.php change "localhost -> 127.0.0.1"
Are you using Virtualbox?
Looks like you are missed to install php-mysql
apt-get install php-mysql
then run migration command
php console/yii migrate/up or
php console/yii migrate
I guess this is because of missing driver for PDO. Based on DB you are using, you might want to enable pdo-mysql, pdo-mssql, pdo-postgres ... in your XAMPP php.ini.

Compiled chromium source code and the execution with sandbox issue

I've downloaded the chromium source and finally got it compiled. It took super long time to build the source.
I've followed the instruction in the official site
https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment
Unfortunately, the error is still there.
What I've done:
sudo cp out/Debug/chrome_sandbox /usr/local/sbin/chrome-devel-sandbox #needed if you build on NFS!
sudo chown root:root /usr/local/sbin/chrome-devel-sandbox
sudo chmod 4755 /usr/local/sbin/chrome-devel-sandbox
and I export this in my .bashrc
export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox
and then I executed the executable and got the following error
chromium/src/out/Debug$./chrome
[22051:22051:0929/151724:FATAL:browser_main_loop.cc(160)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
#0 0x7f0051e91d3e base::debug::StackTrace::StackTrace()
#1 0x7f0051f01b05 logging::LogMessage::~LogMessage()
#2 0x7f0056a470f2 content::(anonymous namespace)::SetupSandbox()
#3 0x7f0056a46a16 content::BrowserMainLoop::EarlyInitialization()
#4 0x7f0056a52bb6 content::BrowserMainRunnerImpl::Initialize()
#5 0x7f0056a45c7f content::BrowserMain()
#6 0x7f0051e3a4af content::RunNamedProcessTypeMain()
#7 0x7f0051e3ca08 content::ContentMainRunnerImpl::Run()
#8 0x7f0051e39a95 content::ContentMain()
#9 0x7f0050d3aab5 ChromeMain
#10 0x7f0050d3aa62 main
#11 0x7f0047ef176d __libc_start_main
#12 0x7f0050d3a945 <unknown>
================================================================================
By following what official site suggests,
I ran a script and got the following message:
/chromium/src/build$ sudo ./update-linux-sandbox.sh
Your setuid sandbox is up to date
Make sure you have "export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox" somewhere in your .bashrc
This variable is currently: empty
when I typed
echo $CHROME_DEVEL_SANDBOX
/usr/local/sbin/chrome-devel-sandbox:
So I guee the export works well.
I have searched around the answer to this question but no luck so far.
Any feedback will be appreciated. Thanks
Here is what I did:
build on a diff machine (in my case I used a server, Ubuntu 12.04)
copy to my laptop (Ubuntu 13.10)
run it
I was able to run it but unfortunately I am still not 100% sure what the problem was. :(
I guess the build environment would be different since I share the server with others.
Hope this helps,

compile & execute Chromium failed due to SUID sandbox issue

What I'm trying to do :
Compile and run Chromium source code on Ubuntu 13.10
Steps I've taken :
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
add to bashrc :
export PATH="$PATH":/home/y0.kim/project/depot_tools
export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox
fetch --nohooks chromium --nosvn=True
git checkout master
build/install-build-deps.sh
git pull
gclient sync
ninja -C out/Debug chrome chrome_sandbox
build/update-linux-sandbox.sh
out/Debug/chrome -> Fail
out/Debug/chrome --no-sandbox -> Fail
Problem :
get the source code and compiled without problem.
However, when i execute chrome, i have below error
normal execution
:~/project2/src$ out/Debug/chrome
The setuid sandbox provides API version 1, but you need 0
Please read https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment.
[37555:37588:0616/152604:FATAL:browser_main_loop.cc(207)] <unknown>: Command line `dbus-launch --autolaunch=f271cc756e9c41e457760b8c00000496 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n
#0 0x7f570456a39d base::debug::StackTrace::StackTrace()
#1 0x7f57045bc51d logging::LogMessage::~LogMessage()
#2 0x7f5707e45cef content::(anonymous namespace)::GLibLogHandler()
#3 0x7f5701c20f61 g_logv
#4 0x7f5701c21172 g_log
#5 0x7f56f5240d2a <unknown>
#6 0x7f56f5241087 <unknown>
#7 0x7f5701c19d13 g_main_context_dispatch
#8 0x7f5701c1a060 <unknown>
#9 0x7f5701c1a45a g_main_loop_run
#10 0x7f56f524098b <unknown>
#11 0x7f5701c3b9b5 <unknown>
#12 0x7f56fdfd0e9a start_thread
#13 0x7f56fc1853fd clone
Aborted (core dumped)
execution with --no-sandbox
~/project2/src$ out/Debug/chrome --no-sandbox
[19653:19653:0616/152447:ERROR:browser_main_loop.cc(161)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[19653:19656:0616/152447:FATAL:browser_main_loop.cc(207)] <unknown>: Command line `dbus-launch --autolaunch=f271cc756e9c41e457760b8c00000496 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n
#0 0x7f8f13bbe39d base::debug::StackTrace::StackTrace()
#1 0x7f8f13c1051d logging::LogMessage::~LogMessage()
#2 0x7f8f17499cef content::(anonymous namespace)::GLibLogHandler()
#3 0x7f8f11274f61 g_logv
#4 0x7f8f11275172 g_log
#5 0x7f8f05095d2a <unknown>
#6 0x7f8f05096087 <unknown>
#7 0x7f8f1126dd13 g_main_context_dispatch
#8 0x7f8f1126e060 <unknown>
#9 0x7f8f1126e45a g_main_loop_run
#10 0x7f8f0509598b <unknown>
#11 0x7f8f1128f9b5 <unknown>
#12 0x7f8f0d624e9a start_thread
#13 0x7f8f0b7d93fd clone
Aborted (core dumped)
:~/project2/src$ [0616/152448:ERROR:nacl_helper_linux.cc(277)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
steps i've tried to fix the problem:
went to https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment
read it
built chrome with chrome_sandbox again
ninja -C out/Debug chrome chrome_sandbox
executed build/update-linux-sandbox.sh again
checked again if ~/.bashrc have below line
export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox
what i would like to know:
What should I do to execute Chrome on above situation?
What would be the reason that --no-sandbox option did not work?
any input would be highly appreciated.
Young.
This error message...
The setuid sandbox provides API version 1, but you need 0
...implies that your setuid binary is out of date hence the program was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
As per the documentation in Linux SUID Sandbox Development google-chrome needs a SUID helper binary to turn on the sandbox on Linux. In majority of the cases you can install the proper sandbox for you using the command:
build/update-linux-sandbox.sh
This program will install the proper sandbox for you in /usr/local/sbin and tell you to update your .bashrc if required.
However, there can be some exceptions as an example, if your setuid binary is out of date, you will get messages such as:
The setuid sandbox provides API version X, but you need Y
You are using a wrong version of the setuid binary!
In these cases, you need to follow the steps below:
Build chrome_sandbox whenever you build chrome (ninja -C xxx chrome chrome_sandbox instead of ninja -C xxx chrome)
After building, execute update-linux-sandbox.sh.
# needed if you build on NFS!
sudo cp out/Debug/chrome_sandbox /usr/local/sbin/chrome-devel-sandbox
sudo chown root:root /usr/local/sbin/chrome-devel-sandbox
sudo chmod 4755 /usr/local/sbin/chrome-devel-sandbox
Finally, you have to include the following line in your ~/.bashrc (or .zshenv):
export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox
Reference
You can find the documentations in:
Issue 369100: ERROR:nacl_helper_linux.cc(233) NaCl helper process running without a sandbox!
Issue 318646: Chrome won't start after update to latest stable version
Issue 598454: Stop checking for the setuid sanbox binary on desktop Linux
tl; dr
Linux SUID Sandbox
I had a similar issue and when i run chrome with this flag it worked fine
--disable-setuid-sandbox