Unhandled error for request GET /api/Wallet/import: Error: No method exists to handle GET /Wallet/import - hyperledger-composer

I executed the command "composer-rest-server -c admin#example -a true", the website "http://localhost:3000/explorer/" show RESTAPI, but it not show "/api/wallet/"

I modify the command as "composer-rest-server -c admin#example -a true -m true", and then "/api/wallet/" shows

Related

synchronize fails with rsync_opts

Running ansible command with synchronize module and rsync_opts fails with error:
$ ansible all -i testvm, -m synchronize -a "src=./ dest=/etc/audit/rules.d mode=push owner=no group=no recursive=no rsync_opts=--chown=root:root" -b
testvm | FAILED! => {
"changed": false,
"cmd": "/usr/bin/rsync --delay-updates -F --compress --archive --no-recursive --no-owner --no-group --rsh='/usr/bin/ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' --rsync-path='sudo -u root rsync' --chown=root:root --out-format='<<CHANGED>>%i %n%L' /Users/xxxxxxxx/auditd/rules.d/ testvm:/etc/audit/rules.d",
"msg": "rsync: --chown=root:root: unknown option\nrsync error: syntax or usage error (code 1) at /AppleInternal/Library/BuildRoots/xxxxxxxxxxxxxxxxxxx/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(1337) [client=2.6.9]\n",
"rc": 1
}
I tried with different quotation marks/escapes without success.
The command itself works fine when I remove rsync_opts=--chown=root:root
I need to synchronise folder with ansible+become from local user to target system changing owner of the files in final location to root:root. There is no direct access too root account via ssh so I can't run rsync directly.
The copy module is too slow.
The error you received is very clear:
rsync: --chown=root:root: unknown option
rsync error: syntax or usage error (code 1) at /AppleInternal/Library/BuildRoots/xxxxxxxxxxxxxxxxxxx/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(1337) [client=2.6.9]
The error implies that the version of rsync you're running is older than 3.1.0, when the --chown option was introduced. This is backed up by the version reported later in the output, [client=2.6.9].
In order to use this functionality you need to upgrade to a version of rsync that supports it.

im getting error code 127 while creating jenkins pipeline here is the script

pg_dump -h 10.12.0.4 -U pet--rsmb--prod-l1--usr -w -c -f 2022-08-10t1228z-data.sql
/var/lib/jenkins/workspace/BACKUP-RSMB--POSTGRESQL#tmp/durable-510acc0f/script.sh: 1: /var/lib/jenkins/workspace/BACKUP-RSMB--POSTGRESQL#tmp/durable-510acc0f/script.sh: pg_dump: not found
Your error clearly indicates that the Shell executor cannot find pg_dump command. Either you have not set pg_dump properly in the Jenkins server or you have not added pg_dump to the executable $PATH.

json configuration of consul watch handler

I'd like to run a script in sudo mode as my consul watch handler, I can run it with command
consul watch -type key -key mykey sudo -u myaccount /scripts/myscript.sh
But I don't know how to define it in json configuration, I've tried below but it does not works
{
"watches":[{
"type":"key",
"key":"mykey",
"handler_type":"script",
"args":["sh","-c","sudo","-u","myaccount","/scripts/myscript.sh"]
}]
}
I am using consul 1.5.2, this is the error:
[ERR] agent: Failed to run watch handler '[sh -c sudo -u myaccount /scripts/myscript.sh]': exit status 1
Can anyone tell me what's wrong with my json configuration?
I moved the sh -c
I got it to work with:
"watches":[{
"type":"key",
"key":"mykey",
"handler_type":"script",
"args":["/bin/sudo","-u","consul","/bin/sh","-c","/home/testscript.sh"]
}]
The -c requires the script to be executable. Also you need the correct sudo privileges. You might even remove the sh -c altogether when the script is executable

FRM-91500: Unable to start/complete the build when trying sudo su - oracle -c to run frmcmp_batch.sh

I was trying to automate our form compilation process.
I created a .bat file that will do the following:
Login user to host
sudo -S -u oracle bash -c 'bash /frmcmp_batch.sh'
But when I try to run frmcmp_batch.sh, I'm getting the error:
FRM-91500: Unable to start/complete the build error.
It is because your display isn't right. You get this to work by setting the following commands:
export TERM=vt220
export ORACLE_TERM=vt220

How to execute a command from the host when it's on the $PATH?

I am installing the Laravel Installer as part of a Docker container using Composer. Laravel is installed globally meaning it goes to ~/.composer/vendor and then add an executable under ~/.composer/vendor/bin.
I am adding the directory ~/.composer/vendor/bin to the $PATH in a Dockerfile as follow:
ENV PATH="~/.composer/vendor/bin:${PATH}"
If I run the command docker exec -it php-fpm bash and from inside the container I run echo $PATH I got the following:
# echo $PATH
/opt/remi/php71/root/usr/bin:/opt/remi/php71/root/usr/sbin:~/.composer/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
If I run the command laravel inside the container I got the following:
# laravel
Laravel Installer 1.3.3
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
new Create a new Laravel application.
So everything seems to be working fine. But if I run the following command (outside the container) meaning from the host:
$ docker exec -it php-fpm laravel
I got the following error:
rpc error: code = 13 desc = invalid header field value "oci runtime error: exec failed: container_linux.go:247: starting container process caused \"exec: \\\"laravel\\\": executable file not found in $PATH\"\n"
What I am missing here? Can the command laravel be run from within the host?
The ~ is the problem here, it's not a valid path character for some shells exec doesn't process it as you'd hope, and it isn't expanded for you by the Dockerfile. Be explicit with your path with the following:
ENV PATH=/root/.composer/vendor/bin:${PATH}

Resources