Category Archives: Error

[Solved] Vite Project jenkins Auto Package Error: failed to load config from ../vite.config.js You installed esbuild on

The vite project reported an error in Jenkins automatic packaging and could not find esbuild-linux-64

If esbuild-windows-64 is not found for development in window environment, it needs to use esbuild-linux-64 for construction in Linux environment. If esbuild-linux-64 is not found, an error will be reported

Actual error reporting:

error during build:
11:21:11 Error: 
11:21:11 You installed esbuild on another platform than the one you're currently using.
11:21:11 This won't work because esbuild is written with native code and needs to
11:21:11 install a platform-specific binary executable.
11:21:11 
11:21:11 Specifically the "esbuild-windows-64" package is present but this platform
11:21:11 needs the "esbuild-linux-64" package instead. People often get into this
11:21:11 situation by installing esbuild on Windows or macOS and copying "node_modules"
11:21:11 into a Docker image that runs Linux, or by copying "node_modules" between
11:21:11 Windows and WSL environments.

Error reason: vite cannot find esbuild-linux-64 in Linux environment

Two solutions:
1. In the Linux environment, npm i esbuild-linux-64

2. You can view the esbuild-linux-64 version number in package-lock.json and modify and download it yourself, after downloading, unzip the package folder, rename it esbuild-linux-64 and copy it to the current project node_modules directory

[Solved] Android Develop Error: xxx does not have a NavController set on xxx

Execute the following code in the oncreate life cycle of activity, causing XXX does not have a navcontroller set on XXX to report an error

I/art: Do partial code cache collection, code=57KB, data=58KB
I/art: After code cache collection, code=53KB, data=56KB
I/art: Increasing code cache capacity to 256KB
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.zjm.myapplication, PID: 6291
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.zjm.myapplication/com.zjm.myapplication.footNavigation.FootNavActivity}: java.lang.IllegalStateException: Activity com.zjm.myapplication.footNavigation.FootNavActivity@23141b0 does not have a NavController set on 2131230967
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2668)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2729)
        at android.app.ActivityThread.-wrap12(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1480)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6176)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)
     Caused by: java.lang.IllegalStateException: Activity com.zjm.myapplication.footNavigation.FootNavActivity@23141b0 does not have a NavController set on 2131230967
        at androidx.navigation.Navigation.findNavController(Navigation.java:61)
        at com.zjm.myapplication.footNavigation.FootNavActivity.onCreate(FootNavActivity.java:28)
        at android.app.Activity.performCreate(Activity.java:6692)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2621)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2729) 
        at android.app.ActivityThread.-wrap12(ActivityThread.java) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1480) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:154) 
        at android.app.ActivityThread.main(ActivityThread.java:6176) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783) 

Layout:

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_foot_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".footNavigation.FootNavActivity">

    <com.google.android.material.bottomnavigation.BottomNavigationView
        android:id="@+id/bottomNavigationView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:menu="@menu/menu_foot_nav" />

    <androidx.fragment.app.FragmentContainerView
        android:id="@+id/fragmentContainerView2"
        android:name="androidx.navigation.fragment.NavHostFragment"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:defaultNavHost="true"
        app:layout_constraintBottom_toTopOf="@+id/bottomNavigationView"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:navGraph="@navigation/nav_graph_foot" />

</androidx.constraintlayout.widget.ConstraintLayout>

code:

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityFootNavBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        BottomNavigationView bottomNavigationView = findViewById(R.id.bottomNavigationView);

        NavController navController = Navigation.findNavController(this,R.id.fragmentContainerView2);
        AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(navController.getGraph()).build();
        NavigationUI.setupActionBarWithNavController(this,navController,appBarConfiguration);
        NavigationUI.setupWithNavController(bottomNavigationView,navController);
    }

Cause of problem

The reason for the problem is that the NavController corresponding to the FragmentContainerView is not built successfully in the onCreate life cycle

 

Solution:

Method 1:

It is very simple to directly obtain navcontroller in OnStart life cycle, as shown in the following code:

    @Override
    protected void onStart() {
        super.onStart();
        navController = Navigation.findNavController(this,R.id.fragmentContainerView2);
    }

Or, put the task of obtaining NavController into view and execute it after the mapping is completed

        mBinding.fragment.post(new Runnable() {
            @Override
            public void run() {
                        navController = Navigation.findNavController(this,R.id.fragmentContainerView2);

            }
        });

Method 2:

Using getSupportFragmentManager to Get

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityFootNavBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        BottomNavigationView bottomNavigationView = findViewById(R.id.bottomNavigationView);

        NavHostFragment navHostFragment = (NavHostFragment)getSupportFragmentManager().findFragmentById(R.id.fragmentContainerView2);
        NavController navController = navHostFragment.getNavController();
        AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(navController.getGraph()).build();
        NavigationUI.setupActionBarWithNavController(this,navController,appBarConfiguration);
        NavigationUI.setupWithNavController(bottomNavigationView,navController);
    }

[Solved] kafka startup Error: java.net.ConnectException: Connection refused

0. Installation reference

Note that the new version of Kafka does not need to install zookeeper separately. You can directly use the self-contained one. Of course, you can also install it separately

1. Error message

Kafka startup error: java.net.ConnectException: Connection refused

2. Cause of error

Zookeeper was not started before Kafka was started

3. Solution

Start zookeeper first and then Kafka again

4. Start command

4.1 to Kafka installation directory

cd /usr/src/kafka_2.12-3.1.0/

4.2 start zookeeper (the latest version of the zookeeper from Kafka is used here)

bin/zookeeper-server-start.sh config/zookeeper.properties 

4.3 start Kafka

bin/kafka-server-start.sh config/server.properties

4.4 close Kafka

bin/kafka-server-stop.sh config/server.properties

[Solved] k8s kubeadmin init Error: http://localhost:10248/healthz‘ failed

Error Messages:

[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
        Unfortunately, an error has occurred:
                timed out waiting for the condition
        This error is likely caused by:
                - The kubelet is not running
                - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)
        If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
                - 'systemctl status kubelet'
                - 'journalctl -xeu kubelet'
        Additionally, a control plane component may have crashed or exited when started by the container runtime.
        To troubleshoot, list all containers using your preferred container runtimes CLI.
        Here is one example how you may list all Kubernetes containers running in docker:
                - 'docker ps -a | grep kube | grep -v pause'
                Once you have found the failing container, you can inspect its logs with:
                - 'docker logs CONTAINERID'
error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster

 

Use the command to find the startup error reason:

systemctl status kubelet -l
kubelet.service - kubelet: The Kubernetes Node Agent
   Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/kubelet.service.d
           └─10-kubeadm.conf
   Active: activating (auto-restart) (Result: exit-code) since 四 2022-04-14 19:12:05 CST; 7s ago
     Docs: https://kubernetes.io/docs/
  Process: 4796 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS (code=exited, status=1/FAILURE)
 Main PID: 4796 (code=exited, status=1/FAILURE)
4月 14 19:12:05 K8SMASTER01 systemd[1]: kubelet.service: main process exited, code=exited, status=1/FAILURE
4月 14 19:12:05 K8SMASTER01 kubelet[4796]: E0414 19:12:05.862353    4796 server.go:294] "Failed to run kubelet" err="failed to run Kubelet: misconfiguration: kubelet cgroup driver: \"systemd\" is different from docker cgroup driver: \"cgroupfs\""
4月 14 19:12:05 K8SMASTER01 systemd[1]: Unit kubelet.service entered failed state.
4月 14 19:12:05 K8SMASTER01 systemd[1]: kubelet.service failed.

 

Solution:

[root@K8SMASTER01 ~]# cat > /etc/docker/daemon.json <<EOF
> {"exec-opts": ["native.cgroupdriver=systemd"]}
> EOF
[root@K8SMASTER01 ~]# systemctl restart docker

[Solved] Tensorflow2.0 Error: Function call stack:distributed_function

It can be clearly said that GPU resources are insufficient. What’s more, when using jupyters provided by various platforms to use GPU, when opening multiple tap pages, because tensorflow takes up all the resources as much as possible, only the first one will start successfully without setting the resource usage in advance, and the rest will cause the above error

You can close all pages first, then restart, and configure as follows

# import tensorflow as tf 
import os

os.environ['CUDA_VISIBLE_DEVICES']="0" # Specify which GPU to train
config=tf.compat.v1.ConfigProto() 
# Set the maximum occupied GPU to no more than 80% of the video memory (optional)
config.gpu_options.per_process_gpu_memory_fraction=0.5
config.gpu_options.allow_growth = True # Set dynamic GPU memory allocation
sess=tf.compat.v1.Session(config=config)

ROS Start Gazebo Error (First time): Err] [REST.cc:205] Error in REST request

Problems encountered during ROS learning:

Err] [REST.cc:205] Error in REST request

Gazebo has been installed when ROS is installed. Use the following command to check whether the installation is successful, and open the gazebo simulation environment.

roslaunch gazebo_ros empty_world.launch

When opening gazebo in ROS for the first time, error will be report: Err] [REST.cc:205] Error in REST request

As shown in the figure below:

Solution:

It needs to be modified .ignition/fuel/config.yaml file

Open yaml file command:

sudo gedit ~/.ignition/fuel/config.yaml

Use # to comment out this code: url: https://api.ignitionfuel.org

Then add

url: https://api.ignitionrobotics.org

As shown in the following figure:

run the launch command again, and you will not see the above error warning.

roslaunch gazebo_ros empty_world.launch

[Solved] std::max() error C2589: ‘(‘ : illegal token on right side of ‘::‘

int max =std::numeric_limits< int>: max();
:: Based on error indicating:

f:\code\cpp\webspider\main. cpp(47): warning C4003: not enough actual parameters for macro ‘max’

f:\code\cpp\webspider\main. cpp(47) : error C2589: ‘(‘ : illegal token on right side of ‘::’

f:\code\cpp\webspider\main. cpp(47) : error C2059: syntax error : ‘::’

Cause: STL’s numeric_limits::max() and VC6 min/max macro conflict.

The problem should be that the macro definitions of the above two header files conflict.

Solution: Use parentheses “()” to avoid precompiler errors. int max = (std::numeric_limits<std::streamsize>::max)(); That’s it.

[Solved] R Language Error: Error in file(out, “wt“) : cannot open the connection

I recently processed some large files of biological data. After writing the code, I found that the code was a bit wrong and needed to be modified, so I terminated the operation. However, since this process should take a long time to run and suddenly terminated, R will clear the archive. the error will be report:

Error in file(out, “wt“) : cannot open the connection

Solution: use the following command to generate temporary Archive

dir.create(tempdir())

I tried to restart it, but it seems to restart will not work.

[Solved] CMake Error Cannot specify link libraries for target “variational“ which is not built by this projec

For errors:

CMake Error at D:\VSA_paper\VSA\CMakeLists.txt:48 (target_link_libraries):
1> [CMake] Cannot specify link libraries for target “variational” which is not built by this project.

 

All the information found said target_link_libraries is not placed behind add_executable, but not mine
the following is the code segment where the error is located

add_executable(${PROJECT_NAME}_bin ${SRCFILES}  ${HEAD_FILES} ${RCC_FILES} ${WRAP_FILES}  "gauss.h" "developable_degree.h")
target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::Core Qt5::Gui)
target_link_libraries(${PROJECT_NAME}_bin igl::core igl::opengl_glfw)
target_link_libraries(${PROJECT_NAME}_bin OpenMesh)

From the error “Cannot specify link libraries for target “variational” which is not built by this project.” You can see that the project name “variant” is wrong and should be “variant_bin”.

The solution is to add the missing “_bin” after ${project_name} in the above code segment. The modified result is as follows:

add_executable(${PROJECT_NAME}_bin ${SRCFILES}  ${HEAD_FILES} ${RCC_FILES} ${WRAP_FILES}  "gauss.h" "developable_degree.h")
#add Qt5
target_link_libraries(${PROJECT_NAME}_bin Qt5::Widgets Qt5::Core Qt5::Gui)
target_link_libraries(${PROJECT_NAME}_bin igl::core igl::opengl_glfw)
target_link_libraries(${PROJECT_NAME}_bin OpenMesh)

[Solved] JMeter Server Command line pressure measurement: Error in NonGUIDriver java.lang.IllegalArgumentException

The whole environment has been built and operated before, and everything is normal.

After debugging the script locally, upload it to the server for pressure test, report an error and prompt:

Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/usr/local/jscripts/yth.jmx'.
Cause:
CannotResolveClassException: com.github.johrstrom.listener.PrometheusListener……

 

According to the prompt, combine your own operation, because a prometheuslistener plug-in is added during local debugging, but it is not available on the server.

Solution:

1. Add this jar package under the plug-in package under the JMeter directory of the server

2. Re debug the script upload server in the state of no new plug-ins locally

I’ve tried both ways. It’s OK!.

But it’s usually the first one. After all, I want this jar

[Solved] Overleaf Compile the Paper Error: LaText Error:Environment aligned undefined.

 

Problem Description:

Use online overflow to compile the paper, and the errors in the formula part are as follows.

Problem solving:

This “environment XXX undefined” problem is mostly caused by the fact that packages are not introduced. The solution is to introduce corresponding packages

The solution to this error is to import the amspath package, that is, add this line where the package was imported first.

\usepackage{amsmath}

[How to Solve] error Parsing error: x-invalid-end-tag

Error reporting result

error  Parsing error: x-invalid-end-tag

Error reporting analysis

When view renders tags as native HTML tags, because these tags are self-closing, an error will be reported if there is an end tag.

Solution:

The first method: remove the end mark and write it in the form of single label

The second method: turn off the reminder

File/Preferences/Settings

Enter vetur. valid ation.tem pl ate in the search field and uncheck it as the screenshot below.