Error initializing Fabric CA server, go-sqlite3 requires cgo to work - vagrant

I have recently update Hyperledger Fabric and associated CA and when initializing I receive the following error:
2021/07/02 08:03:55 [DEBUG] Initializing DB
2021/07/02 08:03:55 [DEBUG] Initializing 'sqlite3' database at '/vagrant/fabric-ca-server/fabric-ca-server.db'
2021/07/02 08:03:55 [DEBUG] Using sqlite database, connect to database in home (/vagrant/fabric-ca-server/fabric-ca-server.db) directory
2021/07/02 08:03:55 [DEBUG] Creating SQLite database (/vagrant/fabric-ca-server/fabric-ca-server.db) if it does not exist...
2021/07/02 08:03:55 [ERROR] Error occurred initializing database: Failed to open sqlite3 DB: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub
I have tried to issue the following:
export CGO_ENABLED=1
go get -u github.com/hyperledger/fabric-ca/cmd/...
I have also downloaded the binaries from https://github.com/hyperledger/fabric-ca/releases, but that gives the same error.
I am using vagrant boxes with virtualbox, the initialization was working previously.
Any help would be appreciated, thanks!

I solved it, I needed to issue the command:
export CGO_ENABLED=1
go install github.com/hyperledger/fabric-ca/cmd/fabric-ca-server#latest
then copy the fabric-ca-server that was build in the correct directory

FYI _ I encountered this myself in testing, and have raised an issue about it https://github.com/hyperledger/fabric-ca/issues/242
Thinking that this really is an error.

Related

DPI-1047: Cannot locate a 64-bit Oracle Client library: "failed to get message for Windows Error 126"

I am working with dagster and dbt. I have a test repo that I use both on a Debian VM and on my Windows PC. On Debian everything works fine, here on Windows I receive the following Oracle error and can't fix it.
ERROR oracle adapter: Got an error when attempting to open an Oracle connection:
'DPI-1047: Cannot locate a 64-bit Oracle Client library:
"failed to get message for Windows Error 126".
See https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html for help'
INFO oracle adapter: Rolling back transaction.
I am receiving this error even after:
Downloading Oracle Instant client and unzipping it in my Oracle folder (C:\Program Files (x86)\Oracle\instantclient_21_6)
Setting the ORACLE_HOME and PATH.
Installing and importing cx_Oracle.
Initializing cx_Oracle.

Error during installation of Jasper Reportt Server

I'm trying to install Jasper Report Server but I keep getting always the same error: during the post-install actions I get the following
Problem running post-install step. Installation may not complete correctly
Error running C:\Jaspersoft\jasperreports-server-cp-8.0.0/buildomatic/js-ant.bat
load-sugarcrm-db:[create-ks] Failed to create the keystore C:\Users\Paolo\.jrsks
BUILD FAILED
C:\Jaspersoft\jasperreports-server-cp-8.0.0\buildomatic\build.xml:377: The
following error occurred while executing this line:
C:\Jaspersoft\jasperreports-server-cp-8.0.0\buildomatic\bin\setup.xml:377:
Keystore may have been tampered with.
Total time: 1 second
I'm using the default installation and windows 11. I also tried running it in compatibility mode for Windows 7 but nothing changed. Can someone help me?
My problem was that js-install.sh created the keystore and placed it in a user directory, where it then couldn't access it again.
You could check the access rights for the folder the keystore is placed, and check if your user has the right ones.

greenplum initialization failed

When I tried to initialize Greenplum I got the following error
20180408:23:21:02:017614 gpstop:datanode3:root-[INFO]:-Starting gpstop with args:
20180408:23:21:02:017614 gpstop:datanode3:root-[INFO]:-Gathering information and validating the environment...
20180408:23:21:02:017614 gpstop:datanode3:root-[ERROR]:-gpstop error: postmaster.pid file does not exist. is Greenplum instance already stopped?
also when i tried to check gpstate command i got the following error
20180408:23:21:48:017711 gpstate:datanode3:root-[INFO]:-Starting gpstate with args:
20180408:23:21:48:017711 gpstate:datanode3:root-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.7.0 build f7c6eb5-oss'
20180408:23:21:48:017711 gpstate:datanode3:root-[CRITICAL]:-gpstate failed. (Reason='could not connect to server: Connection refused
I also did the configuration an add a permission on PostgreSQL.conf, but the same issue
You have pasted the output of gpstop.
gpstop error: postmaster.pid file does not exist. is Greenplum
instance already stopped?
Which means that the database is not running.

initdb for postgresql on os x fails

Having trouble installing postgres 10 on my Mac, version 10.12.5.
I've tried installing 2 ways:
(1) Downloading Postgres.app
(2) `brew install postgresql`
and tried to manually run a bunch of variations of these commands for initdb:
$ initdb /Applications/Postgres.app/Contents/Versions/latest/bin/ver-10
$ initdb /usr/local/var/postgres -E utf8
All yield the same error FATAL: could not create semaphores: Invalid argument.
Full trace:
The files belonging to this database system will be owned by user "foo".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /usr/local/var/postgres ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... 2018-03-12 20:49:58.654 PDT [98144] FATAL: could not create semaphores: Invalid argument
2018-03-12 20:49:58.654 PDT [98144] DETAIL: Failed system call was semget(1, 17, 03600).
child process exited with exit code 1
initdb: removing contents of data directory "/usr/local/var/postgres"
I'm not sure what FATAL: could not create semaphores: Invalid argument means. I've seen a lot of other answers related to insufficient space, but not this one.
Thanks in advance!
I had to remove Postgres which I install via Brew, and then I reinstalled Postgres.app, and then restarted my computer, and then opening the app and clicking 'initialize' fixed it.

sbt 0.13 on Windows - Cannot Access Repositories

I've gone through almost everything related to installing sbt on Window on stackoverflow (there are quite a few people having the same problem with me). However, the answer seems unclear/unreproducible on my machine.
Here is what I did:
Download sbt-0.13.13 on this site
Install it successfully and set the PATH
Try sbt version to see if it is installed successfully. Error
returned (as at the end of this post)
A few things we should know:
I already have JDK
I don't use Proxy on my computer (tested with netsh winhttp show
proxy)
Someone said it is because sbt doesn't support ASCII character - but
the solution wasn't clear
problems summary
WARNINGS
module not found: org.fusesource.jansi#jansi;1.11
local: tried
C:\Users\buidu\.ivy2\local\org.fusesource.jansi\jansi\1.11\ivys\ivy.xml
-- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
C:\Users\buidu\.ivy2\local\org.fusesource.jansi\jansi\1.11\jars\jansi.jar
==== Maven Central: tried
https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
-- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
==== typesafe-ivy-releases: tried
https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
==== sbt-ivy-snapshots: tried
https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
UNRESOLVED DEPENDENCIES
org.fusesource.jansi#jansi;1.11: not found
Server access Error: Permission denied: connect url=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
Server access Error: Permission denied: connect url=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
Server access Error: Permission denied: connect url=https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
Server access Error: Permission denied: connect url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
You could try to configure the use of IPV4 (not IPV6), as described in the accepted answer for this question:
Error while importing sbt project , Server Access error, unresolved dependencies
setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true
I was struggling with the same for a week. The only thing, that helped, was to uninstall sbt from the default location (c:\Program Files(x86)\sbt) and reinstall it to some location without spaces (I've installed it to d:\sbt).
Did you try taking a look in your sbt repositories file (likely to be c:\users\.sbt\repositories, and specifying http:// instead of https:// ?

Resources