The prefect v1 server give me errors when starting - prefect

I am trying to start a prefect v1 server version 1.4.1. However, the graphql service does not work. In the docker logs, it is possible to see the following error:
tmp-graphql-1 |
tmp-graphql-1 | Running Alembic migrations...
tmp-graphql-1 |
tmp-graphql-1 | Could not upgrade the database!
tmp-graphql-1 | Error: Can't load plugin: sqlalchemy.dialects:postgres
Is anybody familiar with this error?

I would suggest upgrading to Prefect 2.

Related

How would you setup default dockerfile per project with an Azure pipeline to handle them?

As of now I have a simple solution structure(WebAPI projects, which are gonna be microservices) with default generated dockerfiles for each project in the solution, like:
Solution X
| Project A
| | Dockerfile
| Project B
| | Dockerfile
| Project C
| | Dockerfile
| Project D
| | Dockerfile
| azure-pipeline.yml
From the development and debuggind point of view everything works(through "Docker" as launcher), but after creating with the Azure wizard the first pipeline for the "Project A" my build always fails at a COPY instruction at the build step:
COPY ["Project A/ProjectA.csproj", "Project A/"]
With the error from the pipeline run as:
COPY failed: stat /var/lib/docker/tmp/docker-builder196561826/Project A/ProjectA.csproj: no such file or directory
##[error]COPY failed: stat /var/lib/docker/tmp/docker-builder196561826/Project A/ProjectA.csproj: no such file or directory
Am not an expert in docker neither in azure but I guess I'm setting up this solution in the wrong way to accomplish such thing.
What could be a better setup or fix?
no such file or directory
This is a very common error people encountered after they migrate the Docker project from Visual studio into Azure Devops, even they can build docker very successfully in local.
This caused by the different work logic between Visual Studio(local) and Azure Devops. For local, the docker runs at the Repos/solution level. BUT, for Azure devops CI, it running the docker in the directory where the dockerfile lives, which is at project level. At this time, the relevant path which work fine locally, will not suitable in Azure devops any more.
I guess you may not want to make changes to your dockerfile. So here you just need specify the build context in Docker task:
Specify $(Build.Repository.LocalPath) to the Docker 2.* argument Build context.
Check my previous answer.

How to trigger profiling in NodeJS at runtime?

We have a very stateful NodeJS based web server (Meteor) that occasionally, randomly becomes slow in production. The problem is not reproducible in any of our tests, and we don't know what's triggering it.
To diagnose this, we are using the v8-profiler package. This lets us trigger a 10-second CPU profile and download it for offline analysis.
Despite not having received any commits in 3 years, the package used to work fairly well. It has given us compilation trouble in the past, and now it looks like it stopped compiling entirely, breaking our build. The build happens inside a Docker container with all versions pinned, including NodeJS and v8-profiler itself, so it's unlikely that we can fix this on our end.
I'm thinking there must be some alternative, better maintained approach. But where is it?
(Note that restarting the server with additional flags (like --profile) is not an option, because it destroys all the evidence of the problem.)
I found there has been v8-profiler-next which is a successor of v8-profiler.
I hope this works for you.
I just built a tool for this. Called ntop, so it's like "top" but for Node apps https://github.com/DVLP/ntop
The below will enable communication with the CLI. This is designed to not add any overhead when the CLI tool is not used so it can be used in production. The profiler connects/disconnects immediately only when the CLI is doing the profiling.
The app:
import * as ntop from 'ntop'
ntop()
CLI shortcut to get a list of PIDs for convenience:
npx ntop
Outputs PIDs and additionally the command used to create the process for easier recognition.
Process detected at 12345 Details: node ./src/index.js --port 8216
npx ntop 12345
Outputs a list like "Bottom Up" in Chrome Dev Tools
(garbage collector) | 16.101ms |
shift | 10.038ms | node:internal/priority_queue:98:7
(anonymous) | 9.192ms | file:///home/app/src/controllers/Server.js:24:29
utils.bulkPreparePacket | 4.924ms | file:///home/app/src/Utils.js:91:26
preparePacket | 4.776ms | file:///home/app/src/Model.js:98:54
baseGetTag | 1.727ms | file:///home/app/node_modules/lodash/lodash.js:3104:23
(anonymous) | 1.702ms | evalmachine.:3:14
isPrototype | 1.441ms | file:///home/app/node_modules/lodash/lodash.js:6441:24
(program) | 1.411ms |
percolateDown | 1.124ms | node:internal/priority_queue:40:15

Error while deploying kubeless function to kubernetes cluster by using serverless framework

I am trying to deploy a kubeless function using serverless. I created a kubernetes cluster using minikube and I am trying to follow this link following which
I installed serverless
created a template kubeless-nodejs
installed plugins with npm install
and tried to deploy using serverless deploy -v
but I am getting an error
/home/vin/serverless/kube/services/email/node_modules/serverless-kubeless/lib/config.js:56
return JSON.parse(this.configMag.data[key]);
^
TypeError: Cannot read property 'runtime-images' of undefined
at Config.get (/home/vin/serverless/kube/services/email/node_modules/serverless-kubeless/lib/config.js:56:44)
Please point me in the right direction
I found the issue. I had to deploy kubeless to the Kubernetes cluster
I had to do this for that:
$ export RELEASE=$(curl -s https://api.github.com/repos/kubeless/kubeless/releases/latest | grep tag_name | cut -d '"' -f 4)
$ kubectl create ns kubeless
$ kubectl create -f https://github.com/kubeless/kubeless/releases/download/$RELEASE/kubeless-$RELEASE.yaml
as given here link

Query result on peer1.org2 is INVALID

All of a sudden latest version 1.1.0-alpha, started throwing errors in bring the Hyperledger Fabric Samples - first-network, while running ./byfc.sh -m up
2018-02-20 10:40:29.991 UTC [main] main -> INFO 008 Exiting.....
!!!!!!!!!!!!!!! Query result on peer1.org2 is INVALID !!!!!!!!!!!!!!!!
================== ERROR !!! FAILED to execute End-2-End Scenario ==================
ERROR !!!! Test failed
Need help.. How to debug?
Updates
I had everything running using Fabric 1.1.0-alpha, when I tried sometime after Jan 26. Recently I wanted to try adding a new org to the network. So thought of re-doing from scratch, but now it's failing. Not able to proceed, which I had done it earlier, couple of times. Not sure what is wrong since yesterday, with latest fabric samples...
Cloned the source from master branch.
Docker version 17.12.0-ce, build c97c6d6
Node version v8.9.4
NPM version 5.6.0
cryptogen version 1.1.0-alpha
configtxlator version 1.1.0-alpha
Removed old binaries (/bin folder) and docker containers and images, to start from scratch, but no luck:
./byfn.sh -m down
docker rm -f $(docker ps -aq)
docker rmi -f $(docker images -q)
docker network prune
I tried running ./byfn.sh, using -m, also without, Same result.
./byfn.sh generate
./byfn.sh up
And,
./byfn.sh -m generate
./byfn.sh -m up
Did you checkout the right fabric-samples repo tag that matches the binaries version? The documentation for this was just updated serveral hours ago, so if you were referring to an earlier version of the documentation you might want to refresh:
https://hyperledger-fabric.readthedocs.io/en/latest/samples.html#download-platform-specific-binaries
Make sure you Checkout to the right tag. eg: after you clone, then cd to that folder, finally you git git checkout v1.1.0-alpha
then when running the byfn.sh script, you might need to use the -m option, e.g. `./byfn.sh -m generate
With v1.1.0-rc1, I am able to execute the first-network successfully.
===================== Query on peer1.org2 on channel 'mychannel' is successful =====================
========= All GOOD, BYFN execution completed ===========
_____ _ _ ____
| ____| | \ | | | _ \
| _| | \| | | | | |
| |___ | |\ | | |_| |
|_____| |_| \_| |____/
I suspect, the error which I faced previously with v1.1.0-alpha, was just due to missing instruction in the tutorial, i.e., git checkout {TAG}. Now this has been updated correctly in the tutorial.
I was facing similar error with Release 1.4.1
100
!!!!!!!!!!!!!!! Query result on peer1.org2 is INVALID !!!!!!!!!!!!!!!!
================== ERROR !!! FAILED to execute End-2-End Scenario ==================
ERROR !!!! Test failed
I resolved it by following steps:
Removed fabric-samples directory
Run command in hyperledger directory
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- 1.4.1 1.4.1 0.4.15
./byfn.sh up -l node
It is working fine.
90
===================== Query successful on peer1.org2 on channel 'mychannel' =====================
========= All GOOD, BYFN execution completed ===========

libpthread version mismatch on HP_UX

I have multithreaded application, it is working fine at my development server (HP-UX). When it is deployed to client server it gives the following error:
. Process 16448. Starting (CONT) Thread: 0 /usr/lib/pa20_64/dld.sl:
Unsatisfied code ymbol 'pthread_create' in load module 'bin/CCQO'.
Killed
I fond that libpthread.1 at customer server does not have pthread_create method with nm command. This from client server:
/usr/lib/pa20_64 > nm -g libpthread.1 | grep 'pthread_cre'
[475] | 4611686018427436512| 1116|FUNC |GLOB |0|.text|__pthread_create_system
But when I run the same command on my development server I get following output:
[733] | 4611686018427467256| 2160|FUNC |GLOB |0| .text|__pthread_create_generic
[712] | 4611686018427467192| 64|FUNC |GLOB |0| .text|__pthread_create_system
[625] | 4611686018427467112| 64|FUNC |WEAK |0| .text|pthread_create
I tried to copy libraries from my server to client server but it does not work.
Please me know how can I now the version of threading library at my machine and at client machine ?
How can I update client machine with updated library ?
Can copying my libraries to other server, solve the issue ? If yes, then what are steps.
I fond that libpthread.1 at customer server does not have pthread_create method with nm command.
Your customer's libpthread.1 is corrupt. Perhaps the customer ran strip, or molested it in some other way.
Can copying my libraries to other server, solve the issue ?
This can render the machine un-bootable, and you should almost certainly not do that.
The right solution is for the customer's sysadmin to restore system libraries from his HP-UX media.

Resources