EOSIO - cleos wallet create command throwing error "Invalid content-length response" - eos

As per the EOSIO Docs, I ran the cleos wallet create command to create my first default wallet. However it is throwing following error.
3401237ms thread-0 main.cpp:2756 main ] Failed with error: Assert Exception (10)
response_content_length >= 0: Invalid content-length response

After going through few github issues, I figured out that following change to config.ini will fix this error.
Config File Location: /tmp/eosio/config, and File: config.ini, and the property http-validate-host should be changed from 1 (true) to 0 (false), as shown below:
http-validate-host=0

Related

Composer Require or Update Error

When trying to update composer in Windows 10 (before today it was fine). But today i got error like this
Reading C:/Users/Wilson/AppData/Local/Composer/repo/https---packagist.org/p-provider-2013.json from cache
Content-Length mismatch
http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Downloading http://packagist.org/p/provider-2017-01%24464ecabe7bed9235d9c8eab9973bf43265f6c91cf94ba8c49425d34dcb54b34e.json
[Composer\Downloader\TransportException]
The "http://packagist.org/p/provider-2017-01%24464ecabe7bed9235d9c8eab9973bf43265f6c91cf94ba8c49425d34dcb54b34e.jso
n" file could not be downloaded (HTTP/1.1 302 Found)
Exception trace:
() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/RemoteFilesystem.php:373
Composer\Util\RemoteFilesystem->get() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/RemoteFilesystem.php:101
Composer\Util\RemoteFilesystem->getContents() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Repository/ComposerRepository.php:665
Composer\Repository\ComposerRepository->fetchFile() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Repository/ComposerRepository.php:577
Composer\Repository\ComposerRepository->loadProviderListings() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Repository/ComposerRepository.php:296
Composer\Repository\ComposerRepository->whatProvides() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Pool.php:204
Composer\DependencyResolver\Pool->computeWhatProvides() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Pool.php:193
Composer\DependencyResolver\Pool->whatProvides() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Installer.php:987
Composer\Installer->processDevPackages() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Installer.php:466
Composer\Installer->doInstall() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Installer.php:223
Composer\Installer->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/UpdateCommand.php:158
Composer\Command\UpdateCommand->execute() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Command/Command.php:257
Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:850
Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:193
Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:227
Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:124
Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:100
Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:54
require() at C:\ProgramData\ComposerSetup\bin\composer.phar:24
Please help. Thanks.
Actually I have added two same plugins with different name like
"kartik-v/yii2-widgets": "*", and "kartik-v/yii2-widget-select2": "#dev"
so the composer give result (HTTP/1.1 302 Found).
Thanks again to Bizley for commenting my question.

Config.php -error when logging in

After updating to 2.1.7 I get an error in the backend saying
" Warning: Invalid argument supplied for foreach() in /domains/domaindomain.nl/DEFAULT/src/Config.php on line 641
Warning: Cannot modify header information - headers already sent by (output started at /domains/ityhardy.nl/DEFAULT/src/Config.php:641) in /domains/ityhardy.nl/DEFAULT/src/Users.php on line 287
"
Using SQLite on this site.
Frontend seems to work fine.
I must add that at the time of updating I was making small changes in contenttypes.yml, don't know in which exact order I did what.
Found it: There was a stray “uses” in the wrong field somewhere in contenttypes.yml

How to add the SwingLibrary plugin to RobotFramework?

I'm trying to execute the SwingLibrary demo available in https://github.com/robotframework/SwingLibrary/wiki/SwingLibrary-Demo
After setting everything up (Jython, RobotFramework, demo app), I can run the following command:
run_demo.py startapp
, and it works (the demo app starts up).
Now if I try to run the sample tests, it fails:
run_demo.py example.txt
[ ERROR ] Error in file '/home/user1/python-scripts/gui_automation/sample-text.txt': Non-existing setting 'Library SwingLibrary'.
[ ERROR ] Error in file '/home/user1/python-scripts/gui_automation/sample-text.txt': Non-existing setting 'Suite Setup Start Test Application'.
==============================================================================
Sample-Text
==============================================================================
Test Add Todo Item | FAIL |
No keyword with name 'Insert Into Text Field description ${arg}' found.
------------------------------------------------------------------------------
Test Delete Todo Item | FAIL |
No keyword with name 'Insert Into Text Field description ${arg}' found.
------------------------------------------------------------------------------
Sample-Text | FAIL |
2 critical tests, 0 passed, 2 failed
2 tests total, 0 passed, 2 failed
==============================================================================
Output: /home/user1/python-scripts/gui_automation/results/output.xml
Log: /home/user1/python-scripts/gui_automation/results/log.html
Report: /home/user1/python-scripts/gui_automation/results/report.html
I suspect that it cannot find swinglibrary.jar, and therefore my plugin installation is probably messed up.
Any ideas?
Take a look at these error messages in the report:
[ ERROR ] Error in file '...': Non-existing setting 'Library SwingLibrary'.
[ ERROR ] Error in file '...': Non-existing setting 'Suite Setup Start Test Application'.
The first rule of debugging is to always assume error messages are telling you the literal truth.
They are telling you that you have an unknown setting. It thinks you are using a setting literally named "Library SwingLibrary" and one named "Suite Setup Start Test". Those are obviously incorrect setting names. The question is, why is it saying that?
My guess is that you are using the space-separated text format, and you only have a single space between "Library" and "SwingLibrary". Because there is one space, robot thinks that whole line is in the first column of the settings table, and whatever is in the first column is treated as the setting name.
The fix should be as simple as inserting two or more spaces after "Library", and two or more spaces after "Suite Setup".
This type of error is why I always recommend using the pipe-separated format. It makes the boundaries between cells much easier to see.

Illegal character in authority at index 7: hdfs://localhost:9000 with hadoop

I am trying to connect to hdfs.
Configuration configuration = new Configuration();
configuration.set("fs.default.name", this.hdfsHost);
fs = FileSystem.get(configuration);
hdfsHost is 127.0.0.1:9000.
but get this exception at FileSystem.get();
I have another project running the same code, but works well.
Could anyone give any suggestion?
Thank you very much
the exception track:
Exception in thread "main" java.lang.IllegalArgumentException
at java.net.URI.create(URI.java:842)
at org.apache.hadoop.fs.FileSystem.getDefaultUri(FileSystem.java:103)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:95)
at TransferToHadoop.TransferFiles.<init>(TransferFiles.java:50)
at.TransferToHadoop.ScheduleTransferJobs.getTransferFiles(ScheduleTransferJobs.java:99)
at .TransferToHadoop.ScheduleTransferJobs.main(ScheduleTransferJobs.java:30)
Caused by: java.net.URISyntaxException: Illegal character in authority at index 7: hdfs://localhost:9000
at java.net.URI$Parser.fail(URI.java:2809)
at java.net.URI$Parser.parseAuthority(URI.java:3147)
at java.net.URI$Parser.parseHierarchical(URI.java:3058)
at java.net.URI$Parser.parse(URI.java:3014)
at java.net.URI.<init>(URI.java:578)
at java.net.URI.create(URI.java:840)
... 5 more
Try passing hdfsHost as a qualified url hdfs://127.0.0.1:9000 instead of 127.0.0.1:9000
This can happen if there is trailing space in the core-site.xml against the property value for hdfs name (fs.defaultFS).
Bind the host name with the corresponding ip in both the servers i.e. in both client and server in /etc/hosts file

Fix the rules in mod security

I have install mod security 2.5.12
i got the error 403 Forbidden for some php file
So it is false positive
i want to disable the rule for this perticular warning
So can any one tell me that how can i know the rule for this error in mod security file??
In the mod_security.log file is written the line and the rule. For example:
Message: Access denied with connection close (phase 2). Matched phrase "msnbot" at REQUEST_HEADERS:User-Agent. [file "/home/oscar/conf/mod_sec_default_action.conf"] [line "28"] [id "60008"]
You should add or modify the SecAuditEngine parameter to begin to log in httpd.conf, with the value
SecAuditEngine On
, or
SecAuditEngine RelevantOnly
The rule information appears in the file you have especified in SecAuditLog in httpd.conf.
SecAuditLog /logs/mod_security.log