run a minishift with debug logging level - openshift-origin

How to run a minishift with debug logging level?
I tried
minishift logs --v 8 -f
but it doesn't work.
According to the https://access.redhat.com/solutions/2216951 (requires a RedHat developer account to view the full version) 8 log level should be what I need.
0 - Errors and warnings only
2 - Normal information
4 - Debugging-level information
6 - API-level debugging information (request / response)
8 - Body-level API debugging information

It should be run as
minishift start --show-libmachine-logs -v 5
where
--show-libmachine-logs will show libmachine logs
-v n - shows n level deep logs
More here https://docs.openshift.org/latest/minishift/command-ref/minishift_start.html.

Related

Git bash on Windows 10 no longer works with Bitbucket since the March 2022 App Password change from Atlassian

I have read 100's of posts and tried dozens of things, give or take, to get Windows 10 and my git bash push to work with the Bitbucket Cloud and their App password mandate enforced on March 1st 2022. I decided to reach out to the stack team before I harm a monitor, laptop or myself. 10 hours in and I give up. Mea Culpa.
Using git bash:
$ git push -u origin master
Gets me:
remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication.
remote: See our community post for more details:
https://atlassian.community/t5/x/x/ba-p/1948231
remote: App passwords are recommended for most use cases and can be created in your Personal
settings:
remote: https://bitbucket.org/account/settings/app-passwords/
fatal: Authentication failed for 'https://bitbucket.org/myWorkspace/myRepo.git/'
Windows 10
git bash version 2.35.1.windows.2
using bitbucket web interface to view my repositories and add app
passwords --- https://bitbucket.org/
My bitbucket account has my work email address and a username associated with it.
I have a Bitbucket Cloud workspace, project and repository that I have been pushing into for several years.
I have used both Visual Studio and Git Bash to access this repository.
I did not create the repository. Our company admin did.
I am the only user of the repository and the only userid that has ever pushed to it.
Both access methods VS2019 and Git Bash quit working for me around Mar. 10th when I tried my first Commit and Push since Dec2021.
Since my first error on March 10th.
I have added an app password via bitbucket web interface by:
1 - Left click my avatar lower left of bitbucket web page
2 - Select Personal Settings
3 - Select App Passwords on the left
4 - Click Blue Create App Password button
5 - Labeled it: GitBash
6 - Selected all the permissions below -
Account
x - Email
x - Read
x - Write
Workspace membership
x - Read
x - Write
Projects
x - Read
x - Write
Repositories
x - Read
x - Write
x - Admin
not - Delete
Pull requests
x - Read
x - Write
7 - Then hit the blue Create button.
8 - I then got the screen that displayed the 20 char password. I copied it to notepad temporarily and then put it in the git command below:
$ git remote set-url origin https://myUserid:myAppPassword1234567#bitbucket.org/my-workspace/myrepo.git
I then try my push again:
$ git push -u origin master
and get the response:
remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication.
remote: See our community post for more details: https://atlassian.community/t5/x/x/ba-p/1948231
remote: App passwords are recommended for most use cases and can be created in your Personal settings:
remote: https://bitbucket.org/account/settings/app-passwords/
fatal: Authentication failed for 'https://bitbucket.org/myWorkspace/myRepo.git/'
$ git config --global --list
core.editor="C:\Users\first last\AppData\Local\Programs\Microsoft VS Code\bin\code" --wait
user.name=myUserid
user.email=myUserid#myCompany.com
credential.bitbucketauthmodes=basic
credential.microsoft.visualstudio.com.authority=BitBucket
difftool.sourcetree.cmd='' "$LOCAL" "$REMOTE"
mergetool.sourcetree.cmd=''
mergetool.sourcetree.trustexitcode=true
$ git remote -v
origin https://myUserid:myAppPassword1234567#bitbucket.org/my-workspace/my-repo.git
(fetch)
origin https://myUserid:myAppPassword1234567#bitbucket.org/my-workspace/my-repo.git
(push)
The output from the remote -v is exactly as I set it up with the $ git remote set-url command.
$ git config --list
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
credential.helper=manager-core
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true core.autocrlf=true core.fscache=true
core.symlinks=false pull.rebase=false
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master core.editor="C:\Users\my-first Wilson\AppData\Local\Programs\Microsoft VS Code\bin\code" --wait
user.name=bwilson user.email=myUserid#myCompany.com
credential.bitbucketauthmodes=basic
credential.microsoft.visualstudio.com.authority=BitBucket
difftool.sourcetree.cmd='' "$LOCAL" "$REMOTE"
mergetool.sourcetree.cmd='' mergetool.sourcetree.trustexitcode=true
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
submodule.active=.
remote.origin.url=https://myUserid:myAppPassword1234567#bitbucket.org/myWorkspace/myRepo.git
remote.origin.fetch=+refs/heads/:refs/remotes/origin/
C:\Users<username>.git-credentials
has one record in it:
https://myUserid:myAppPassword1234567#bitbucket.org
I have been coding for decades but haven't done a lot with git and bitbucket so I'm sure this is me, but I could use some help. I will answer any questions, run any tests and provide any results. Thanks!

DSpace 7.1 AIP restore StackOverflowError

I try to migrate from DSpace 6.4 to 7.1. New Dspace is installed on other machine (virtual machine on Centos 7 with 8Gb of RAM)
I have created full site AIP backup with user passwords. (total size of packages - 11Gb)
I've tried to do full restore but always got the same error.
So I'm just trying to import only "first level without childs"
JAVA_OPTS="-Xmx2048m -Xss4m -Dfile.encoding=UTF-8" /dspace/bin/dspace packager -r -k -t AIP -e dinkwi.test#gmail.com -o skipIfParentMissing=true -i 123456789/0 /home/dimich/11111/repo.zip
It doesn't matter if I use -k or -f param, output ia always the same
Ingesting package located at /home/dimich/11111/repo.zip
Exception: null
java.lang.StackOverflowError
at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:788)
at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:802)
.... (more then 1k lines)
at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:802)
my dspace.log ended with
2021-12-20 11:05:28,141 INFO unknown unknown org.dspace.eperson.GroupServiceImpl # dinkwi.test#gmail.com::update_group:group_id=9e6a2038-01d9-41ad-96b9-c6fb55b44381
2021-12-20 11:05:30,048 INFO unknown unknown org.dspace.eperson.GroupServiceImpl # dinkwi.test#gmail.com::update_group:group_id=23aaa7e9-ca2d-4af5-af64-600f7126e2be
2021-12-20 11:05:30,800 INFO unknown unknown org.springframework.cache.ehcache.EhCacheManagerFactoryBean # Shutting down EhCache CacheManager 'org.dspace.services'
So I just want to figure out the problem: small stack or some bug in user/group that fails with infinite loop/recursion, or maybe something else...
Main problem - i'm good in php/mysql and have no experience with java/postgre and the way how to debug this ...
Any help would be appreciated.
p.s after failed restore I always run command
/dspace/bin/dspace cleanup -v

minishift start using virtualbox on windows throws timeout error

I am trying to start minishift on my machine. It successfully creates minishift VM but throws time out error.
Configuration:
Minishift version: v1.34.0+f5db7cb
OS: Windows 10
Hypervisor: Virtual Box v6.0.10
PS C:\WINDOWS\system32> minishift start
-- Starting OpenShift cluster .......................................................................Error during 'cluster up' execution: Error starting the cluster. ssh command error:
command : /var/lib/minishift/bin/oc cluster up --image 'openshift/origin-${component}:v3.11.0' --public-hostname 192.168.99.100 --routing-suffix 192.168.99.100.nip.io --base-dir /var/lib/minishift/base
err : exit status 1
output : Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
Pulling image openshift/origin-cli:v3.11.0
E0725 17:15:42.919928 5316 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-cli:v3.11.0 anonymously
Image pull complete
E0725 17:15:44.643860 5316 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-node:v3.11.0 anonymously
Pulling image openshift/origin-node:v3.11.0
Pulled 5/6 layers, 85% complete
Pulled 6/6 layers, 100% complete
Extracting
Image pull complete
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 192.168.99.100 as the host IP
Checking if OpenShift is already running ...
Checking for supported Docker version (=>1.22) ...
Checking if insecured registry is configured properly in Docker ...
Checking if required ports are available ...
Checking if OpenShift client is configured properly ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
I0725 17:16:20.775520 5316 config.go:40] Running "create-master-config"
Starting OpenShift using openshift/origin-control-plane:v3.11.0 ...
I0725 17:16:31.108342 5316 config.go:46] Running "create-node-config"
I0725 17:16:35.237968 5316 flags.go:30] Running "create-kubelet-flags"
I0725 17:16:36.785234 5316 run_kubelet.go:49] Running "start-kubelet"
I0725 17:16:37.288388 5316 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
E0725 17:21:37.300062 5316 run_self_hosted.go:571] API server error: Get https://192.168.99.100:8443/healthz?timeout=32s: dial tcp 192.168.99.100:8443: connect: connection refused ()
Error: timed out waiting for the condition
Expected result: It should provide me without errors link to open web console
This happens to me sometimes too.
Solutions include:
minishift stop && minishift start (turn it off and on again)
restart Windows (perhaps VBox has corrupted itself again)
More info on my minishift setup is here:
http://divby0.blogspot.com/2019/07/configuring-minishift-for-use-with.html
For what it's worth I use a combination of linux shells in Windows 10 to interact with minishift / docker daemon:
Git Bash (usually the best)
Docker Toolbox (plan B when something won't run in Git Bash shell)
WSL (ubuntu based, plan C in desperation)

Solr throwing 'org.apache.commons.exec.ExecuteException' on Start

I am setting up Solr for Centos 7. When i try to execute any sample project for ex. using ./bin/solr start -e techproducts, its throwing error of 'Exception : org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)' . How to fix this. Java is installed under '/usr/bin/java'
I tried with changing Java home directory path
./bin/solr start -e techproducts
*** [WARN] *** Your Max Processes Limit is currently 31165.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
Solr home directory /tmp/solr-7.7.2/example/techproducts/solr already exists.
Starting up Solr on port 8983 using command:
"bin/solr" start -p 8983 -s "example/techproducts/solr"
*** [WARN] *** Your Max Processes Limit is currently 31165.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
WARNING: Starting Solr as the root user is a security risk and not considered best practice. Exiting.
Please consult the Reference Guide. To override this check, start with argument '-force'
ERROR: Failed to start Solr using command: "bin/solr" start -p 8983 -s "example/techproducts/solr" Exception : org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
Credit for the answer should go to #MatsLindh (see comment above). I'm adding it here for others who may experience the same problem.
The issue is that Solr doesn't want you to run it as a root user - or what it thinks is a root user (I've seen this issue with WSL as well and one isn't running as root).
Using root is a security risk but you can force Solr to start anyways by adding -force to the command, for example:
bin/solr start -e cloud -force

Testing chaincode Using dev mode network issue

I am running “dev mode” by leveraging pre-generated orderer and channel artifacts for a sample dev network
here cli require image: hyperledger/fabric-tools by default it is trying to pull latest tag image and showing errorlatest image. and it throwing error
Error response from daemon: manifest for hyperledger/fabric-tools:latest not found
so I pull image hyperledger/fabric-tools:x86_64-1.0.0, and rename it with hyperledger/fabric-tools:latest( not sure it is proper way or not ) by :
docker pull hyperledger/fabric-tools:x86_64-1.0.0
docker tag hyperledger/fabric-tools:x86_64-1.0.0 hyperledger/fabric-tools
My network is running successfully but unfortunately cli container is stopped running.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d10d170cd2fa hyperledger/fabric-tools:x86_64-1.0.0 "/bin/bash -c ./sc..." 29 seconds ago Exited (1) 27 seconds ago cli
163f494bb85f hyperledger/fabric-ccenv "/bin/bash -c 'sle..." 59 minutes ago Up About a minute chaincode
e96e86930d94 hyperledger/fabric-peer "peer node start -..." 59 minutes ago Up About a minute 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer
c568480e30d2 hyperledger/fabric-orderer "orderer" 59 minutes ago Up About a minute 0.0.0.0:7050->7050/tcp
You can use the tools container as the cli container.
docker exec -it d10d170cd2fa /bin/bash
Can you post logs of cli container by issuing command docker logs <containerId>? cli container exit doesn't necessarily mean there's any error about the e2e test.
If you started the services using docker-compose, you can run either of: docker-compose restart -f docker-compose-simple.yaml cli or docker-compose up -f docker-compose-simple.yaml cli.
However, if you started your network AFTER having tagged the fabric-tools image as above, you should examine the logs of your exited container with docker logs cli, to determine why it exited.
It can be because of previously running docker containers. In my case first time it worked correctly but it gave error in second time. Killing and removing created docker containers using
docker rm container_name
and starting containers again, solved the problem.