Category Archives: Error

[Solved] Kubernetes Error: failed to list *core.Secret: unable to transform key

While installing a Kubernetes local cluster, I happened to encounter the following problem:

E0514 07:30:58.627632 1 cacher.go:424] cacher (*core.Secret): unexpected ListAndWatch error: failed to list *core.Secret: unable to transform key “/registry/secrets/default/default-token-nk77g”: invalid padding on input; reinitializing…
W0514 07:30:59.631509 1 reflector.go:324] storage/cacher.go:/secrets: failed to list *core.Secret: unable to transform key “/registry/secrets/default/default-token-nk77g”: invalid padding on input
E0514 07:30:59.631563 1 cacher.go:424] cacher (*core.Secret): unexpected ListAndWatch error: failed to list *core.Secret: unable to transform key “/registry/secrets/default/default-token-nk77g”: invalid padding on input; reinitializing…
W0514 07:31:00.633540 1 reflector.go:324] storage/cacher.go:/secrets: failed to list *core.Secret: unable to transform key “/registry/secrets/default/default-token-nk77g”: invalid padding on input
E0514 07:31:00.633575 1 cacher.go:424] cacher (*core.Secret): unexpected ListAndWatch error: failed to list *core.Secret: unable to transform key “/registry/secrets/default/default-token-nk77g”: invalid padding on input; reinitializing…

 

Reason:

We know that after running the cluster master, we need to create the TLS Bootstrap Secret to provide an automatic visa using.

cat <<EOF | kubectl create -f -
apiVersion: v1
kind: Secret
metadata:
  name: bootstrap-token-${TOKEN_ID}
  namespace: kube-system
type: bootstrap.kubernetes.io/token
stringData:
  token-id: "${TOKEN_ID}"
  token-secret: "${TOKEN_SECRET}"
  usage-bootstrap-authentication: "true"
  usage-bootstrap-signing: "true"
  auth-extra-groups: system:bootstrappers:default-node-token
EOF

secret "bootstrap-token-65a3a9" created

where BOOTSTRAP_TOKEN=T O K E N I D . {TOKEN_ID}.TOKEN
I

D.{TOKEN_SECRET} can be found in bootstrap-kubelet.conf.

One of the reasons for the problem shown in the title is that the command may have been run multiple times and multiple secrets exist, e.g. the node side was found to be not working properly and a bootstrap-kubelet.conf was regenerated for it, etc.

Then when installing the kubernetes cluster manually, we will find that the online information is backward after all, so we will use the kubeadm post-installation information for comparison and verification, and then I accidentally added the following codes:

spec:
hostNetwork: true
priorityClassName: system-cluster-critical
securityContext:
seccompProfile:
type: RuntimeDefault

spec.securityContext.seccompProfile.type=RuntimeDefault, this setting will automatically generate a self-signed secret when the cluster is running, which will lead to a contradiction with the manual generation and the problem in the title.

 

Solution:

1) First clear the cluster cache, delete all files under /var/lib/etcd/ and /var/lib/kubelet/, and keep the config.xml file in the latter.
2) Delete the spec.securityContext.type=”seccompProfile” in /etc/kubernetes/manifests under kube-apiserver.yml, kube-controller-manager.yml and kube-scheduler.yml. seccompProfile.type=RuntimeDefault.
3) Re-run the kubelet: systemctl start kubelet and you are done.

[Solved] Cordova Android Compile Error: Execution failed for task ‘:packageDebug‘

Execution failed for task ‘:packageDebug’

Background

Use ionic+cordova+gradle to package the Android program. The environment is as follows:

    cordova  :  7.1.0
    Gradle  :   7.4
    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0
    

System:

    Node : v6.9.1
    npm  : 3.10.8
    OS   : Windows 10

Misc:

    backend : pro

problem

* What went wrong:
Execution failed for task ':packageDebug'.
> com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "C:\Users\11644\.android\debug.keystore": Invalid keystore format

Solution:

According to the second paragraph

 Failed to read key AndroidDebugKey from store "C:\Users\11644\.android\debug.keystore": Invalid keystore format

Find the debug.keystore file

delete this file and rerun the command
package successfully

BUILD SUCCESSFUL

Total time: 1.658 secs
Built the following apk(s):
        D:/ProjectFiles/CordovaProject/myapp/platforms/android/build/outputs/apk/android-debug.apk
ANDROID_HOME=D:\Programmer\AndroidSDKmange
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_201
No target specified, deploying to device '26395863'.
Skipping build...
Built the following apk(s):
        D:/ProjectFiles/CordovaProject/myapp/platforms/android/build/outputs/apk/android-debug.apk
Using apk: D:/ProjectFiles/CordovaProject/myapp/platforms/android/build/outputs/apk/android-debug.apk
Package name: io.cordova.hellocordova
LAUNCH SUCCESS

Apk Failed to install Error: [install\u failed\verification\u failure]

Apk install failed: [install\u failed\verification\u failure]

When “myapp.apk” is installed, the following error is obtained:

[INSTALL_FAILED_VERIFICATION_FAILURE]

You must allow unsigned applications. Installation is blocked by Android. Allow non market applications to be installed in settings.

You need to disable verification of APK during ADB installation. If the security settings are grayed out or do not work properly, try shelling the device and running at each API level (global, system, security) according to the settings in the settings database

$ adb shell settings put global verifier_verify_adb_installs 0

If you can really set it, it will prevent APK checking through ADB.

Sometimes you need to disable the package verifier and use:

$ adb shell settings put global package_verifier_enable 0

You can see here that these settings are in the global database:

http://androidxref.com/4.4.2_r2/xref/frameworks/base/core/java/android/provider/Settings.java#5015

[Solved] IntelliJ IDEA Compile Error: Errorjava Compilation failed internal java compiler error

IntelliJ idea tutorial (contents)

Error content:

information:using javac 1.8.0_ 73 to compile Java sources
information:java: javactask: source release 1.8 requires target release 1.8
information:java: errors occurred while compiling module 'ezsonar'
information:module "ezsonar" was fully rebuilt due to project configuration/dependencies changes
Information:2016/11/21 14:08 - Compilation completed with 1 error and 0 warnings in 5s 242ms
Error:java: Compilation failed: internal java compiler error

 

Error reporting diagram:

Solution:

If it is not the same as the one in the figure, click the one on the right to add the module of your project and select the corresponding version of JDK required by your project. Just compile it again.

[Solved] Win 10 Kafka error: failed to construct Kafka consumer

After updating the code, the package succeeds, but an error is reported when the project is started. The error information is shown in the following figure:

I mean, it is obvious that the problem lies in Kafka. After looking at the configuration, it should be the port problem.

Instead of using IP configuration, I directly configured the port name in the host file, as shown in the following figure:

Add configuration 127.0.0.1 Kafka-server

Then change the service address of Kafka to kafka-server:9092 in the application configuration file of the project

ElasticsearchSecurityException[failed to load SSL configuration [xpack.security.transport.ssl]]

ElasticsearchSecurityException[failed to load SSL configuration [xpack.security.transport.ssl]]

[ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [master] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: ElasticsearchSecurityException[failed to load SSL configuration [xpack.security.transport.ssl]]; nested: ElasticsearchException[failed to initialize SSL TrustManager]; nested: IOException[parseAlgParameters failed: ObjectIdentifier() -- data isn't an object ID (tag = 48)]; nested: IOException[ObjectIdentifier() -- data isn't an object ID (tag = 48)];

 

Solution:
1. configure xpack.security.transport.ssl.keystore.path: elastic-certificates.p12 in elasticsearch.yml
change the path of elastic-certificates.p12 to absolute path and assign 777 permissions, restart.
2. after modification 1 did not work, continue to think, set the jdk to ES comes with jdk11, restart.
Perfect solution

[Solved] presto Compile Error: Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check

The error information is as follows:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (checkstyle) on project presto-parser: You have 4 Checkstyle violations. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (checkstyle) on project presto-parser: You have 4 Checkstyle violations.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:186)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
    at java.lang.Thread.run (Thread.java:748)
Caused by: org.apache.maven.plugin.MojoFailureException: You have 4 Checkstyle violations.
    at org.apache.maven.plugins.checkstyle.CheckstyleViolationCheckMojo.execute (CheckstyleViolationCheckMojo.java:576)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:186)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
    at java.lang.Thread.run (Thread.java:748)
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :presto-parser

Compile again

[Solved] Manifest merger failed: android:exported needs to be explicitly specified for element <activity#com

Manifest merger failed : android:exported needs to be explicitly specified for element < activity#***

com.tamsiree.rxui.activity.activityWebView***>. Apps targeting Android 12 and higher are required to specify an explicit value forandroid:exportedwhen the corresponding component has an intent filter defined.

**According to the hint, you need to add the dependency package com.tamsiree.rxui.activity.ActivityWebView to the
AndroidManifest.xml file under the activity to add android:exported **

Note that the package name depends on whether it is in your own project or a dependent package. To find it, click on a file on the left and type in what you want to find

How to Solve Android Arouter Frame Autowired Error

For subclasses that inherit the parent class, the parent class then inherits the BaseActivity. If the BaseActivity uses the inject() method, you need to write

@Autowired
open
lateinit var hardware: HardWare

Write in subclass:

@Autowired
override
lateinit var hardware: HardWare

In this way, the problem of Arouter inject error will not be caused

[Solved] cortex_M3 freeRTOS Error: undefined reference to `_sbrk‘

Background: When cortex_m3 uses FreeRTOS to enable the running time statistics function.

Compilation error during compilation:

/Data/user_ Home//build_ Tools/GCC arm none eabi-/bin// Lib/gcc/arm-none-eabi/6.2.1/../../../../..// Arm-none-eabi/lib/thumb/v7-m/libc A (lib_a-sbrkr.o): in function`_ Sbrk_ R’:

Sbrkr c: (.Text.\u sbrk_r+0xc): undefined reference to`_ Sbrk’

Collect2: error: LD returned 1 exit status

Makefile:155: recipe for target’all’failed

Make: * * * [all] error 1


Cause: by default, arm GCC uses startfiles, which results in link compilation failure when calling some functions (malloc, free, sprintf…) that are not implemented at the bottom.

Promotion: if the compiler reports Error: undefined reference to `_sbrk’ `_read’ `_write’ `_lseek’ `_isatty’ `_fstat’ , it is the same reason.


Solution:

Method 1: if the project does not need these functions, find the direct mask function.

Method 2: once and for all. The link fails because these functions are not implemented, so you can rewrite these underlying functions or add library files with these functions, such as libnosys a. Add compilation parameter —specs=nosys.specs can be used.

After adding, if the compiler reports the following errors:

/Data/user_ Home/ /build_ Tools/GCC arm none eabi-/bin// Lib/gcc/arm-none-eabi/6.2.1/../../../../..// Arm-none-eabi/lib/thumb/v7-m/libnosys A (sbrk.o): in function`_ Sbrk’:

Sbrk c: (.Text.\u sbrk+0x18): undefined reference to `end’

Collect2: error: LD returned 1 exit status

Makefile:155: recipe for target’all’failed

Make: * * * [all] error 1

This is because the ‘end’ symbol is not defined in the .lds linker script, so find the project’s xx.lds file to set that script for the heap location, e.g.

  .heap :

  {

    . = ALIGN(4);

    __HEAP_START = .;

    . += 0x2000; __HEAP_MAX = .;

    end = __HEAP_MAX;

     PROVIDE(end = .);

  } > ram

[Solved] Golang Error: main.go:5:2: package go_code/chapter10/factory/model is not in GOROOT

golang Error: is not in GOROOT

The following errors are reported during operation

PS C:\goproject\src\go_code\chapter10\factory\main> go run main.go
main.go:5:2: package go_code/chapter10/factory/model is not in GOROOT (C:\go\src\go_code\chapter10\factory\model)

The process is as follows

PS C:\goproject\src\go_code\chapter10\factory\main> go run main.go
main.go:5:2: package go_code/chapter10/factory/model is not in GOROOT (C:\go\src\go_code\chapter10\factory\model)

PS C:\goproject\src\go_code\chapter10\factory\main>  go env
set GO111MODULE=

PS C:\goproject\src\go_code\chapter10\factory\main> go env -w GO111MODULE=off
PS C:\goproject\src\go_code\chapter10\factory\main> go run main.go
{tom 78.9}

[Solved] matlab Error: `Using exist to check

matlab Error: `Using exist to check

matlab Error: Using exist to check for a variable in the transparent workspace is not supported. To check for a function, folder, file, or class, specify the appropriate second input argument to exist: 'builtin', 'class', 'dir' or 'file'.

 

Solution:
Modify exist(savepath) to exist(savepath, ‘file’) (if it is to detect the existence of a file fill in file, otherwise replace file with one of ‘builtin’, ‘class’, ‘dir’ or ‘file’)