Author Archives: Robins

[Solved] .java.lang.IllegalArgumentException: requirement failed: Can only call getServletHandlers on a runn

. java.lang.IllegalArgumentException: requirement failed: Can only call getServletHandlers on a runn

Running Spark Program on the server reports an error
java.lang.IllegalArgumentException: requirement failed: Can only call getServletHandlers on a running MetricsSystem

 

Solution:

After checking the spark Master and Worker services did not start, and then submit it to run normally after starting.

Virtual machine failed to start network service error: ob for network.service failed because the control process exited with error code

About CentOS 7 virtual machine startup network service startup failure: ob for network service failed because the control process exited with error code

As shown in the following figure:

Question:

When using CentOS 7 system, after changing the static IP, it is found that the network service cannot be restarted, and after using the IP addr or ipconfig command, it is found that the changed static IP address is not displayed and mysteriously disappears. The connection to the external network is also different, and the Ping is blocked.

Error reason:

There is a conflict between NetworkManager and Network, there are two network management tools on CentOS system, NetworkManager and Network, if both of them are configured, it will cause a conflict between them. As we usually use Network to configure our virtual machine static ip address, but sometimes our improper operation will cause NetworkManager to configure automatically, so there is a conflict between the two. Possible reasons for this are: we shut down the virtual machine without shutting it down first or we don’t use the poweroff command to shut down the machine.

Solution:

Just turn off the NetworkManager service directly, that is, carry out the following steps:
solution 1:
①, service NetworkManager stop # turn off the NetworkManager service
②, chkconfig NetworkManager off # prohibit startup
③ restart the system

solution 2:
② Choose one of the following commands: (a temporary modification, a permanent modification)
systemctl stop networkmanager # temporarily close the service
systemctl disable networkmanager # permanently close the service
② restart the system

 

[Solved] Vue2.x vue-lazyload Error: Failed to resolve directive: lazy

Today, I want to realize the lazy loading of pictures. After registering components according to the tutorial, the console will report an error as above

The version in package.json is found to be the default downloaded version 3.0.0-rc.2

Solution:

Try to modify the version to 1.3.3

"dependencies": {
    "axios": "^0.27.2",
    "core-js": "^3.8.3",
    "element-ui": "^2.15.9",
    "vue-lazyload": "^1.3.3",
    "vue": "^2.6.14",
    "vue-router": "^3.1.3"
  },

Run, no more errors!

[Solved] Failed to load resource: the server responded with a status of 404 ()

Failed to load resource: the server responded with a status of 404 ()

There is a problem with server compilation. Some resources are not compiled in the server compilation and packaging, resulting in no accessed resources in the server.

Solution:

1. Put the resources that cannot be scanned into the corresponding location of the out folder

For example:

Put the folder at (1) on (2)

Method 2:

Repackage

[Vue warn]: Invalid prop: custom validator check failed for prop “index“

[Vue warn]: Invalid prop: custom validator check failed for prop “index“

Foreword: I am watching the background management project of bilibili, the error reporting problems encountered and the solutions

report errors:

Original code:

Modification code:

 <el-menu
    default-active="1-4-1"
    class="el-menu-vertical-demo"
    @open="handleOpen"
    @close="handleClose"
    :collapse="isCollapse"
  >
    <el-menu-item
      v-for="item in noChildren"
      :index="item.path"
      :key="item.path"
    >
      <i :class="'el-icon-' + item.icon"></i>
      <span slot="title">{{ item.label }}</span>
    </el-menu-item>
    <el-submenu
      v-for="item in hasChildren"
      :index="item.path + ''"
      :key="item.path"
    >
      <template slot="title">
        <i :class="'el-icon-' + item.icon"></i>
        <span slot="title">{{ item.label }}</span>
      </template>
      <el-menu-item-group
        v-for="(subItem, subIndex) in item.children"
        :key="item.path"
      >
        <el-menu-item :index="subIndex + ''">{{ subItem.label }}</el-menu-item>
      </el-menu-item-group>
    </el-submenu>
  </el-menu>

 

[Solved] Android12 Download Error: The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

Android12 install reports an error the application could not be installed: install_ PARSE_ FAILED_ MANIFEST_ MALFORMED

Solution:

For apps with Android12 as the adaptation platform, all four components that contain an intent-filter need to declare the android:exported attribute, and if the intent-filter contains LAUNCHER, it is best to declare it as android:exported= “true”

For example:

 <activity android:name=".MainActivity"
           android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
 </activity>

The four main components that use intent-filter can be viewed through the Merged Manifest in the manifest file

If you still get the error Installation failed due to: ‘-127’, try adding the following parameter to the manifest file

<permission-group android:name="${applicationId}.andpermission" />

 

[Vue warn]: Invalid prop: custom validator check failed for prop “navigationBarTextStyle“.

[Vue warn]: Invalid prop: custom validator check failed for prop “navigationBarTextStyle“.

uniapp,h5 interface report an error:

“globalStyle”: {
“navigationBarTextStyle”: “white”,
“navigationBarTitleText”: “uni-app”,
“navigationBarBackgroundColor”: “#ffaaff”,
“backgroundColor”: “#00ff00”,
“enablePullDownRefresh”: true,
“backgroundTextStyle”: “light”
}

 

Reason & Solution:

The navigationBarTextStyle property can only be filled with white or black, not with hexadecimal

 

[Solved] Nginx Restart Error: /run/nginx.pid failed (2: No such file or directory)

Nginx重启失败/run/nginx.pid failed (2: No such file or directory)

When deploying the project, an error is reported when restarting the nginx server after configuring the open port configuration

Go to the /run directory and find that there is no nginx.pid file.

Solution: enter etc/nginx/conf/nginx.conf file and modify the location of pid as below:

Disk Extended Error: WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

Error:

when formatting the partition of the Linux extended disk, if an error is reported:
warning: failed to re read the partition table, error 16: the device or resource is busy.

[root@ly host0]# fdisk /dev/sda -l

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

Solution:

Sync.
centos6
[root@ly ~]# partprobe /dev/sdb # centos6 has bugs that don't work well
[root@ly ~]# partx -a /dev/sdb # Add partition
[root@ly ~]# partx -d --nr 5-7 /dev/sdb # -d delete partition, --nr 6 specify range

centos5,7:
partprobe

 

[Solved] linux kernel load driver Error: module verification failed: signature and/or required key missing – tainting kernel

#insmod xx. ko

The following error reports

Cause of problem:

Since the 3.7 kernel, there has been a kernel signature mechanism.

When compiling the kernel, The options related to kernel signature in .config are as follows:

CONFIG_MODULE_SIG=y
CONFIG_MODULE_SIG_ALL=y

1. There is a method to sign Ko

/usr/src/linux-4.9.61/scripts/sign-file sha512 /usr/src/linux-4.9.61/certs/signing_key.pem /usr/src/linux-4.9.61/certs/signing_key.x509 hello.ko

 

2. The second method is to disable signing

Add it to your Makefile:

CONFIG_MODULE_SIG=n