GVKun编程网logo

Nagios: NRPE configure error

15

这篇文章主要围绕Nagios:NRPEconfigureerror展开,旨在为您提供一份详细的参考资料。我们将全面介绍Nagios:NRPEconfigureerror,同时也会为您带来(error)

这篇文章主要围绕Nagios: NRPE configure error展开,旨在为您提供一份详细的参考资料。我们将全面介绍Nagios: NRPE configure error,同时也会为您带来(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on d、.net core 使用 ConfigurationManager 读取config配置文件、@Configuration+@ConfigurationProperties+@EnableConfigurationProperties、Appkey is not configured or configured incorrectly的实用方法。

本文目录一览:

Nagios: NRPE configure error

Nagios: NRPE configure error

编译nrpe时出现错误:

      checking for SSL headers... configure: error: Cannot find ssl headers

解决方法:

1.   ubuntu:

      1)  安装openssl和libssl-dev,如果已经安装,则用apt-file检查的libssl-dev的安装目录      

     (安装 apt-file:sudo apt-get install apt-file -y)

apt-file search libssl | grep libssl-dev
apt-file search libssl | grep libssl-dev
libssl-dev: /usr/lib/i386-linux-gnu/libssl.a
libssl-dev: /usr/lib/i386-linux-gnu/libssl.so
libssl-dev: /usr/lib/i386-linux-gnu/pkgconfig/libssl.pc
libssl-dev: /usr/share/doc/libssl-dev/changelog.Debian.gz
libssl-dev: /usr/share/doc/libssl-dev/changelog.gz
libssl-dev: /usr/share/doc/libssl-dev/copyright

   2) configure时指定:--with-ssl-lib=/usr/lib/i386-linux-gnu/

2.  centos 出现此错误

    1)  yum -y install openssl openssl-devel



(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on d

(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on d

(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.

redis设置了保存RDB快照,最后一次保存失败后,redis强制中断持久化到磁盘的操作

修改stop-writes-on-bgsave-error为no可以继续操作

(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
127.0.0.1:6379> set name artist
(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
127.0.0.1:6379> CONFIG SET stop-writes-on-bgsave-error no
OK
127.0.0.1:6379> set name artist
OK

.net core 使用 ConfigurationManager 读取config配置文件

.net core 使用 ConfigurationManager 读取config配置文件

1、dotnet core 默认不支持 ConfigurationManager ,需要单独应用。

nuget System.Configuration.ConfigurationManager

 

2、使用

ConfigurationManager.ConnectionStrings["xxxxx"].ConnectionString

ConfigurationManager.AppSettings["xxxx"]

 

参考:

https://docs.microsoft.com/zh-cn/ef/core/miscellaneous/connection-strings

 

@Configuration+@ConfigurationProperties+@EnableConfigurationProperties

@Configuration+@ConfigurationProperties+@EnableConfigurationProperties

 @Configuration+@ConfigurationProperties+@EnableConfigurationProperties

 

 

最佳设计方案(现在又改板了):

Bean上面直接设置@ConfigurationProperties

//需要依赖spring-boot-configuration-processor

@ConfigurationProperties(prefix = "stu")

public class Stu {

    String name;

 

    public Stu(String name) {

        this.name = name;

    }

 

    public Stu() {

    }

 

    public String getName() {

        return name;

    }

 

    public void setName(String name) {

        this.name = name;

    }

 

    @Override

    public String toString() {

        return "Stu{" +

                "name=''" + name + ''\'''' +

                ''}'';

    }

}

方式一:configuration上面跟随@EnableConfigurationProperties【这种情况只有configuration里面一个Bean 】

@Configuration

@EnableConfigurationProperties

public class StuConfiguration {

    @Bean

    public Stu stu(){

        return  new Stu();

    }

}

方式二:configuration上面跟随@EnableConfigurationProperties【这种情况只有configuration里面一个Bean 】

package com.example.demo11.configuration;

import com.example.demo11.entity.Stu;

import org.springframework.boot.context.properties.EnableConfigurationProperties;

import org.springframework.context.annotation.Bean;

import org.springframework.context.annotation.Configuration;

@Configuration

//@EnableConfigurationProperties(Stu.class),如果携带class参数则有用注册Bean的能力,

//因为实现了ImportBeanDefinitionRegistrar接口,Import三插之一

//这里的Bean名称非常有意思【类型名称+全包名】

@EnableConfigurationProperties(Stu.class)

public class StuConfiguration {

    @Bean

    public Stu stu2(){

        return  new Stu();

    }

}

启动查看

@SpringBootApplication

public class Demo11Application {

    public static void main(String[] args) {

        ConfigurableApplicationContext context = SpringApplication.run(Demo11Application.class, args);

        Stu stu = context.getBean("stu-com.example.demo11.entity.Stu", Stu.class);

        System.out.println(context.getBeansOfType(Stu.class).size());

        System.out.println(stu.toString());

        context.close();

    }

 

}

Appkey is not configured or configured incorrectly

Appkey is not configured or configured incorrectly

起因:

由于uniapp从2.5.1版本更新到3.1.18,相应替换了新版App离线打包SDK中的文件后(libs包下的lib.5plus.base-release.aar、uniapp-release.aar),当一切准备就绪后,启动APP,然而在登录界面的时候就出现“Appkey is not configured or configured incorrectly”。

排查过程

因为之前集成了极光推送SDK,所以第一反应就认为应该是极光推送SDK配置的appkey不正确,在确保程序的appkey和极光推送官网配置的appkey一样后,再次启动APP,还是出现同样的错误;直接大动干戈,将所有与极光推送有关的代码、配置、依赖全部注释掉,甚至还怀疑过NDK版本问题、SDK缓存问题等情况,做了一番调整后,再次启动APP,还是同样的错误。整个人接近崩溃,最后还是打算从源头找起,重新回到uniapp官网文档查看Android原生工程配置,让我看到了非常重要的一句话:

3.1.10版本起需要申请Appkey,具体请点击链接

最终按文档里的说明做了相应调整,启动APP,终于没问题了。

结论

Appkey is not configured or configured incorrectly”这里的"Appkey"并不是极光推送SDK的JPUSH_APPKEY(花了大量时间排查极光推送SDK做了无用功),而是3.1.10版本起需要申请Appkey才能够进行App离线打包。

常见问题

1、项目配置都正确怎么还是提示"未配置AppKey或配置错误"?

这种情况不用怀疑。还是安装包的信息与你在申请Appkey填写信息不符导致的。 appid+应用包名+签名sha1三者必须与申请填写的信息一致才可以的。

android平台 可以按一下步骤检查一下离线项目配置:

①、查看签名文件是否配置到了主APP的build.gradle。

②、查看离线项目中dcloud_control.xml文件中的appid是否与申请AppKey时的appid一致。

③、检测离线项目的包名是否申请AppKey时的包名是否一致。

④、编译完通过apk解压获取一下签名信息与申请AppKey时填写的SHA1一致。

更多内容请参考官网文档

1、原生工程配置->开发环境
2、App离线打包SDK

今天关于Nagios: NRPE configure error的分享就到这里,希望大家有所收获,若想了解更多关于(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on d、.net core 使用 ConfigurationManager 读取config配置文件、@Configuration+@ConfigurationProperties+@EnableConfigurationProperties、Appkey is not configured or configured incorrectly等相关知识,可以在本站进行查询。

本文标签: