小编kap*_*aps的帖子

SonarQube扫描仪执行出错[Windows - Linux Master-Slave]

我在Windows机器上运行SonarQube Server和Jenkins实例.

我创建了Jenkins工作以使用SonarQube生成代码覆盖率报告.这个工作在Linux机器上运行

  1. 构建代码
  2. 运行单元测试案例
  3. 运行声纳扫描仪

但后来我在詹金斯得到了错误

ERROR: Error during SonarQube Scanner execution
ERROR: Unable to execute SonarQube
ERROR: Caused by: Fail to get bootstrap index from server
ERROR: Caused by: Failed to connect to localhost/0:0:0:0:0:0:0:1:9000
Run Code Online (Sandbox Code Playgroud)

错误是正确的,因为我的服务器在Windows机器上运行而不是在Linux(127.0.0.1)上运行.

想知道如何解决这个问题?并在Windows上获得结果.可能吗 ?

jenkins sonarqube sonarqube-scan sonarscanner

5
推荐指数
1
解决办法
211
查看次数

getaddrinfo没有返回ipv6的详细信息

我面临的问题是ipv6 using getaddrinfo():

#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <arpa/inet.h>

int main()
{
        int soc = 00;
        struct addrinfo hints,*results,*res;
        hints.ai_family = AF_UNSPEC;
        hints.ai_socktype = SOCK_STREAM;
        hints.ai_protocol = IPPROTO_TCP;
        hints.ai_flags = AI_PASSIVE;

        int m = getaddrinfo("myhost","2018",&hints,&results);
        if (m<0)
        {
                printf("getaddrinfo error :  %s\n", gai_strerror(m));
                return 1;
        }
        res=results;
        do
        {
                if(res->ai_family == AF_INET6)
                {
                        struct sockaddr_in6* a= (struct sockaddr_in6*)res->ai_addr;
                        char straddr[INET6_ADDRSTRLEN];
                        inet_ntop(AF_INET6, &a->sin6_addr, straddr, sizeof(straddr)); …
Run Code Online (Sandbox Code Playgroud)

c++ sockets network-programming getaddrinfo

5
推荐指数
0
解决办法
431
查看次数