linode | Ruby wrapper for the Linode automation API | REST library

 by   rick Ruby Version: Current License: MIT

kandi X-RAY | linode Summary

linode is a Ruby library typically used in Web Services, REST applications. linode has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.
Ruby wrapper for the Linode automation API
    Support
      Quality
        Security
          License
            Reuse
            Support
              Quality
                Security
                  License
                    Reuse

                      kandi-support Support

                        summary
                        linode has a low active ecosystem.
                        summary
                        It has 156 star(s) with 30 fork(s). There are 13 watchers for this library.
                        summary
                        It had no major release in the last 6 months.
                        summary
                        There are 2 open issues and 14 have been closed. On average issues are closed in 171 days. There are 1 open pull requests and 0 closed requests.
                        summary
                        It has a neutral sentiment in the developer community.
                        summary
                        The latest version of linode is current.
                        linode Support
                          Best in #REST
                            Average in #REST
                            linode Support
                              Best in #REST
                                Average in #REST

                                  kandi-Quality Quality

                                    summary
                                    linode has 0 bugs and 0 code smells.
                                    linode Quality
                                      Best in #REST
                                        Average in #REST
                                        linode Quality
                                          Best in #REST
                                            Average in #REST

                                              kandi-Security Security

                                                summary
                                                linode has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
                                                summary
                                                linode code analysis shows 0 unresolved vulnerabilities.
                                                summary
                                                There are 0 security hotspots that need review.
                                                linode Security
                                                  Best in #REST
                                                    Average in #REST
                                                    linode Security
                                                      Best in #REST
                                                        Average in #REST

                                                          kandi-License License

                                                            summary
                                                            linode is licensed under the MIT License. This license is Permissive.
                                                            summary
                                                            Permissive licenses have the least restrictions, and you can use them in most projects.
                                                            linode License
                                                              Best in #REST
                                                                Average in #REST
                                                                linode License
                                                                  Best in #REST
                                                                    Average in #REST

                                                                      kandi-Reuse Reuse

                                                                        summary
                                                                        linode releases are not available. You will need to build from source code and install.
                                                                        summary
                                                                        Installation instructions are not available. Examples and code snippets are available.
                                                                        summary
                                                                        linode saves you 697 person hours of effort in developing the same functionality from scratch.
                                                                        summary
                                                                        It has 1612 lines of code, 20 functions and 37 files.
                                                                        summary
                                                                        It has low code complexity. Code complexity directly impacts maintainability of the code.
                                                                        linode Reuse
                                                                          Best in #REST
                                                                            Average in #REST
                                                                            linode Reuse
                                                                              Best in #REST
                                                                                Average in #REST
                                                                                  Top functions reviewed by kandi - BETA
                                                                                  kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
                                                                                  Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here
                                                                                  Get all kandi verified functions for this library.
                                                                                  Get all kandi verified functions for this library.

                                                                                  linode Key Features

                                                                                  Ruby wrapper for the Linode automation API

                                                                                  linode Examples and Code Snippets

                                                                                  To generate a sample client library
                                                                                  mavendot imgLines of Code : 57dot imgno licencesLicense : No License
                                                                                  copy iconCopy
                                                                                  
                                                                                                                      ./bin/generate-samples.sh ./bin/configs/java-okhttp-gson.yaml
                                                                                  
                                                                                  java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \ -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \ -g java \ -t modules/openapi-generator/src/main/resources/Java \ --additional-properties artifactId=petstore-okhttp-gson,hideGenerationTimestamp:true \ -o samples/client/petstore/java/okhttp-gson
                                                                                  
                                                                                  NAME openapi-generator-cli generate - Generate code with the specified generator. SYNOPSIS openapi-generator-cli generate [(-a  | --auth )] [--api-name-suffix ] [--api-package ] [--artifact-id ] [--artifact-version ] [(-c  | --config )] [--dry-run] [(-e  | --engine )] [--enable-post-process-file] [(-g  | --generator-name )] [--generate-alias-as-model] [--git-host ] [--git-repo-id ] [--git-user-id ] [--global-property ...] [--group-id ] [--http-user-agent ] [(-i  | --input-spec )] [--ignore-file-override ] [--import-mappings ...] [--instantiation-types ...] [--invoker-package ] [--language-specific-primitives ...] [--legacy-discriminator-behavior] [--library ] [--log-to-stderr] [--minimal-update] [--model-name-prefix ] [--model-name-suffix ] [--model-package ] [(-o  | --output )] [(-p  | --additional-properties )...] [--package-name ] [--release-note ] [--remove-operation-id-prefix] [--reserved-words-mappings ...] [(-s | --skip-overwrite)] [--server-variables ...] [--skip-validate-spec] [--strict-spec ] [(-t  | --template-dir )] [--type-mappings ...] [(-v | --verbose)] OPTIONS -a , --auth  adds authorization headers when fetching the OpenAPI definitions remotely. Pass in a URL-encoded string of name:header with a comma separating multiple values ...... (results omitted) -v, --verbose verbose mode
                                                                                  
                                                                                  cd samples/client/petstore/java/okhttp-gson mvn package
                                                                                  
                                                                                  Community Discussions

                                                                                  Trending Discussions on linode

                                                                                  Java failure in looking up the MX record for specific domain
                                                                                  chevron right
                                                                                  Auth0, flask: Users need to login twice due to CSRF error
                                                                                  chevron right
                                                                                  Printing alias from ~/.ssh/config— with or without trailing hyphen
                                                                                  chevron right
                                                                                  How do I configure external-dns to create A Record, not CNAME
                                                                                  chevron right
                                                                                  How to connect to postgres in Linode from local system
                                                                                  chevron right
                                                                                  Mistakes in my ingress yaml file or process?
                                                                                  chevron right
                                                                                  How to prevent iOS from suggesting to subscribe to an ICS file online?
                                                                                  chevron right
                                                                                  SCP not recognizing destination file path
                                                                                  chevron right
                                                                                  Nginx subdomain only accessable locally
                                                                                  chevron right
                                                                                  Building dlib fails in docker container
                                                                                  chevron right

                                                                                  QUESTION

                                                                                  Java failure in looking up the MX record for specific domain
                                                                                  Asked 2022-Mar-22 at 23:08

                                                                                  Here's a piece of code demonstrating a case where the Java standard extensions for working with DNS fail to correctly look up the MX record for a specific domain, while the dig utility has no problem doing so. I have replicated this across different machines, networks, and operating systems (AWS Ubuntu, Linode CentOS, local Windows).

                                                                                  import javax.naming.directory.InitialDirContext;
                                                                                  import javax.naming.directory.Attributes;
                                                                                  import javax.naming.NamingException;
                                                                                  
                                                                                  public class Main
                                                                                  {
                                                                                      public static void main(String[] args) throws NamingException {
                                                                                          String domain = "designercakesbyapril.com";
                                                                                          InitialDirContext ctx = new InitialDirContext();
                                                                                          Attributes attributes = ctx.getAttributes("dns:/" + domain, new String[]{"MX"});
                                                                                          System.out.println(attributes);
                                                                                          
                                                                                          // outputs "No attributes"
                                                                                      }
                                                                                  }
                                                                                  

                                                                                  Meanwhile, here's dig:

                                                                                  dig +short MX designercakesbyapril.com
                                                                                  traff-1.hugedomains.com.
                                                                                  hdr-nlb9-41371129e8304c29.elb.us-east-1.amazonaws.com.
                                                                                  

                                                                                  What could be the problem? I'm interested in reliably looking up MX records from Java.

                                                                                  Environment:

                                                                                  openjdk 11.0.14.1 2022-02-08 LTS
                                                                                  OpenJDK Runtime Environment 18.9 (build 11.0.14.1+1-LTS)
                                                                                  OpenJDK 64-Bit Server VM 18.9 (build 11.0.14.1+1-LTS, mixed mode, sharing)
                                                                                  

                                                                                  ANSWER

                                                                                  Answered 2022-Mar-22 at 23:08

                                                                                  designercakesbyapril.com is not configured correctly.

                                                                                  Requests reply with a CNAME record which is invalid there because at apex. Hence you will get erratic behavior, and the problem is not in your program but in this domain DNS configuration that needs to be fixed.

                                                                                  $ dig MX designercakesbyapril.com +noall +ans
                                                                                  designercakesbyapril.com. 3h IN CNAME traff-1.hugedomains.com.
                                                                                  traff-1.hugedomains.com. 28s IN CNAME hdr-nlb9-41371129e8304c29.elb.us-east-1.amazonaws.com.
                                                                                  

                                                                                  (and note how it fails as the last name does not have an MX record either)

                                                                                  You can see at https://dnsviz.net/d/designercakesbyapril.com/YjpWYQ/dnssec/ (an online DNS troubleshooting tool) how broken this domain name is (15 errors, 6 warnings).

                                                                                  Source https://stackoverflow.com/questions/71579564

                                                                                  QUESTION

                                                                                  Auth0, flask: Users need to login twice due to CSRF error
                                                                                  Asked 2022-Feb-13 at 10:01

                                                                                  When a user logs into my flask app it does not work first time, but it typically works on the second attempt. The following error occurs on the first login attempt:

                                                                                  MismatchingStateError: mismatching_state: CSRF Warning! State not equal in request and response
                                                                                  

                                                                                  I did not have this problem when running on localhost on a windows PC. I obtained this problem when moving my code to a linode running ubuntu 20.04. I am considering flask in python3 as well as the following packages.

                                                                                  from flask import Flask
                                                                                  from flask import jsonify
                                                                                  from flask import redirect
                                                                                  from flask import render_template
                                                                                  from flask import session
                                                                                  from flask import url_for
                                                                                  from flask import request
                                                                                  from flask import send_from_directory
                                                                                  from authlib.integrations.flask_client import OAuth
                                                                                  

                                                                                  My keys are fixed in a .env file. They are not randomly generated.

                                                                                  oauth = OAuth(app)
                                                                                  
                                                                                  auth0 = oauth.register(
                                                                                      'auth0',
                                                                                      client_id=AUTH0_CLIENT_ID,
                                                                                      client_secret=AUTH0_CLIENT_SECRET,
                                                                                      api_base_url=AUTH0_BASE_URL,
                                                                                      access_token_url=AUTH0_BASE_URL + '/oauth/token',
                                                                                      authorize_url=AUTH0_BASE_URL + '/authorize',
                                                                                      client_kwargs={
                                                                                          'scope': 'openid profile email',
                                                                                      },
                                                                                  )
                                                                                  

                                                                                  The following code in the callback handling gives the CSRF error.

                                                                                  @app.route('/callback')
                                                                                  def callback_handling():
                                                                                      auth0.authorize_access_token()
                                                                                      resp = auth0.get('userinfo')
                                                                                  

                                                                                  ANSWER

                                                                                  Answered 2022-Feb-13 at 10:01

                                                                                  I may have solved this question by updating my ntp on linux with the help of the following link: https://askubuntu.com/questions/254826/how-to-force-a-clock-update-using-ntp

                                                                                  apt-get install -y  ntp
                                                                                  sudo service ntp stop
                                                                                  sudo ntpd -gq
                                                                                  sudo service ntp start
                                                                                  

                                                                                  I also added a try except in my python server

                                                                                  try:
                                                                                          
                                                                                      auth0.authorize_access_token()
                                                                                                  resp = auth0.get('userinfo')
                                                                                      userinfo = resp.json()
                                                                                      session[constants.JWT_PAYLOAD] = userinfo
                                                                                      session[constants.PROFILE_KEY] = {
                                                                                          'user_id': userinfo['sub'],
                                                                                          'name': userinfo['name'],
                                                                                          'picture': userinfo['picture'],
                                                                                          'email_verified':userinfo['email_verified']
                                                                                      }
                                                                                  except:
                                                                                      return redirect("/mainpage") 
                                                                                  
                                                                                  #Some code
                                                                                  
                                                                                  return redirect('mainpage')
                                                                                  

                                                                                  Ensure that the 'mainpage' requires authorisation.

                                                                                  Source https://stackoverflow.com/questions/71069012

                                                                                  QUESTION

                                                                                  Printing alias from ~/.ssh/config— with or without trailing hyphen
                                                                                  Asked 2022-Jan-10 at 14:27

                                                                                  I have following file, it's a config file for ssh.

                                                                                  Host vps2 # Linode
                                                                                      HostName xxx.xx.xx.xxx
                                                                                      User foo_user
                                                                                  
                                                                                  Host vps3 # Vultr
                                                                                      HostName xxx.xx.xx.xxx
                                                                                      User foo_user   
                                                                                  
                                                                                  Host vps4
                                                                                      HostName xxx.xx.xx.xxx
                                                                                      User foo_user
                                                                                  
                                                                                  Host vps5
                                                                                      HostName xxx.xx.xx.xxx
                                                                                      User foo_user 
                                                                                  
                                                                                  Host vps6
                                                                                      HostName xxx.xx.xx.xxx
                                                                                      User foo_user 
                                                                                  
                                                                                  Host vps7 # DigitalOcean
                                                                                      HostName xxx.xx.xx.xxx
                                                                                      User foo_user
                                                                                  
                                                                                  Host vps8 # GCP
                                                                                      HostName xxx.xx.xx.xxx
                                                                                      User foo_user   
                                                                                  
                                                                                  Host pi
                                                                                     HostName xxx.xx.xx.xxx
                                                                                     User pi
                                                                                  
                                                                                  # OLD SHALL NOT BE USED
                                                                                  
                                                                                  Host vps13
                                                                                      HostName xxx.xx.xx.xxx
                                                                                      User foo_user
                                                                                  
                                                                                  Host vps14-old
                                                                                     HostName xxx.xx.xx.xxx
                                                                                     User foo_user 
                                                                                  
                                                                                  Host vps4-old
                                                                                      HostName xxx.xx.xx.xxx
                                                                                      User foo_user 
                                                                                  
                                                                                  Host vps15-old
                                                                                     HostName xxx.xx.xx.xxx
                                                                                     User foo_user 
                                                                                  
                                                                                  Host vps11-old
                                                                                      HostName xxx.xx.xx.xxx
                                                                                      User foo_user
                                                                                  

                                                                                  I need to print alias that start with vps*, below (copied) snippets will exactly do that.

                                                                                  $ awk '{for(i=1;i<=NF;i++){if($i~/^vps/){print $i}}}' $HOME/.ssh/config
                                                                                  vps2
                                                                                  vps3
                                                                                  vps4
                                                                                  vps5
                                                                                  vps6
                                                                                  vps7
                                                                                  vps8
                                                                                  vps3-old
                                                                                  vps4-old
                                                                                  vps5-old
                                                                                  vps11-old
                                                                                  

                                                                                  Now I want to print all alias that has no -old suffix, adding | grep -v old works.

                                                                                  $ awk '{for(i=1;i<=NF;i++){if($i~/^vps/){print $i}}}' $HOME/.ssh/config | grep -v "old"
                                                                                  vps2
                                                                                  vps3
                                                                                  vps4
                                                                                  vps5
                                                                                  vps6
                                                                                  vps7
                                                                                  vps8
                                                                                  

                                                                                  Is there any cleaner way ? Preferably involving only 1 tools, I tried playing with awk command to no avail.

                                                                                  ANSWER

                                                                                  Answered 2022-Jan-10 at 05:36

                                                                                  You can use sed, which has a grep-like mode if you use -n (no print) that supports a more extended regex than grep. The trick for filtering out lines ending in -old is found here: Sed regex and substring negation:

                                                                                  sed -n "/-old/b; s/^Host\s\+\(vps\S*\)\s*\(#.*\)\?/\1/p" $HOME/.ssh/config
                                                                                  

                                                                                  The inverse (including -old) is a bit simpler, since it only requires positive matches:

                                                                                  sed -n "s/^Host\s\+\(vps\S*-old\)\s*\(#.*\)\?/\1/p" $HOME/.ssh/config
                                                                                  

                                                                                  Source https://stackoverflow.com/questions/70647784

                                                                                  QUESTION

                                                                                  How do I configure external-dns to create A Record, not CNAME
                                                                                  Asked 2022-Jan-03 at 16:48

                                                                                  I am following Linode's tutorials on using helm to deploy to Linode Kubernetes Engine (LKE) and I have reached the section on configuring external DNS which uses bitnami's external-dns package to configure a domain on Linode's DNS servers.

                                                                                  When I try to annotate my service, using exactly the same command as in the video, it results in a CNAME alias and no A/TXT Records.

                                                                                  The logs from the external-dns show

                                                                                  time="2022-01-01T14:45:10Z" level=info msg="Creating record." action=Create record=juicy type=CNAME zoneID=1770931 zoneName=mydomain.com

                                                                                  time="2022-01-01T14:45:11Z" level=info msg="Creating record." action=Create > record=juicy type=TXT zoneID=1770931 zoneName=mydomain.com

                                                                                  time="2022-01-01T14:45:11Z" level=error msg="Failed to Create record: [400] [name] Record conflict - CNAMES must be unique" action=Create record=juicy type=TXT zoneID=1770931 zoneName=mydomain.com

                                                                                  These logs imply that external-dns is first creating a CNAME record (which isn't required/wanted at all) and then attempting to create a TXT record which uses the same hostname as the newly-created CNAME, which obviously isn't allowed. And it is clearly not attempting to create the A Record at all.

                                                                                  I would really appreciate any info about why this might be happening and what I can do to correct it. For clarity, the desired result is one A Record and one TXT Record, both with the hostname 'juicy'

                                                                                  ANSWER

                                                                                  Answered 2022-Jan-01 at 17:58

                                                                                  You can create the A record in route-53 i am not sure you are on which cloud or so.

                                                                                  in document search for aws.preferCNAME you can see in deployment that's where changes need to be configured.

                                                                                  External DNS will create the A record also please check your deployment configuration.

                                                                                  ---
                                                                                  apiVersion: extensions/v1beta1
                                                                                  kind: Deployment
                                                                                  metadata:
                                                                                    name: external-dns
                                                                                  spec:
                                                                                    strategy:
                                                                                      type: Recreate
                                                                                    template:
                                                                                      metadata:
                                                                                        labels:
                                                                                          app: external-dns
                                                                                      spec:
                                                                                        containers:
                                                                                        - name: external-dns
                                                                                          image: registry.opensource.zalan.do/teapot/external-dns:v0.3.0-beta.0
                                                                                          imagePullPolicy: Always
                                                                                          args:
                                                                                          - --domain-filter=$(DOMAIN_FILTER)
                                                                                          - --source=service
                                                                                          - --source=ingress
                                                                                          - --provider=aws
                                                                                          env:
                                                                                          - name: DOMAIN_FILTER
                                                                                            valueFrom:
                                                                                              configMapKeyRef:
                                                                                                name: external-dns
                                                                                                key: domain-filter
                                                                                  

                                                                                  there could be chances, --aws-prefer-cname line with CNAME config which is making external DNS force to create CNAME instead of A record.

                                                                                  Remove CNAME config and check by default it will create the A record.

                                                                                  Source https://stackoverflow.com/questions/70550433

                                                                                  QUESTION

                                                                                  How to connect to postgres in Linode from local system
                                                                                  Asked 2021-Dec-21 at 15:54

                                                                                  I have a python script to add data to a postgres database. During testing, I had created a database in the localsystem and it worked perfectly. Now I have the database running in linode. I am not sure how to connect to the database from the localsytem. I have the database details stored in a python file as follows

                                                                                  DATABASE = 'my_database'
                                                                                  HOST =  # the ip_address of the linode instance
                                                                                  PORT = '5432'
                                                                                  USER = 'database_user'
                                                                                  PASSWORD = 'database_password'
                                                                                  

                                                                                  I use the above code in access the database. in case of the database running in the localhost, the host was equal to HOST = 'localhost'.

                                                                                  When I run the python script from the localsystem to connect to the database this is the message I get

                                                                                  psycopg2.OperationalError: connection to server at "", port 5432 failed: Connection refused
                                                                                      Is the server running on that host and accepting TCP/IP connections?
                                                                                  

                                                                                  I am not sure how to connect to the database running in linode.

                                                                                  ANSWER

                                                                                  Answered 2021-Dec-21 at 15:54

                                                                                  I solved this by editing the pg_hba.conf.

                                                                                  1. In the linode instance, navigate to /var/lib/pgsql/data.

                                                                                  2. In the directory, open the pg_hba.conf and add the following line under the IPv4 local connections

                                                                                  host    all             all             /32   md5
                                                                                  
                                                                                  1. Save the file and restart postgres.
                                                                                  2. Start SSH tunneling to the linode instance
                                                                                  3. Change the host and port in the database details to 127.0.0.1 and the port selected during tunneling. In my case it was 5433
                                                                                  4. Running the python script now should enable the local system to connect with the postgres server running in the linode instance.

                                                                                  Source https://stackoverflow.com/questions/70434611

                                                                                  QUESTION

                                                                                  Mistakes in my ingress yaml file or process?
                                                                                  Asked 2021-Dec-21 at 08:37

                                                                                  I'm trying kubernetes and making some progress, but I'm running into an issue with ingress when trying to make my hello world app publicly available.

                                                                                  SUCCESS WITH DEPLOYMENT AND SERVICE

                                                                                  I created a simple hello world type of nodejs app and pushed the image to my docker hub johnlai2004/swarm2. I successfully created a deployment and service with this yaml file:

                                                                                  nodejs.yaml

                                                                                  apiVersion: apps/v1
                                                                                  kind: Deployment
                                                                                  metadata:
                                                                                    name: nodejs-hello
                                                                                    labels:
                                                                                      app: nodejs-hello
                                                                                  spec:
                                                                                    replicas: 1
                                                                                    selector:
                                                                                      matchLabels:
                                                                                        app: nodejs-hello
                                                                                    template:
                                                                                      metadata:
                                                                                        labels:
                                                                                          app: nodejs-hello
                                                                                      spec:
                                                                                        containers:
                                                                                        - name: nodejs-hello
                                                                                          image: johnlai2004/swarm2
                                                                                          ports:
                                                                                          - containerPort: 3000
                                                                                  ---
                                                                                  apiVersion: v1
                                                                                  kind: Service
                                                                                  metadata:
                                                                                    name: nodejs-hello-service
                                                                                  spec:
                                                                                    selector:
                                                                                      app: nodejs-hello
                                                                                    type: LoadBalancer
                                                                                    ports:
                                                                                      - protocol: TCP
                                                                                        port: 3000
                                                                                        targetPort: 3000
                                                                                        nodePort: 30000
                                                                                  

                                                                                  I uploaded these files to a VPS with a new installation of ubuntu 20.04, minikube, kubectl and docker.

                                                                                  I ran the following commands and got the results I wanted:

                                                                                  minikube start --driver=docker
                                                                                  kubectl apply -f nodejs.yaml
                                                                                  minikube service nodejs-hello-service
                                                                                  |-----------|----------------------|-------------|---------------------------|
                                                                                  | NAMESPACE |         NAME         | TARGET PORT |            URL            |
                                                                                  |-----------|----------------------|-------------|---------------------------|
                                                                                  | default   | nodejs-hello-service |        3000 | http://192.168.49.2:30000 |
                                                                                  |-----------|----------------------|-------------|---------------------------|
                                                                                  
                                                                                  

                                                                                  When I do a wget http://192.168.49.2:30000, I get an index.html file that says hello from nodejs-hello-556dc868-6lrdz at 12/19/2021, 10:29:56 PM. This is perfect.

                                                                                  FAILURE WITH INGRESS

                                                                                  Next, I want to use ingress so that I can see the page at http://website.example.com (replace website.example.com with the actual domain that points to my server). I put this file on my server:

                                                                                  nodejs-ingress.yaml

                                                                                  apiVersion: networking.k8s.io/v1
                                                                                  kind: Ingress
                                                                                  metadata:
                                                                                    name: nodejs-ingress
                                                                                    namespace: default
                                                                                    annotations:
                                                                                      kubernetes.io/ingress.class: "nginx"
                                                                                  spec:
                                                                                    rules:
                                                                                      - host: website.example.com
                                                                                        http:
                                                                                          paths:
                                                                                          - path: /
                                                                                            pathType: Prefix
                                                                                            backend:
                                                                                              service:
                                                                                                name: nodejs-hello-service
                                                                                                port:
                                                                                                  number: 3000
                                                                                  

                                                                                  And I ran the commands

                                                                                  minikube addons enable ingress
                                                                                  kubectl apply -f nodejs-ingress.yaml
                                                                                  kubectl get ingress
                                                                                  NAME             CLASS    HOSTS                   ADDRESS     PORTS   AGE
                                                                                  nodejs-ingress      website.example.com     localhost   80      15m
                                                                                  
                                                                                  

                                                                                  But when I visit http://website.example.com with my browser, the browser says it can't connect. Using wget http://website.example.com gave the same connection issue.

                                                                                  Can someone point out what I may have done wrong?

                                                                                  UPDATE

                                                                                  I ran these commands because I think it shows I didn't install ingress-controller in the right name space?

                                                                                  kubectl get pod -n ingress-nginx
                                                                                  NAME                                        READY   STATUS      RESTARTS   AGE
                                                                                  ingress-nginx-admission-create--1-tqsrp     0/1     Completed   0          4h25m
                                                                                  ingress-nginx-admission-patch--1-sth26      0/1     Completed   0          4h25m
                                                                                  ingress-nginx-controller-5f66978484-tmx72   1/1     Running     0          4h25m
                                                                                  
                                                                                  kubectl get pod -n default
                                                                                  NAME                          READY   STATUS    RESTARTS   AGE
                                                                                  nodejs-hello-556dc868-6lrdz   1/1     Running   0          40m
                                                                                  

                                                                                  So does this mean my nodejs app is in a name space that doesn't have access to the ingress controller?

                                                                                  UPDATE 2

                                                                                  I also tried following this guide step by step. One difference I noticed was when I ran the command kubectl get ingress, ADDRESS says localhost. But in the guide, it says it is supposed to be 172.17.0.15

                                                                                  Does this difference matter? I'm hosting things in a cloud vps called linode.com. Does that change the way I do things?

                                                                                  ANSWER

                                                                                  Answered 2021-Dec-20 at 00:59

                                                                                  Can you try kubectl get ingress nodejs-ingress to see if the ingress resource is created successfully.

                                                                                  Then curl with curl -H 'HOST: ' http://

                                                                                  :

                                                                                  Source https://stackoverflow.com/questions/70415874

                                                                                  QUESTION

                                                                                  How to prevent iOS from suggesting to subscribe to an ICS file online?
                                                                                  Asked 2021-Nov-17 at 09:38

                                                                                  I am running a newsletter about some events for which I want to include a "Add to calendar" link.

                                                                                  To do so, I am hosting some ICS files on Linode's Object Storage (which is S3-compatible). Here is an exemple of a URL for a calendar event: https://app-statium.eu-central-1.linodeobjects.com/25782331-363c-4ba6-b255-b10f87a30895.ics.

                                                                                  My problem is that when this link is being tapped on from an iOS or iPadOS device, Calendar will offer to subscribe to the URL rather than just adding the event from the file in the calendar. Here is a screenshot:

                                                                                  On the other hand, on macOS, the behavior is as expected: Calendar opens and shows the event. No subscription to the URL is suggested.

                                                                                  Is there any ways I could get iOS to behave the same as macOS with these links? I investigated if some query params or HTTP header could say "no subscription please" but didn't find anything.

                                                                                  ANSWER

                                                                                  Answered 2021-Nov-17 at 09:38

                                                                                  I found a solution.

                                                                                  TL;DR

                                                                                  The e-mail should not link to the ICS resource directly. Instead, it should respond with a temporary redirection HTTP status code (ie 302, 303 or 307) with the location of the final ICS resource.

                                                                                  How I got there

                                                                                  To find this solution, I reverse engineered a link that behaved the way I wanted (ie add the event, no subscription). I found the following differences between the working behaviour and the behaviour I had:

                                                                                  1. The link from the e-mail responded with a 302;
                                                                                  2. An HTTP get response to the 302 location would include extra HTTP headers;
                                                                                  3. The final ICS resource would include extra metadata.

                                                                                  After attempting to mimic these 3 different behaviours, only the 302 hack ended up working the way I wanted. 🤷

                                                                                  I ended up responding with a better-suited 303 which behaves as intended.

                                                                                  Source https://stackoverflow.com/questions/69631672

                                                                                  QUESTION

                                                                                  SCP not recognizing destination file path
                                                                                  Asked 2021-Nov-12 at 23:46

                                                                                  I want to copy my environment files in the dir .env/ from my local machine to my remote machine.

                                                                                  According to this answer, I tried the following but got an error:

                                                                                  stephen@desktop:~/Projects/finance$ scp -r .env root@:/finance
                                                                                  scp: /finance/.env: Not a directory
                                                                                  

                                                                                  I verified the directory exists on my local machine:

                                                                                  stephen@desktop:~/Projects/finance$ ls -al | grep .env
                                                                                  drwxrwxr-x  2 stephen stephen      4096 Nov 12 14:25 .env
                                                                                  

                                                                                  And I verified it does not exist on my remote machine:

                                                                                  root@localhost:~/finance# ls -al |grep .env
                                                                                  root@localhost:~/finance#
                                                                                  

                                                                                  According to the online resources, the source path should remove the trailing / from the file path if I want to copy the entire folder. I've hit insanity where I've tried every combination of source and destination paths.

                                                                                  EDIT: Here is the linode docs which is the VPS I am using. Seems like conflicting information.

                                                                                  EDIT2: Here is what worked

                                                                                  stephen@desktop:~/Projects/finance$ scp -r .env root@173.255.210.31:finance
                                                                                  .dev.local    100%  712    20.0KB/s   00:00    
                                                                                  .prod         100%  595    21.2KB/s   00:00     
                                                                                  .prod.local   100%  710    24.7KB/s   00:00     
                                                                                  .dev          100%  597    20.2KB/s   00:00 
                                                                                  

                                                                                  ANSWER

                                                                                  Answered 2021-Nov-12 at 23:28

                                                                                  You need to remove the slash. What you wrote refers to the root folder on the other machine. From your verification steps it's clear though that you meant the home folder of root (/root):

                                                                                  scp -r .env root@:finance
                                                                                  # or, explicitly
                                                                                  scp -r .env root@:/root/finance
                                                                                  

                                                                                  Source https://stackoverflow.com/questions/69950055

                                                                                  QUESTION

                                                                                  Nginx subdomain only accessable locally
                                                                                  Asked 2021-Nov-12 at 20:03

                                                                                  I'm trying to setup an nginx subdomain on my nginx configuration. But I'm not able to access/browse to my new subdomain remotely. No errors/access logs are registered when trying to access this subdomain remotely. The server is hosted on Linode.

                                                                                  Current setup: default nginx config -> not edited

                                                                                  main site config:

                                                                                  server {
                                                                                          listen  443 ssl;
                                                                                          server_name     example.be www.example.be;
                                                                                          root    /var/www/example;
                                                                                          index   index.html
                                                                                          gzip off;
                                                                                  
                                                                                          location ~ \.php$ {
                                                                                                 include snippets/fastcgi-php.conf;
                                                                                          #
                                                                                          #       # With php-fpm (or other unix sockets):
                                                                                                 fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
                                                                                          #       # With php-cgi (or other tcp sockets):
                                                                                          #       fastcgi_pass 127.0.0.1:9000;
                                                                                          }
                                                                                  
                                                                                  
                                                                                  
                                                                                      ssl_certificate /etc/letsencrypt/live/example.be/fullchain.pem; # managed by Certbot
                                                                                      ssl_certificate_key /etc/letsencrypt/live/example.be/privkey.pem; # managed by Certbot
                                                                                  
                                                                                  }
                                                                                  server {
                                                                                      if ($host = www.example.be) {
                                                                                          return 301 https://$host$request_uri;
                                                                                      } # managed by Certbot
                                                                                  
                                                                                      if ($host = example.be) {
                                                                                          return 301 https://$host$request_uri;
                                                                                      } # managed by Certbot
                                                                                  
                                                                                  
                                                                                  
                                                                                          listen  80;
                                                                                          server_name     www.example.be;
                                                                                      return 404; # managed by Certbot
                                                                                  
                                                                                        location ~ \.php$ {
                                                                                                 include snippets/fastcgi-php.conf;
                                                                                          #
                                                                                          #       # With php-fpm (or other unix sockets):
                                                                                                 fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
                                                                                          #       # With php-cgi (or other tcp sockets):
                                                                                          #       fastcgi_pass 127.0.0.1:9000;
                                                                                          }
                                                                                  
                                                                                  
                                                                                  }
                                                                                  

                                                                                  subdomain config:

                                                                                  server {
                                                                                          listen 80;
                                                                                          listen [::]:80;
                                                                                  
                                                                                          root /var/www/sub.example.be;
                                                                                  
                                                                                          index index.html index.htm index.nginx-debian.html index.php;
                                                                                  
                                                                                          server_name sub.example.be;
                                                                                  
                                                                                          location / {
                                                                                                  try_files $uri $uri/ =404;
                                                                                                  auth_basic "Restricted Area";
                                                                                                  auth_basic_user_file /var/www/sub.example.be/.htpasswd;
                                                                                          }
                                                                                  
                                                                                          location ~ \.php$ {
                                                                                                  include snippets/fastcgi-php.conf;
                                                                                                  fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
                                                                                                  auth_basic "Restricted Area";
                                                                                                  auth_basic_user_file /var/www/sub.example.be/.htpasswd;
                                                                                          }
                                                                                  
                                                                                          location ~ /\.ht {
                                                                                                 deny all;
                                                                                          }
                                                                                  }
                                                                                  

                                                                                  I'm currently using cloudflare for the main site DNS etc. This was setup a few months ago and works perfectly.

                                                                                  I'm just altering my host file on the server (for local test) and on my home pc (for remote tests).

                                                                                  My curl commands however are not working the same:

                                                                                  server: curl sub.example.be/index.html

                                                                                  
                                                                                  401 Authorization Required
                                                                                  
                                                                                  401 Authorization Required
                                                                                  nginx/1.14.2
                                                                                  
                                                                                  
                                                                                  

                                                                                  Which is I guess correct behavior.

                                                                                  But when i do that from my home pc: curl -v sub.example.be/index.html

                                                                                  *   Trying [IP]...
                                                                                  * TCP_NODELAY set
                                                                                  * connect to [IP] port 80 failed: Timed out
                                                                                  * Failed to connect to sub.example.be port 80: Timed out
                                                                                  * Closing connection 0
                                                                                  curl: (7) Failed to connect to sub.example.be port 80: Timed out
                                                                                  

                                                                                  Oh and yes, I can access my main domain remotely.

                                                                                  ANSWER

                                                                                  Answered 2021-Nov-12 at 20:03

                                                                                  My main website was apparently redirecting all traffic to HTTPS.

                                                                                  What fixed it for me is using DNS verification on certbot to add SSL to my subdomain. Copy the main nginx config and alter it for my subdomain.

                                                                                  And now I can access both the main and subdomain over HTTPS successfully.

                                                                                  Source https://stackoverflow.com/questions/69929161

                                                                                  QUESTION

                                                                                  Building dlib fails in docker container
                                                                                  Asked 2021-Oct-17 at 20:33

                                                                                  The Question

                                                                                  I have a docker image that builds fine on my local machine (Ubuntu 20.04) but fails on a shared Linode when compiling dlib. And I have absolutely no clue why this is happening.

                                                                                  Anybody knows or has any idea what to do? I assume it has something to do with the underlying hardware but what do I know...

                                                                                  Further Background

                                                                                  • Docker and Docker Compose version are the same on both systems
                                                                                  • all requirements for building dlib are met (proven by my successfull local build)
                                                                                  • I have an image based on nvidia/cuda:11.0.3-cudnn8-runtime-ubuntu20.04
                                                                                  • As I think the missing GPU on the Linode has something to do with it I tried to compile dlib without GPU support with several methods. None worked
                                                                                  • In the end the image exposes a Django API that does a bunch of Machine Learning stuff (using e.g. spacy or face-recognition).

                                                                                  The error message

                                                                                  Installing collected packages: dlib
                                                                                        Running setup.py install for dlib: started
                                                                                        Running setup.py install for dlib: still running...
                                                                                        Running setup.py install for dlib: still running...
                                                                                        Running setup.py install for dlib: still running...
                                                                                        Running setup.py install for dlib: still running...
                                                                                        Running setup.py install for dlib: still running...
                                                                                        Running setup.py install for dlib: still running...
                                                                                        Running setup.py install for dlib: still running...
                                                                                        Running setup.py install for dlib: still running...
                                                                                        Running setup.py install for dlib: still running...
                                                                                        Running setup.py install for dlib: still running...
                                                                                        Running setup.py install for dlib: finished with status 'error'
                                                                                        ERROR: Command errored out with exit status 1:
                                                                                         command: /home/picwise/.pyenv/versions/3.7.11/bin/python3.7 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-owm_69xz/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-owm_69xz/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4bup0pba/install-record.txt --single-version-externally-managed --compile --install-headers /home/picwise/.pyenv/versions/3.7.11/include/python3.7m/dlib
                                                                                             cwd: /tmp/pip-req-build-owm_69xz/
                                                                                        Complete output (267 lines):
                                                                                        running install
                                                                                        running build
                                                                                        running build_py
                                                                                        package init file 'tools/python/dlib/__init__.py' not found (or not a regular file)
                                                                                        running build_ext
                                                                                        Building extension for Python 3.7.11 (default, Oct  4 2021, 20:45:45)
                                                                                        Invoking CMake setup: 'cmake /tmp/pip-req-build-owm_69xz/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-owm_69xz/build/lib.linux-x86_64-3.7 -DPYTHON_EXECUTABLE=/home/picwise/.pyenv/versions/3.7.11/bin/python3.7 -DCMAKE_BUILD_TYPE=Release'
                                                                                        -- The C compiler identification is GNU 9.3.0
                                                                                        -- The CXX compiler identification is GNU 9.3.0
                                                                                        -- Check for working C compiler: /usr/bin/cc
                                                                                        -- Check for working C compiler: /usr/bin/cc -- works
                                                                                        -- Detecting C compiler ABI info
                                                                                        -- Detecting C compiler ABI info - done
                                                                                        -- Detecting C compile features
                                                                                        -- Detecting C compile features - done
                                                                                        -- Check for working CXX compiler: /usr/bin/c++
                                                                                        -- Check for working CXX compiler: /usr/bin/c++ -- works
                                                                                        -- Detecting CXX compiler ABI info
                                                                                        -- Detecting CXX compiler ABI info - done
                                                                                        -- Detecting CXX compile features
                                                                                        -- Detecting CXX compile features - done
                                                                                        -- Found PythonInterp: /home/picwise/.pyenv/versions/3.7.11/bin/python3.7 (found version "3.7.11")
                                                                                        -- Found PythonLibs: /home/picwise/.pyenv/versions/3.7.11/lib/libpython3.7m.a
                                                                                        -- Performing Test HAS_CPP14_FLAG
                                                                                        -- Performing Test HAS_CPP14_FLAG - Success
                                                                                        -- pybind11 v2.2.4
                                                                                        -- Using CMake version: 3.16.3
                                                                                        -- Compiling dlib version: 19.22.1
                                                                                        -- SSE4 instructions can be executed by the host processor.
                                                                                        -- AVX instructions can be executed by the host processor.
                                                                                        -- Enabling AVX instructions
                                                                                        -- Looking for pthread.h
                                                                                        -- Looking for pthread.h - found
                                                                                        -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
                                                                                        -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
                                                                                        -- Looking for pthread_create in pthreads
                                                                                        -- Looking for pthread_create in pthreads - not found
                                                                                        -- Looking for pthread_create in pthread
                                                                                        -- Looking for pthread_create in pthread - found
                                                                                        -- Found Threads: TRUE
                                                                                        -- Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
                                                                                         *****************************************************************************
                                                                                         *** DLIB GUI SUPPORT DISABLED BECAUSE X11 DEVELOPMENT LIBRARIES NOT FOUND ***
                                                                                         *** Make sure libx11-dev is installed if you want GUI support.            ***
                                                                                         *** On Ubuntu run: sudo apt-get install libx11-dev                        ***
                                                                                         *****************************************************************************
                                                                                        -- Searching for BLAS and LAPACK
                                                                                        -- Searching for BLAS and LAPACK
                                                                                        -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
                                                                                        -- Checking for module 'cblas'
                                                                                        --   No package 'cblas' found
                                                                                        -- Checking for module 'lapack'
                                                                                        --   No package 'lapack' found
                                                                                        -- Looking for cblas_ddot
                                                                                        -- Looking for cblas_ddot - not found
                                                                                        -- Looking for sys/types.h
                                                                                        -- Looking for sys/types.h - found
                                                                                        -- Looking for stdint.h
                                                                                        -- Looking for stdint.h - found
                                                                                        -- Looking for stddef.h
                                                                                        -- Looking for stddef.h - found
                                                                                        -- Check size of void*
                                                                                        -- Check size of void* - done
                                                                                         *****************************************************************************
                                                                                         *** No BLAS library found so using dlib's built in BLAS.  However, if you ***
                                                                                         *** install an optimized BLAS such as OpenBLAS or the Intel MKL your code ***
                                                                                         *** will run faster.  On Ubuntu you can install OpenBLAS by executing:    ***
                                                                                         ***    sudo apt-get install libopenblas-dev liblapack-dev                 ***
                                                                                         *** Or you can easily install OpenBLAS from source by downloading the     ***
                                                                                         *** source tar file from http://www.openblas.net, extracting it, and      ***
                                                                                         *** running:                                                              ***
                                                                                         ***    make; sudo make install                                            ***
                                                                                         *****************************************************************************
                                                                                        CUDA_TOOLKIT_ROOT_DIR not found or specified
                                                                                        -- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5")
                                                                                        -- Found CUDA, but CMake was unable to find the cuBLAS libraries that should be part of every basic CUDA install. Your CUDA install is somehow broken or incomplete. Since cuBLAS is required for dlib to use CUDA we won't use CUDA.
                                                                                        -- DID NOT FIND CUDA
                                                                                        -- Disabling CUDA support for dlib.  DLIB WILL NOT USE CUDA
                                                                                        -- C++11 activated.
                                                                                        -- Configuring done
                                                                                        -- Generating done
                                                                                        -- Build files have been written to: /tmp/pip-req-build-owm_69xz/build/temp.linux-x86_64-3.7
                                                                                        Invoking CMake build: 'cmake --build . --config Release -- -j1'
                                                                                        Scanning dependencies of target dlib
                                                                                        [  1%] Building CXX object dlib_build/CMakeFiles/dlib.dir/base64/base64_kernel_1.cpp.o
                                                                                        [  2%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_1.cpp.o
                                                                                        [  2%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_2.cpp.o
                                                                                        [  3%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bit_stream/bit_stream_kernel_1.cpp.o
                                                                                        [  4%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_1.cpp.o
                                                                                        [  4%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_2.cpp.o
                                                                                        [  5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_1.cpp.o
                                                                                        [  5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_2.cpp.o
                                                                                        [  6%] Building CXX object dlib_build/CMakeFiles/dlib.dir/md5/md5_kernel_1.cpp.o
                                                                                        [  7%] Building CXX object dlib_build/CMakeFiles/dlib.dir/tokenizer/tokenizer_kernel_1.cpp.o
                                                                                        [  7%] Building CXX object dlib_build/CMakeFiles/dlib.dir/unicode/unicode.cpp.o
                                                                                        [  8%] Building CXX object dlib_build/CMakeFiles/dlib.dir/test_for_odr_violations.cpp.o
                                                                                        [  9%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_1.cpp.o
                                                                                        [  9%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bsp/bsp.cpp.o
                                                                                        [ 10%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_1.cpp.o
                                                                                        [ 11%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_2.cpp.o
                                                                                        [ 11%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_extensions.cpp.o
                                                                                        [ 12%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/fonts.cpp.o
                                                                                        [ 13%] Building CXX object dlib_build/CMakeFiles/dlib.dir/linker/linker_kernel_1.cpp.o
                                                                                        [ 13%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/extra_logger_headers.cpp.o
                                                                                        [ 14%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_kernel_1.cpp.o
                                                                                        [ 14%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_config_file.cpp.o
                                                                                        [ 15%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_1.cpp.o
                                                                                        [ 16%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_2.cpp.o
                                                                                        [ 16%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_extensions.cpp.o
                                                                                        [ 17%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_2.cpp.o
                                                                                        [ 18%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf.cpp.o
                                                                                        [ 18%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf_unbuffered.cpp.o
                                                                                        [ 19%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_kernel.cpp.o
                                                                                        [ 20%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_iostream.cpp.o
                                                                                        [ 20%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_http.cpp.o
                                                                                        [ 21%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/multithreaded_object_extension.cpp.o
                                                                                        [ 22%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threaded_object_extension.cpp.o
                                                                                        [ 22%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_1.cpp.o
                                                                                        [ 23%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_2.cpp.o
                                                                                        [ 24%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_shared.cpp.o
                                                                                        [ 24%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/thread_pool_extension.cpp.o
                                                                                        [ 25%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/async.cpp.o
                                                                                        [ 25%] Building CXX object dlib_build/CMakeFiles/dlib.dir/timer/timer.cpp.o
                                                                                        [ 26%] Building CXX object dlib_build/CMakeFiles/dlib.dir/stack_trace.cpp.o
                                                                                        [ 27%] Building CXX object dlib_build/CMakeFiles/dlib.dir/cuda/cpu_dlib.cpp.o
                                                                                        [ 27%] Building CXX object dlib_build/CMakeFiles/dlib.dir/cuda/tensor_tools.cpp.o
                                                                                        [ 28%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/image_dataset_metadata.cpp.o
                                                                                        [ 29%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/mnist.cpp.o
                                                                                        [ 29%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/cifar.cpp.o
                                                                                        [ 30%] Building CXX object dlib_build/CMakeFiles/dlib.dir/global_optimization/global_function_search.cpp.o
                                                                                        [ 31%] Building CXX object dlib_build/CMakeFiles/dlib.dir/filtering/kalman_filter.cpp.o
                                                                                        In file included from /tmp/pip-req-build-owm_69xz/dlib/filtering/../matrix.h:11,
                                                                                                         from /tmp/pip-req-build-owm_69xz/dlib/filtering/kalman_filter.h:7,
                                                                                                         from /tmp/pip-req-build-owm_69xz/dlib/filtering/kalman_filter.cpp:6:
                                                                                        /tmp/pip-req-build-owm_69xz/dlib/filtering/../matrix/matrix_la.h: In function ‘long int dlib::svd4(dlib::svd_u_mode, bool, const dlib::matrix_exp&, dlib::matrix&, dlib::matrix&, dlib::matrix&) [with EXP = dlib::matrix_op, dlib::row_major_layout> > > > >; long int qN = 1; long int qX = 1; long int uM = 1; long int uN = 1; long int vM = 2; long int vN = 1; MM1 = dlib::memory_manager_stateless_kernel_1; MM2 = dlib::memory_manager_stateless_kernel_1; MM3 = dlib::memory_manager_stateless_kernel_1; L1 = dlib::row_major_layout]’:
                                                                                        /tmp/pip-req-build-owm_69xz/dlib/filtering/../matrix/matrix_la.h:225:32: warning: iteration 1 invokes undefined behavior [-Waggressive-loop-optimizations]
                                                                                          225 |             y = abs(q(i)) + abs(e(i));
                                                                                              |                             ~~~^~~~~~
                                                                                        /tmp/pip-req-build-owm_69xz/dlib/filtering/../matrix/matrix_la.h:163:20: note: within this loop
                                                                                          163 |         for (i=0; i", line 1, in 
                                                                                          File "/tmp/pip-req-build-owm_69xz/setup.py", line 261, in 
                                                                                            'Topic :: Software Development',
                                                                                          File "/home/picwise/.pyenv/versions/3.7.11/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
                                                                                            return distutils.core.setup(**attrs)
                                                                                          File "/home/picwise/.pyenv/versions/3.7.11/lib/python3.7/distutils/core.py", line 148, in setup
                                                                                            dist.run_commands()
                                                                                          File "/home/picwise/.pyenv/versions/3.7.11/lib/python3.7/distutils/dist.py", line 966, in run_commands
                                                                                            self.run_command(cmd)
                                                                                          File "/home/picwise/.pyenv/versions/3.7.11/lib/python3.7/distutils/dist.py", line 985, in run_command
                                                                                            cmd_obj.run()
                                                                                          File "/home/picwise/.pyenv/versions/3.7.11/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
                                                                                            return orig.install.run(self)
                                                                                          File "/home/picwise/.pyenv/versions/3.7.11/lib/python3.7/distutils/command/install.py", line 545, in run
                                                                                            self.run_command('build')
                                                                                          File "/home/picwise/.pyenv/versions/3.7.11/lib/python3.7/distutils/cmd.py", line 313, in run_command
                                                                                            self.distribution.run_command(command)
                                                                                          File "/home/picwise/.pyenv/versions/3.7.11/lib/python3.7/distutils/dist.py", line 985, in run_command
                                                                                            cmd_obj.run()
                                                                                          File "/home/picwise/.pyenv/versions/3.7.11/lib/python3.7/distutils/command/build.py", line 135, in run
                                                                                            self.run_command(cmd_name)
                                                                                          File "/home/picwise/.pyenv/versions/3.7.11/lib/python3.7/distutils/cmd.py", line 313, in run_command
                                                                                            self.distribution.run_command(command)
                                                                                          File "/home/picwise/.pyenv/versions/3.7.11/lib/python3.7/distutils/dist.py", line 985, in run_command
                                                                                            cmd_obj.run()
                                                                                          File "/tmp/pip-req-build-owm_69xz/setup.py", line 134, in run
                                                                                            self.build_extension(ext)
                                                                                          File "/tmp/pip-req-build-owm_69xz/setup.py", line 174, in build_extension
                                                                                            subprocess.check_call(cmake_build, cwd=build_folder)
                                                                                          File "/home/picwise/.pyenv/versions/3.7.11/lib/python3.7/subprocess.py", line 363, in check_call
                                                                                            raise CalledProcessError(retcode, cmd)
                                                                                        subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j1']' returned non-zero exit status 2.
                                                                                        ----------------------------------------
                                                                                    ERROR: Command errored out with exit status 1: /home/picwise/.pyenv/versions/3.7.11/bin/python3.7 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-owm_69xz/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-owm_69xz/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4bup0pba/install-record.txt --single-version-externally-managed --compile --install-headers /home/picwise/.pyenv/versions/3.7.11/include/python3.7m/dlib Check the logs for full command output.
                                                                                    
                                                                                  
                                                                                    at /home.pyenv/versions/3.7.11/lib/python3.7/site-packages/poetry/utils/env.py:1075 in _run
                                                                                        1071│                 output = subprocess.check_output(
                                                                                        1072│                     cmd, stderr=subprocess.STDOUT, **kwargs
                                                                                        1073│                 )
                                                                                        1074│         except CalledProcessError as e:
                                                                                      → 1075│             raise EnvCommandError(e, input=input_)
                                                                                        1076│ 
                                                                                        1077│         return decode(output)
                                                                                        1078│ 
                                                                                        1079│     def execute(self, bin, *args, **kwargs):
                                                                                  
                                                                                  The command '/bin/bash -o pipefail -c poetry install     $(test \"$PICWISE_DJANGO_ENVIRONMENT\" == production && echo \"--no-dev\")     --no-interaction     --no-ansi' returned a non-zero code: 1
                                                                                  

                                                                                  ANSWER

                                                                                  Answered 2021-Oct-17 at 20:33

                                                                                  I solved the problem by upgrading my Linode to a dedicated CPU plan. After doing so everything worked as expected.

                                                                                  For me this problem is solved but I am still curious why this did not work on the shared system... If anybody know, please enlighten me!

                                                                                  Source https://stackoverflow.com/questions/69572420

                                                                                  Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                                                                                  Vulnerabilities

                                                                                  No vulnerabilities reported

                                                                                  Install linode

                                                                                  You can download it from GitHub.
                                                                                  On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.

                                                                                  Support

                                                                                  If you would like to submit a bug fix or feature, you can do so with the traditional GitHub workflow.
                                                                                  Find more information at:
                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit
                                                                                  CLONE
                                                                                • HTTPS

                                                                                  https://github.com/rick/linode.git

                                                                                • CLI

                                                                                  gh repo clone rick/linode

                                                                                • sshUrl

                                                                                  git@github.com:rick/linode.git

                                                                                • Share this Page

                                                                                  share link

                                                                                  Explore Related Topics

                                                                                  Reuse Pre-built Kits with linode

                                                                                  Consider Popular REST Libraries

                                                                                  public-apis

                                                                                  by public-apis

                                                                                  json-server

                                                                                  by typicode

                                                                                  iptv

                                                                                  by iptv-org

                                                                                  fastapi

                                                                                  by tiangolo

                                                                                  beego

                                                                                  by beego

                                                                                  Try Top Libraries by rick

                                                                                  redbox

                                                                                  by rickRuby

                                                                                  CSA

                                                                                  by rickC

                                                                                  fitblitzed

                                                                                  by rickRuby

                                                                                  litestream

                                                                                  by rickC

                                                                                  Compare REST Libraries with Highest Support

                                                                                  fastapi

                                                                                  by tiangolo

                                                                                  dropwizard

                                                                                  by dropwizard

                                                                                  python

                                                                                  by kubernetes-client

                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit