SpringCloud 如何做到不同zone服务隔离 5C

业务需求:
全国各省都有相同系统,系统上配置省份标识,想在中心搭建一个springcloud注册中心,
各省系统不能交叉调用,如何通过不同的zone来控制访问,例如山东的服务请求下游服务,只能请求山东的服务,不能请求到河南。
请大神指点如何实现

3个回答

SpringCloudconfig不是可以使用git作为配置中心存储吗,你不同省份的保存到不同的文件夹下就可以了,

airfling
airfling 回复一壶酒: 动态的你就不要放到注解里面啦,你肯定要有个服务中心来管理所有的服务的,例如nginx服务器做路由,对外暴露肯定是一个服务的地址,最后只需要根据应用名来选择对应的服务即可
大约 2 年之前 回复
u010207995
阳光下的蝴蝶 回复airfling: 如果不同省相同的应用使用不同的应用名或者标识,在调用的时候应用名是写死在注解里的啊,怎么切换
大约 2 年之前 回复
u010207995
阳光下的蝴蝶 不是配置的问题,是山东的a服务只能访问依赖山东的b服务,不能因为山东b服务无响应而请求到河南的b服务
大约 2 年之前 回复
airfling
airfling 这个在spring cloud config里面是很容易配置,因为你要为每个系统配置应用名,标识,和版本号,都是可以配置的
大约 2 年之前 回复

SpringCloudconfig不是可以使用git作为配置中心存储吗,你不同省份的保存到不同的文件夹下就可以了,

u010207995
阳光下的蝴蝶 不是配置的问题,是山东的a服务只能访问依赖山东的b服务,不能因为山东b服务无响应而请求到河南的b服务
大约 2 年之前 回复

我也有类似的问题. 之前用dubbo 会有 group做分组. 不在一个组中的服务无法互相调用.
但是用eureka就不知道了 请高人指点

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
并发1000左右,数据优化
Linux服务器:64G内存、320G硬盘、20M带宽;nginx、PHP、MySQL MySQL数据量在1亿左右。现在并发是10000,宝塔后台负载状态一直都是100%,业务处理/数据访问比较多【数据库增删改查频繁】。服务器运行一段时间之后MySQL崩溃了,重启MySQL之后,命令链接mysql -uroot -p 输入密码后需要很久才能连接到数据库,有时还会卡死导致无法连接数据库。 nginx配置图 ``` user www www; worker_processes auto; error_log /www/wwwlogs/nginx_error.log crit; pid /www/server/nginx/logs/nginx.pid; worker_rlimit_nofile 51200; events { use epoll; worker_connections 51200; multi_accept on; } http { include mime.types; #include luawaf.conf; include proxy.conf; default_type application/octet-stream; server_names_hash_bucket_size 512; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 50m; sendfile on; tcp_nopush on; keepalive_timeout 60; tcp_nodelay on; fastcgi_connect_timeout 100; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 256k; fastcgi_intercept_errors on; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 2; gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml; gzip_vary on; gzip_proxied expired no-cache no-store private auth; gzip_disable "MSIE [1-6]\."; limit_conn_zone $binary_remote_addr zone=perip:10m; limit_conn_zone $server_name zone=perserver:10m; server_tokens off; access_log off; ``` MySQL配置文件 ``` #password = your_password port = 3306 socket = /mysql_log/mysql.sock [mysqld] binlog_cache_size = 256K thread_stack = 512K join_buffer_size = 8192K query_cache_type = 0 max_heap_table_size = 2048M port = 3306 socket = /mysql_log/mysql.sock datadir = /www/server/data default_storage_engine = InnoDB performance_schema_max_table_instances = 400 table_definition_cache = 400 skip-external-locking key_buffer_size = 1024M max_allowed_packet = 100G table_open_cache = 2048 sort_buffer_size = 4096K net_buffer_length = 4K read_buffer_size = 4096K read_rnd_buffer_size = 2048K myisam_sort_buffer_size = 256M thread_cache_size = 256 query_cache_size = 0M tmp_table_size = 2048M sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES explicit_defaults_for_timestamp = true #skip-name-resolve max_connections = 500 max_connect_errors = 100 open_files_limit = 65535 wait_timeout=100 interactive_timeout=100 #log-bin=mysql-bin #binlog_format=mixed server-id = 1 expire_logs_days = 1 slow_query_log=1 slow-query-log-file=/www/server/data/mysql-slow.log long_query_time=3 #log_queries_not_using_indexes=on early-plugin-load = "" innodb_data_home_dir = /www/server/data innodb_data_file_path = ibdata1:10M:autoextend innodb_log_group_home_dir = /www/server/data innodb_buffer_pool_size = 4096M innodb_log_file_size = 2048M innodb_log_buffer_size = 0M innodb_flush_log_at_trx_commit = 1 innodb_lock_wait_timeout = 50 innodb_max_dirty_pages_pct = 90 innodb_read_io_threads = 32 innodb_write_io_threads = 32 [mysqldump] quick max_allowed_packet = 500M [mysql] no-auto-rehash [myisamchk] key_buffer_size = 1024M sort_buffer_size = 16M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] #interactive-timeout ```
Java连接数据库连接不上出现时区错误代码都没问题,Mysq server版本也没问题
连接数据库连接不上,代码找不到错误,说时区错误,Mysql server 5.5版本的也没问题,在别人电脑也不能运行 详细错误, Exception in thread "main" java.sql.SQLException: The server time zone value '?й???????' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support. at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:76) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836) at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456) at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at com.mysql.cj.jdbc.admin.TimezoneDump.main(TimezoneDump.java:70) Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value '?й???????' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:85) at com.mysql.cj.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:132) at com.mysql.cj.protocol.a.NativeProtocol.configureTimezone(NativeProtocol.java:2121) at com.mysql.cj.protocol.a.NativeProtocol.initServerSession(NativeProtocol.java:2145) at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:1310) at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:967) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826) ... 6 more
How Far Can Drive At Most 具体代码实现
Problem Description Now I am going to drive on a street. The street is a straight line. It will cost me one unit oil per meter. And my car can contain V units at most. Unfortunately some zones of the street have been damaged badly. The number of damaged zones is Q. One zone is represented as (l, r, C), means the zone between l to r is damaged, and it will cost me another C units of oil per peter. Please notice that zones may intersect. My question is how far can I drive at most. Input Several cases(cases <= 10). The first line is the case number T. Then T cases follow. For each case : First line two integers l (indicating the length of the street) and V (indicating the amount of oil my car can contain at most when I start)(1 <= len, V <= 10 ^ 9). Second line of each case is an integer Q (0 <= Q <= 50000). Then Q lines follow, each with three integers (l, r, C), means the zone between l to r has been damaged and it will cost me another C units of oil per meter(1 <= l < r <= len, 1 <= C <= 100). (If you still can not understand the details, please see the hint.) Output For each case, print the farthest I can drive, and output it with exactly two digits after the decimal point. Sample Input 2 100 100 2 10 20 5 10 30 14 1000 10000 3 10 20 4 10 30 14 10 15 5 Sample Output 14.50 1000.00
John's Canonical Difference Bound Matrices 的程序
Problem Description When John studied the timed automaton, he met the problem about how to trigger the machine. With the problem deeply studied, he found that it can be ascribed to the clock constraints of the timed automaton. The timed automation in question is described below: The clock variables, or simply clocks, are variables whose values are integers. Of course, time passes at the same rate for all clocks, and any clock can be reset to zero. John uses C to denote the finite set of clocks, and defines the clock constraints for C as follows: (1) All inequalities of the form t#c or c#t are clock constraints, where t is a clock, # is either < or <= , and c is an integer. (2) If A1 and A2 are clock constraints, then A1 ^ A2 is a clock constraint. John notes that a clock constraint can define several regions in some multidimensional space. He wants to know such regions, so he defines the clock zones recursively as follows. For simplicity, he let C0 = C {x0} , where x0 is a reference clock whose value is always 0. The clock zone A can be described by a Difference Bound Matrix D (called a DBM) which is a matrix (Dij) of size | C0|×| C0| . Each Dij has the form (dij,#) , where dij Z {$} , # { < ,<=} . The value of Dij can be evaluated in the following form: For every inequality xi - xj#dij in clock zone A , let Dij = (dij,#) , where xi and xj are two clocks. If the bound of xi - xj for xi and xj is unknown, let Dij = ($, < ) . For example, DBM of the clock zone given by x1 - x2 < 2 ^ 0 < x2<=2 ^ 1<=x1 is shown below: The representation of a clock zone by a DBM is not unique. In this example, there are some implied constraints that are not reflected in the DBM. Since x1 - x2 < 2 and x2<=2 , it must be the case x1 < 4 . Since x0 = 0 , the original D10 = ($, < ) can be changed into D10 = (4, < ) . Such adjusting operation is called the tighten operation. Now John wants to do the similar adjusting operations of difference bounds for all clocks xi and xj until further application of this tighten operation does not change the matrix. John obtains the following new canonical difference bound matrix: Note that some clock zone may contain contrary conditions and has not canonical difference bound matrix. But John can not obtain a canonical difference bound matrix for a complex clock zone. He asks for your help. Input The first line of the input file is a single integer T (1<=T<=20) , which is the number of test cases you must process, followed by T test cases: Each test case consists of several lines. Four integers i , j , d and r are given on each line, representing a constraint xi - xj < d or xi - xj<=d (0<=i, j<=m, -10000 < d < 10000) . If r = 0 , then this line represents an inequality in the form of xi - xj < d , otherwise it represents an inequality in the form of xi - xj<=d . The maximal index m of clocks indicates that the indexes of the clocks are 0, 1,..., m,(1<=m<=100) . Note that you have to get the value of m by yourself. A symbol # given on a single line indicates the end of a test case. Output For each test case, first output ``Case #:" on a single line, where # is the case number starting from 1. Print a blank line after each test case. For each test case, output the description of the canonical difference bound matrix. If it doesn't have a canonical difference bound matrix, print ``Canonical DBM does not exist." (without quotes); If it has a such canonical difference bound matrix, print the matrix in the format as indicated in the sample output. Every element Dij of the matrix should be written in the form (dij,#) , where # is either < or <=. If the bound of xi - xj for xi and xj is unknown, print ($,<) at the position (i, j) . Two consecutive elements on each row should be separated by a single space. Sample Input 1 1 2 2 0 0 2 0 0 2 0 2 1 0 1 -1 1 # Sample Output Case 1: (0,<=) (-1,<=) (0,<) (4,<) (0,<=) (2,<) (2,<=) (1,<=) (0,<=)
关于IO ZONE是否能进行断电继续测试的问题
请问一下,有人用过IO Zone测试稳定性吗?想请教个问题,IO ZONE有断电后开机继续上次中断的测试这个功能吗?因为我看了说明认知是没这个功能,但上面的人听说有这个功能?所以想请问下熟悉这个的大佬下。谢谢
Bus Pass 的算法问题
Problem Description You travel a lot by bus and the costs of all the seperate tickets are starting to add up. Therefore you want to see if it might be advantageous for you to buy a bus pass. The way the bus system works in your country (and also in the Netherlands) is as follows: when you buy a bus pass, you have to indicate a center zone and a star value. You are allowed to travel freely in any zone which has a distance to your center zone which is less than your star value. For example, if you have a star value of one, you can only travel in your center zone. If you have a star value of two, you can also travel in all adjacent zones, et cetera. You have a list of all bus trips you frequently make, and would like to determine the minimum star value you need to make all these trips using your buss pass. But this is not always an easy task. For example look at the following figure: Here you want to be able to travel from A to B and from B to D. The best center zone is 7400, for which you only need a star value of 4. Note that you do not even visit this zone on your trips! Input On the first line an integert(1 <=t<= 100): the number of test cases. Then for each test case: One line with two integersnz(2 <=nz<= 9 999) andnr(1 <=nr<= 10): the number of zones and the number of bus trips, respectively. nz lines starting with two integers idi (1 <= idi <= 9 999) and mzi (1 <= mzi <= 10), a number identifying the i-th zone and the number of zones adjacent to it, followed by mzi integers: the numbers of the adjacent zones. nr lines starting with one integer mri (1 <= mri <= 20), indicating the number of zones the ith bus trip visits, followed by mri integers: the numbers of the zones through which the bus passes in the order in which they are visited. All zones are connected, either directly or via other zones. Output For each test case: One line with two integers, the minimum star value and the id of a center zone which achieves this minimum star value. If there are multiple possibilities, choose the zone with the lowest number. Sample Input 1 17 2 7400 6 7401 7402 7403 7404 7405 7406 7401 6 7412 7402 7400 7406 7410 7411 7402 5 7412 7403 7400 7401 7411 7403 6 7413 7414 7404 7400 7402 7412 7404 5 7403 7414 7415 7405 7400 7405 6 7404 7415 7407 7408 7406 7400 7406 7 7400 7405 7407 7408 7409 7410 7401 7407 4 7408 7406 7405 7415 7408 4 7409 7406 7405 7407 7409 3 7410 7406 7408 7410 4 7411 7401 7406 7409 7411 5 7416 7412 7402 7401 7410 7412 6 7416 7411 7401 7402 7403 7413 7413 3 7412 7403 7414 7414 3 7413 7403 7404 7415 3 7404 7405 7407 7416 2 7411 7412 5 7409 7408 7407 7405 7415 6 7415 7404 7414 7413 7412 7416 Sample Output 4 7400
springcloud zookeeper注册中心,在客服端用restTemplate 访问,第一次访问正常,第二次以后都是失败
springcloud zookeeper注册中心,在客服端用restTemplate 访问,第一次访问正常,第二次以后都是失败: 配置以及主要代码如下: 服务端: ``` 配置: server.port=8082 spring.application.name=service-zookeeper spring.cloud.zookeeper.discovery.register=true spring.cloud.zookeeper.discovery.enabled=true spring.cloud.zookeeper.discovery.root=/spring-cloud-service spring.cloud.zookeeper.connect-string=cdh01.com:2181,cdh02.com:2181,cdh03.com:2181 java: @RequestMapping(value ="/index") @ResponseBody public AjaxView index(@RequestBody String jsoninfo,HttpServletRequest request, HttpServletResponse response){ 。。。 } ``` 客户端: ``` server.port=8081 spring.application.name=getway-zookeeper spring.cloud.zookeeper.discovery.register=false spring.cloud.zookeeper.discovery.enabled=true spring.cloud.zookeeper.discovery.root=/spring-cloud-service spring.cloud.zookeeper.connect-string=cdh01.com:2181,cdh02.com:2181,cdh03.com:2181 spring.cloud.zookeeper.dependencies.service-zookeeper.required=true spring.cloud.zookeeper.dependencies.service-zookeeper.path=/service-zookeeper spring.cloud.zookeeper.dependencies.service-zookeeper.loadBalancerType=ROUND_ROBIN feign.hystrix.enabled=true ``` JAVA代码: ``` @RequestMapping(value ="/api/{service_name}/{interface_name}") @ResponseBody public String getApiSend( @RequestBody String jsoninfo, @PathVariable String service_name, @PathVariable String interface_name) { String get_url ="http://"+service_name+"/"+interface_name; return backService.getApiSend(jsoninfo,get_url); } ``` 都启动成功后,第一次访问正常,第二次访问就报错了,报错提示没有找到服务列表,但是服务列表确实打印出来了。如下: No up servers available from load balancer ,因为这个提示,没有服务,后续就报错空指针了。但是确实有服务查询到。而且DEBUG也打印出来了。 ``` 2019-05-19 14:37:55.547 WARN 164828 --- [nio-8081-exec-9] com.netflix.loadbalancer.RoundRobinRule : No up servers available from load balancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=service-zookeeper,current list of Servers=[zhucj:8082],Load balancer stats=Zone stats: {unknown=[Zone:unknown; Instance count:1; Active connections count: 0; Circuit breaker tripped count: 0; Active connections per server: 0.0;] },Server stats: [[Server:zhucj:8082; Zone:UNKNOWN; Total Requests:0; Successive connection failure:0; Total blackout seconds:0; Last connection made:Thu Jan 01 08:00:00 CST 1970; First connection made: Thu Jan 01 08:00:00 CST 1970; Active Connections:0; total failure count in last (1000) msecs:0; average resp time:0.0; 90 percentile resp time:0.0; 95 percentile resp time:0.0; min resp time:0.0; max resp time:0.0; stddev resp time:0.0] ]}ServerList:org.springframework.cloud.zookeeper.discovery.ZookeeperServerList@28667be9 [DEBUG][2019/05/1914:37:55549 ][org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:136)] Resolving exception from handler [public java.lang.String com.example.demo.controller.PageController.getApiSend(java.lang.String,java.lang.String,java.lang.String)]: java.lang.NullPointerException [DEBUG][2019/05/1914:37:55552 ][org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:136)] Resolving exception from handler [public java.lang.String com.example.demo.controller.PageController.getApiSend(java.lang.String,java.lang.String,java.lang.String)]: java.lang.NullPointerException [DEBUG][2019/05/1914:37:55555 ][org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:136)] Resolving exception from handler [public java.lang.String com.example.demo.controller.PageController.getApiSend(java.lang.String,java.lang.String,java.lang.String)]: java.lang.NullPointerException [DEBUG][2019/05/1914:37:55558 ][org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:993)] Could not complete request java.lang.NullPointerException at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:192) at com.google.common.cache.LocalCache.get(LocalCache.java:3931) at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3936) at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4806) at com.netflix.loadbalancer.LoadBalancerStats.getServerStats(LoadBalancerStats.java:175) at com.netflix.loadbalancer.LoadBalancerStats.getSingleServerStat(LoadBalancerStats.java:362) at com.netflix.loadbalancer.AvailabilityPredicate.apply(AvailabilityPredicate.java:73) at com.netflix.loadbalancer.AvailabilityPredicate.apply(AvailabilityPredicate.java:35) at com.netflix.loadbalancer.CompositePredicate.apply(CompositePredicate.java:52) at com.netflix.loadbalancer.CompositePredicate.apply(CompositePredicate.java:40) at com.netflix.loadbalancer.AvailabilityFilteringRule.choose(AvailabilityFilteringRule.java:86) at org.springframework.cloud.zookeeper.discovery.dependency.DependenciesBasedLoadBalancer.chooseServer(DependenciesBasedLoadBalancer.java:64) at org.springframework.cloud.zookeeper.discovery.dependency.DependencyRibbonAutoConfiguration$1.chooseServerByServiceIdOrDefault(DependencyRibbonAutoConfiguration.java:72) at org.springframework.cloud.zookeeper.discovery.dependency.DependencyRibbonAutoConfiguration$1.getServer(DependencyRibbonAutoConfiguration.java:65) at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.choose(RibbonLoadBalancerClient.java:76) at org.springframework.cloud.client.loadbalancer.InterceptorRetryPolicy.canRetry(InterceptorRetryPolicy.java:53) at org.springframework.retry.support.RetryTemplate.canRetry(RetryTemplate.java:375) at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:278) at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:180) at org.springframework.cloud.client.loadbalancer.RetryLoadBalancerInterceptor.intercept(RetryLoadBalancerInterceptor.java:67) at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:92) at org.springframework.cloud.zookeeper.discovery.dependency.DependencyRestTemplateAutoConfiguration$1.intercept(DependencyRestTemplateAutoConfiguration.java:67) at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:92) at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:76) at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:723) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:680) at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:466) at com.example.demo.util.WebUtil.SendPost(WebUtil.java:86) at com.example.demo.service.BackService.getApiSend(BackService.java:18) at com.example.demo.controller.PageController.getApiSend(PageController.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877) at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:158) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:126) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:111) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) [DEBUG][2019/05/1914:37:55574 ][org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:104)] Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@46dfd3ba 2019-05-19 14:37:55.585 ERROR 164828 --- [nio-8081-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause ``` 请帮忙看看,谢谢。
在配置zone安全策略是信任区无法访问dmz区和非信任区??
Router>en Router#conft Enterconfiguration commands, one per line. End with CNTL/Z. Router(config)#access-list111 permit tcp 192.1.1.0 0.0.0.255 host 192.1.2.2 Router(config)#class-maptype inspect match-all trust-dmz-http Router(config-cmap)#matchaccess-group 111 Router(config-cmap)#matchprotocol http Router(config-cmap)#exit Router(config)#policy-maptype inspect trust-dmz Router(config-pmap)#classtype inspect trust-dmz-http Router(config-pmap-c)#inspect %Nospecific protocol configured in class trust-dmz-http for inspection. Allprotocols will be inspected Router(config-pmap-c)#exit Router(config)#access-list121 permit tcp 192.1.1.0 0.0.0.255 host 192.1.3.2 Router(config)#class-maptype inspect match-all trust-notrust Router(config-cmap)#matchaccess-group 121 Router(config-cmap)#matchprotocol http Router(config-cmap)#exit Router(config)#policy-maptype inspect trust-notrust Router(config-pmap)#classtype inspect trust-notrust Router(config-pmap-c)#inspect %Nospecific protocol configured in class trust-notrust for inspection. Allprotocols will be inspected Router(config-pmap-c)#exit Router(config-pmap)#exit Router(config)#access-list131 permit tcp 192.1.2.0 0.0.0.255 host192.1.3.2 Router(config)#class-maptype inspect match-all dmz-notrust Router(config-cmap)#matchaccess-group 131 Router(config-cmap)#matchprotocol http Router(config-cmap)#exit Router(config)#policy-maptype inspect dmz-notrust Router(config-pmap)#classtype inspect dmz-notrust Router(config-pmap-c)#inspect %Nospecific protocol configured in class dmz-notrust for inspection. All protocolswill be inspected Router(config-pmap-c)#exit Router(config-pmap)#exit Router(config)#access-list141 permit tcp 192.1.3.0 0.0.0.255 host192.1.2.2 Router(config)#class-maptype inspect match-all notrust-dmz Router(config-cmap)#matchaccess-group 141 Router(config-cmap)#matchprotocol http Router(config-cmap)#exit Router(config-pmap)#policy-maptype inspect notrust-dmz Router(config-pmap)#classtype inspect notrust-dmz Router(config-pmap-c)#inspect %Nospecific protocol configured in class notrust-dmz for inspection. All protocolswill be inspected Router(config-pmap-c)#exit Router(config-pmap)#exit Router(config)#zonesecurity trust Router(config-sec-zone)#exit Router(config)#zonesecurity notrust Router(config-sec-zone)#exit Router(config)#zonesecurity dmz Router(config-sec-zone)#exit Router(config)#interfacefa 0/0 Router(config-if)#zone-membersecurity trust Router(config-if)#exit Router(config)#interfacefa 0/1 Router(config-if)#zone-membersecurity notrust Router(config-if)#exit Router(config)#interfacefa 1/0 Router(config-if)#zone-membersecurity dmz Router(config-if)#exit Router(config)#zone-pairsecurity trust-dmz source trust destination dmz Router(config-sec-zone-pair)#service-policytype inspect trust-dmz Router(config-sec-zone-pair)#exit Router(config)#zone-pairsecurity trust-notrust source trust destination notrust Router(config-sec-zone-pair)#service-policytype inspect trust-notrust Router(config-sec-zone-pair)#exit Router(config)#zone-pairsecurity notrust-dmz source notrust destination dmz Router(config-sec-zone-pair)#service-policytype inspect notrust-dmz Router(config-sec-zone-pair)#exit Router(config)#zone-pairsecurity dmz-notrust source dmz destination notrust Router(config-sec-zone-pair)#service-policytype inspect dmz-notrust Router(config-sec-zone-pair)#exit Router(config)#
博科brocade 光纤交换机通过SNMP获取zone的信息用什么OID啊?
下载了8.02版的mib,FC端口的WWN已经能拿到, 可是找不到获取zone信息的oid 求高手指教
nginx的 limit_req_zone问题
http { .... limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s; ... } server { ... location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css)$ { ... expires 7d; } location / { limit_req zone=one ; root html; index index.html index.jsp; ... } } 这是配置文件,可是1秒发了第二个请求就显示503(总共发了好几个,不过非js.css.jpg等请求只有两个(是不同的请求)),我在limit_req zone=one 后面加上burst=1就可以了,我看了nginx的文档的意思,rate=10r/s;应该就是允许一秒10个,超过10个才跟burst有关,为什么rate=10r/s没起作用 更多 0
Cliff Climbing 的编程的问题
Problem Description At 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety zone. Jack has to climb the almost vertical cliff by stepping his feet on the blocks that cover the cliff. The cliff has slippery blocks where Jack has to spend time to take each step. He also has to bypass some blocks that are too loose to support his weight. Your mission is to write a program that calculates the minimum time to complete climbing. Figure D-1 shows an example of cliff data that you will receive. The cliff is covered with square blocks. Jack starts cliff climbing from the ground under the cliff, by stepping his left or right foot on one of the blocks marked with 'S' at the bottom row. The numbers on the blocks are the "slippery levels". It takes t time units for him to safely put his foot on a block marked with t, where 1 ≤ t ≤ 9. He cannot put his feet on blocks marked with 'X'. He completes the climbing when he puts either of his feet on one of the blocks marked with 'T' at the top row. Figure D-1: Example of Cliff Data Jack's movement must meet the following constraints. After putting his left (or right) foot on a block, he can only move his right (or left, respectively) foot. His left foot position (lx, ly) and his right foot position (rx, ry) should satisfy lx < rx and | lx - rx | + | ly - ry | ≤ 3. This implies that, given a position of his left foot in Figure D-2 (a), he has to place his right foot on one of the nine blocks marked with blue color. Similarly, given a position of his right foot in Figure D-2 (b), he has to place his left foot on one of the nine blocks marked with blue color. Figure D-2: Possible Placements of Feet Input The input is a sequence of datasets. The end of the input is indicated by a line containing two zeros separated by a space. Each dataset is formatted as follows: w h s(1,1) ... s(1,w) s(2,1) ... s(2,w) ... s(h,1) ... s(h,w) The integers w and h are the width and the height of the matrix data of the cliff. You may assume 2 ≤ w ≤ 30 and 5 ≤ h ≤ 60. Each of the following h lines consists of w characters delimited by a space. The character s(y, x) represents the state of the block at position (x, y) as follows: * 'S': Jack can start cliff climbing from this block. * 'T': Jack finishes climbing when he reaches this block. * 'X': Jack cannot put his feet on this block. * '1' - '9' (= t): Jack has to spend t time units to put either of his feet on this block.   You can assume that it takes no time to put a foot on a block marked with 'S' or 'T'. Output For each dataset, print a line only having a decimal integer indicating the minimum time required for the cliff climbing, when Jack can complete it. Otherwise, print a line only having "-1" for the dataset. Each line should not have any characters other than these numbers. Sample Input 6 6 4 4 X X T T 4 7 8 2 X 7 3 X X X 1 8 1 2 X X X 6 1 1 2 4 4 7 S S 2 3 X X 2 10 T 1 1 X 1 X 1 X 1 1 1 X 1 X 1 1 1 X S S 2 10 T X 1 X 1 X 1 X 1 1 1 X 1 X 1 1 1 X S S 10 10 T T T T T T T T T T X 2 X X X X X 3 4 X 9 8 9 X X X 2 9 X 9 7 7 X 7 3 X X 8 9 X 8 9 9 9 6 3 X 5 X 5 8 9 9 9 6 X X 5 X 5 8 6 5 4 6 8 X 5 X 5 8 9 3 9 6 8 X 5 X 5 8 3 9 9 6 X X X 5 X S S S S S S S S S S 10 7 2 3 2 3 2 3 2 3 T T 1 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 4 3 2 3 2 3 2 3 2 3 5 3 2 3 1 3 2 3 2 3 5 2 2 3 2 4 2 3 2 3 5 S S 2 3 2 1 2 3 2 3 0 0 Sample Output 12 5 -1 22 12
Cliff Climbing 具体的代码
Problem Description At 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety zone. Jack has to climb the almost vertical cliff by stepping his feet on the blocks that cover the cliff. The cliff has slippery blocks where Jack has to spend time to take each step. He also has to bypass some blocks that are too loose to support his weight. Your mission is to write a program that calculates the minimum time to complete climbing. Figure D-1 shows an example of cliff data that you will receive. The cliff is covered with square blocks. Jack starts cliff climbing from the ground under the cliff, by stepping his left or right foot on one of the blocks marked with 'S' at the bottom row. The numbers on the blocks are the "slippery levels". It takes t time units for him to safely put his foot on a block marked with t, where 1 ≤ t ≤ 9. He cannot put his feet on blocks marked with 'X'. He completes the climbing when he puts either of his feet on one of the blocks marked with 'T' at the top row. Figure D-1: Example of Cliff Data Jack's movement must meet the following constraints. After putting his left (or right) foot on a block, he can only move his right (or left, respectively) foot. His left foot position (lx, ly) and his right foot position (rx, ry) should satisfy lx < rx and | lx - rx | + | ly - ry | ≤ 3. This implies that, given a position of his left foot in Figure D-2 (a), he has to place his right foot on one of the nine blocks marked with blue color. Similarly, given a position of his right foot in Figure D-2 (b), he has to place his left foot on one of the nine blocks marked with blue color. Figure D-2: Possible Placements of Feet Input The input is a sequence of datasets. The end of the input is indicated by a line containing two zeros separated by a space. Each dataset is formatted as follows: w h s(1,1) ... s(1,w) s(2,1) ... s(2,w) ... s(h,1) ... s(h,w) The integers w and h are the width and the height of the matrix data of the cliff. You may assume 2 ≤ w ≤ 30 and 5 ≤ h ≤ 60. Each of the following h lines consists of w characters delimited by a space. The character s(y, x) represents the state of the block at position (x, y) as follows: * 'S': Jack can start cliff climbing from this block. * 'T': Jack finishes climbing when he reaches this block. * 'X': Jack cannot put his feet on this block. * '1' - '9' (= t): Jack has to spend t time units to put either of his feet on this block.   You can assume that it takes no time to put a foot on a block marked with 'S' or 'T'. Output For each dataset, print a line only having a decimal integer indicating the minimum time required for the cliff climbing, when Jack can complete it. Otherwise, print a line only having "-1" for the dataset. Each line should not have any characters other than these numbers. Sample Input 6 6 4 4 X X T T 4 7 8 2 X 7 3 X X X 1 8 1 2 X X X 6 1 1 2 4 4 7 S S 2 3 X X 2 10 T 1 1 X 1 X 1 X 1 1 1 X 1 X 1 1 1 X S S 2 10 T X 1 X 1 X 1 X 1 1 1 X 1 X 1 1 1 X S S 10 10 T T T T T T T T T T X 2 X X X X X 3 4 X 9 8 9 X X X 2 9 X 9 7 7 X 7 3 X X 8 9 X 8 9 9 9 6 3 X 5 X 5 8 9 9 9 6 X X 5 X 5 8 6 5 4 6 8 X 5 X 5 8 9 3 9 6 8 X 5 X 5 8 3 9 9 6 X X X 5 X S S S S S S S S S S 10 7 2 3 2 3 2 3 2 3 T T 1 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 4 3 2 3 2 3 2 3 2 3 5 3 2 3 1 3 2 3 2 3 5 2 2 3 2 4 2 3 2 3 5 S S 2 3 2 1 2 3 2 3 0 0 Sample Output 12 5 -1 22 12
研旭28335一体板配用xds200仿真器遇到- BEGIN memory range overlaps - BEGIN memory range has already been等问题
1、使用研旭28335一体板配用xds200仿真器,运行时遇到报错如下 是缺少了什么文件还是配置问题呢? ![图片说明](https://img-ask.csdn.net/upload/201910/27/1572166673_556805.jpg) 配置如下 ![图片说明](https://img-ask.csdn.net/upload/201910/27/1572166846_353238.jpg) ``` "../CMD/28335_RAM_lnk.cmd", line 15: error: BEGIN memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 15: error: BEGIN memory range overlaps existing memory range BEGIN "../CMD/28335_RAM_lnk.cmd", line 17: error: RAMM0 memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 17: error: RAMM0 memory range overlaps existing memory range RAMM0 "../CMD/28335_RAM_lnk.cmd", line 24: error: RAML memory range overlaps existing memory range RAML0 "../CMD/28335_RAM_lnk.cmd", line 24: error: RAML memory range overlaps existing memory range RAML1 "../CMD/28335_RAM_lnk.cmd", line 24: error: RAML memory range overlaps existing memory range RAML2 "../CMD/28335_RAM_lnk.cmd", line 24: error: RAML memory range overlaps existing memory range RAML3 "../CMD/28335_RAM_lnk.cmd", line 25: error: ZONE7A memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 25: error: ZONE7A memory range overlaps existing memory range ZONE7A "../CMD/28335_RAM_lnk.cmd", line 26: error: CSM_RSVD memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 26: error: CSM_RSVD memory range overlaps existing memory range CSM_RSVD "../CMD/28335_RAM_lnk.cmd", line 27: error: CSM_PWL memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 27: error: CSM_PWL memory range overlaps existing memory range CSM_PWL "../CMD/28335_RAM_lnk.cmd", line 28: error: ADC_CAL memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 28: error: ADC_CAL memory range overlaps existing memory range ADC_CAL "../CMD/28335_RAM_lnk.cmd", line 29: error: RESET memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 29: error: RESET memory range overlaps existing memory range RESET "../CMD/28335_RAM_lnk.cmd", line 30: error: IQTABLES memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 30: error: IQTABLES memory range overlaps existing memory range IQTABLES "../CMD/28335_RAM_lnk.cmd", line 31: error: IQTABLES2 memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 31: error: IQTABLES2 memory range overlaps existing memory range IQTABLES2 "../CMD/28335_RAM_lnk.cmd", line 32: error: FPUTABLES memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 32: error: FPUTABLES memory range overlaps existing memory range FPUTABLES "../CMD/28335_RAM_lnk.cmd", line 33: error: BOOTROM memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 33: error: BOOTROM memory range overlaps existing memory range BOOTROM "../CMD/28335_RAM_lnk.cmd", line 37: error: RAMM memory range overlaps existing memory range RAMM1 "../CMD/28335_RAM_lnk.cmd", line 44: error: RAMH memory range overlaps existing memory range RAML4 "../CMD/28335_RAM_lnk.cmd", line 44: error: RAMH memory range overlaps existing memory range RAML5 "../CMD/28335_RAM_lnk.cmd", line 44: error: RAMH memory range overlaps existing memory range RAML6 "../CMD/28335_RAM_lnk.cmd", line 44: error: RAMH memory range overlaps existing memory range RAML7 "../CMD/28335_RAM_lnk.cmd", line 45: error: ZONE7B memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 45: error: ZONE7B memory range overlaps existing memory range ZONE7B error: errors encountered during linking; "LED.out" not built ```
Cliff Climbing 程序求助
Problem Description At 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety zone. Jack has to climb the almost vertical cliff by stepping his feet on the blocks that cover the cliff. The cliff has slippery blocks where Jack has to spend time to take each step. He also has to bypass some blocks that are too loose to support his weight. Your mission is to write a program that calculates the minimum time to complete climbing. Figure D-1 shows an example of cliff data that you will receive. The cliff is covered with square blocks. Jack starts cliff climbing from the ground under the cliff, by stepping his left or right foot on one of the blocks marked with 'S' at the bottom row. The numbers on the blocks are the "slippery levels". It takes t time units for him to safely put his foot on a block marked with t, where 1 ≤ t ≤ 9. He cannot put his feet on blocks marked with 'X'. He completes the climbing when he puts either of his feet on one of the blocks marked with 'T' at the top row. Figure D-1: Example of Cliff Data Jack's movement must meet the following constraints. After putting his left (or right) foot on a block, he can only move his right (or left, respectively) foot. His left foot position (lx, ly) and his right foot position (rx, ry) should satisfy lx < rx and | lx - rx | + | ly - ry | ≤ 3. This implies that, given a position of his left foot in Figure D-2 (a), he has to place his right foot on one of the nine blocks marked with blue color. Similarly, given a position of his right foot in Figure D-2 (b), he has to place his left foot on one of the nine blocks marked with blue color. Figure D-2: Possible Placements of Feet Input The input is a sequence of datasets. The end of the input is indicated by a line containing two zeros separated by a space. Each dataset is formatted as follows: w h s(1,1) ... s(1,w) s(2,1) ... s(2,w) ... s(h,1) ... s(h,w) The integers w and h are the width and the height of the matrix data of the cliff. You may assume 2 ≤ w ≤ 30 and 5 ≤ h ≤ 60. Each of the following h lines consists of w characters delimited by a space. The character s(y, x) represents the state of the block at position (x, y) as follows: * 'S': Jack can start cliff climbing from this block. * 'T': Jack finishes climbing when he reaches this block. * 'X': Jack cannot put his feet on this block. * '1' - '9' (= t): Jack has to spend t time units to put either of his feet on this block.   You can assume that it takes no time to put a foot on a block marked with 'S' or 'T'. Output For each dataset, print a line only having a decimal integer indicating the minimum time required for the cliff climbing, when Jack can complete it. Otherwise, print a line only having "-1" for the dataset. Each line should not have any characters other than these numbers. Sample Input 6 6 4 4 X X T T 4 7 8 2 X 7 3 X X X 1 8 1 2 X X X 6 1 1 2 4 4 7 S S 2 3 X X 2 10 T 1 1 X 1 X 1 X 1 1 1 X 1 X 1 1 1 X S S 2 10 T X 1 X 1 X 1 X 1 1 1 X 1 X 1 1 1 X S S 10 10 T T T T T T T T T T X 2 X X X X X 3 4 X 9 8 9 X X X 2 9 X 9 7 7 X 7 3 X X 8 9 X 8 9 9 9 6 3 X 5 X 5 8 9 9 9 6 X X 5 X 5 8 6 5 4 6 8 X 5 X 5 8 9 3 9 6 8 X 5 X 5 8 3 9 9 6 X X X 5 X S S S S S S S S S S 10 7 2 3 2 3 2 3 2 3 T T 1 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 4 3 2 3 2 3 2 3 2 3 5 3 2 3 1 3 2 3 2 3 5 2 2 3 2 4 2 3 2 3 5 S S 2 3 2 1 2 3 2 3 0 0 Sample Output 12 5 -1 22 12
DNS服务器的日志信息请教。
Oct 8 09:36:17 WCentos named-sdb[7778]: managed-keys-zone ./IN: Unable to fetch DNSKEY set '.': timed out Oct 8 09:36:17 WCentos named-sdb[7778]: managed-keys-zone ./IN: Unable to fetch DNSKEY set 'dlv.isc.org': timed out 新搭建的DNS服务器 messages 出现以上日志,请问出现这个问题的原因,该如何解决,感谢。
Bus Pass 计算
Problem Description You travel a lot by bus and the costs of all the seperate tickets are starting to add up. Therefore you want to see if it might be advantageous for you to buy a bus pass. The way the bus system works in your country (and also in the Netherlands) is as follows: when you buy a bus pass, you have to indicate a center zone and a star value. You are allowed to travel freely in any zone which has a distance to your center zone which is less than your star value. For example, if you have a star value of one, you can only travel in your center zone. If you have a star value of two, you can also travel in all adjacent zones, et cetera. You have a list of all bus trips you frequently make, and would like to determine the minimum star value you need to make all these trips using your buss pass. But this is not always an easy task. For example look at the following figure: Here you want to be able to travel from A to B and from B to D. The best center zone is 7400, for which you only need a star value of 4. Note that you do not even visit this zone on your trips! Input On the first line an integert(1 <=t<= 100): the number of test cases. Then for each test case: One line with two integersnz(2 <=nz<= 9 999) andnr(1 <=nr<= 10): the number of zones and the number of bus trips, respectively. nz lines starting with two integers idi (1 <= idi <= 9 999) and mzi (1 <= mzi <= 10), a number identifying the i-th zone and the number of zones adjacent to it, followed by mzi integers: the numbers of the adjacent zones. nr lines starting with one integer mri (1 <= mri <= 20), indicating the number of zones the ith bus trip visits, followed by mri integers: the numbers of the zones through which the bus passes in the order in which they are visited. All zones are connected, either directly or via other zones. Output For each test case: One line with two integers, the minimum star value and the id of a center zone which achieves this minimum star value. If there are multiple possibilities, choose the zone with the lowest number. Sample Input 1 17 2 7400 6 7401 7402 7403 7404 7405 7406 7401 6 7412 7402 7400 7406 7410 7411 7402 5 7412 7403 7400 7401 7411 7403 6 7413 7414 7404 7400 7402 7412 7404 5 7403 7414 7415 7405 7400 7405 6 7404 7415 7407 7408 7406 7400 7406 7 7400 7405 7407 7408 7409 7410 7401 7407 4 7408 7406 7405 7415 7408 4 7409 7406 7405 7407 7409 3 7410 7406 7408 7410 4 7411 7401 7406 7409 7411 5 7416 7412 7402 7401 7410 7412 6 7416 7411 7401 7402 7403 7413 7413 3 7412 7403 7414 7414 3 7413 7403 7404 7415 3 7404 7405 7407 7416 2 7411 7412 5 7409 7408 7407 7405 7415 6 7415 7404 7414 7413 7412 7416 Sample Output 4 7400
Bus Pass 公交车的问题,C语言
Problem Description You travel a lot by bus and the costs of all the seperate tickets are starting to add up. Therefore you want to see if it might be advantageous for you to buy a bus pass. The way the bus system works in your country (and also in the Netherlands) is as follows: when you buy a bus pass, you have to indicate a center zone and a star value. You are allowed to travel freely in any zone which has a distance to your center zone which is less than your star value. For example, if you have a star value of one, you can only travel in your center zone. If you have a star value of two, you can also travel in all adjacent zones, et cetera. You have a list of all bus trips you frequently make, and would like to determine the minimum star value you need to make all these trips using your buss pass. But this is not always an easy task. For example look at the following figure: Here you want to be able to travel from A to B and from B to D. The best center zone is 7400, for which you only need a star value of 4. Note that you do not even visit this zone on your trips! Input On the first line an integert(1 <=t<= 100): the number of test cases. Then for each test case: One line with two integersnz(2 <=nz<= 9 999) andnr(1 <=nr<= 10): the number of zones and the number of bus trips, respectively. nz lines starting with two integers idi (1 <= idi <= 9 999) and mzi (1 <= mzi <= 10), a number identifying the i-th zone and the number of zones adjacent to it, followed by mzi integers: the numbers of the adjacent zones. nr lines starting with one integer mri (1 <= mri <= 20), indicating the number of zones the ith bus trip visits, followed by mri integers: the numbers of the zones through which the bus passes in the order in which they are visited. All zones are connected, either directly or via other zones. Output For each test case: One line with two integers, the minimum star value and the id of a center zone which achieves this minimum star value. If there are multiple possibilities, choose the zone with the lowest number. Sample Input 1 17 2 7400 6 7401 7402 7403 7404 7405 7406 7401 6 7412 7402 7400 7406 7410 7411 7402 5 7412 7403 7400 7401 7411 7403 6 7413 7414 7404 7400 7402 7412 7404 5 7403 7414 7415 7405 7400 7405 6 7404 7415 7407 7408 7406 7400 7406 7 7400 7405 7407 7408 7409 7410 7401 7407 4 7408 7406 7405 7415 7408 4 7409 7406 7405 7407 7409 3 7410 7406 7408 7410 4 7411 7401 7406 7409 7411 5 7416 7412 7402 7401 7410 7412 6 7416 7411 7401 7402 7403 7413 7413 3 7412 7403 7414 7414 3 7413 7403 7404 7415 3 7404 7405 7407 7416 2 7411 7412 5 7409 7408 7407 7405 7415 6 7415 7404 7414 7413 7412 7416 Sample Output 4 7400
feign 通过服务名调用报错404
## feign 通过服务名调用报错404 eureka注册中心 ![图片说明](https://img-ask.csdn.net/upload/201908/21/1566361357_431785.png) **生产服务代码配置信息** ``` server: port: 8100 spring: application: name: admin-service-api eureka: instance: ##注册中心IP地址 hostname: localhost ### 实例名称显示IP配置 preferIpAddress: true instance-id: ${spring.application.name}:${server.port} client: serviceUrl: defaultZone: http://localhost:8700/eureka/ ``` ``` @RequestMapping("/admin-service-api") public interface DevicePrisionerService { @RequestMapping(value = "/getUser", method = RequestMethod.GET) String getUser(); } ``` **消费服务代码配置信息** eureka配置文件: ``` server: port: 8200 spring: application: name: NanhaiAdminWeb eureka: instance: ##注册中心IP地址 hostname: localhost ### 实例名称显示IP配置 preferIpAddress: true instance-id: ${spring.application.name}:${server.port} client: serviceUrl: defaultZone: http://localhost:8700/eureka/ ``` FeignClient客户端调用代码 ``` @FeignClient(name = "admin-service-api") public interface AdminService { @RequestMapping(value = "/getUser", method = RequestMethod.GET) String getUser(); } ``` Controller调用: ``` @RestController public class AdminController { @Autowired private AdminService adminService; @GetMapping("login") public Object login(){ return adminService.getUser(); } } ``` **错误信息:** ``` 2019-08-21 11:48:09.015 INFO 13252 --- [nio-8200-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' 2019-08-21 11:48:09.015 INFO 13252 --- [nio-8200-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' 2019-08-21 11:48:09.021 INFO 13252 --- [nio-8200-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 5 ms 2019-08-21 11:48:09.167 INFO 13252 --- [nio-8200-exec-1] c.netflix.config.ChainedDynamicProperty : Flipping property: admin-service-api.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647 2019-08-21 11:48:09.190 INFO 13252 --- [nio-8200-exec-1] c.n.u.concurrent.ShutdownEnabledTimer : Shutdown hook installed for: NFLoadBalancer-PingTimer-admin-service-api 2019-08-21 11:48:09.191 INFO 13252 --- [nio-8200-exec-1] c.netflix.loadbalancer.BaseLoadBalancer : Client: admin-service-api instantiated a LoadBalancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=admin-service-api,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:null 2019-08-21 11:48:09.195 INFO 13252 --- [nio-8200-exec-1] c.n.l.DynamicServerListLoadBalancer : Using serverListUpdater PollingServerListUpdater 2019-08-21 11:48:09.212 INFO 13252 --- [nio-8200-exec-1] c.netflix.config.ChainedDynamicProperty : Flipping property: admin-service-api.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647 2019-08-21 11:48:09.213 INFO 13252 --- [nio-8200-exec-1] c.n.l.DynamicServerListLoadBalancer : DynamicServerListLoadBalancer for client admin-service-api initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=admin-service-api,current list of Servers=[192.168.1.134:8100],Load balancer stats=Zone stats: {defaultzone=[Zone:defaultzone; Instance count:1; Active connections count: 0; Circuit breaker tripped count: 0; Active connections per server: 0.0;] },Server stats: [[Server:192.168.1.134:8100; Zone:defaultZone; Total Requests:0; Successive connection failure:0; Total blackout seconds:0; Last connection made:Thu Jan 01 08:00:00 CST 1970; First connection made: Thu Jan 01 08:00:00 CST 1970; Active Connections:0; total failure count in last (1000) msecs:0; average resp time:0.0; 90 percentile resp time:0.0; 95 percentile resp time:0.0; min resp time:0.0; max resp time:0.0; stddev resp time:0.0] ]}ServerList:org.springframework.cloud.netflix.ribbon.eureka.DomainExtractingServerList@5539f1f1 2019-08-21 11:48:09.281 ERROR 13252 --- [nio-8200-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is feign.FeignException: status 404 reading AdminService#getUser()] with root cause feign.FeignException: status 404 reading AdminService#getUser() at feign.FeignException.errorStatus(FeignException.java:78) ~[feign-core-10.1.0.jar:na] at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:93) ~[feign-core-10.1.0.jar:na] at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:149) ~[feign-core-10.1.0.jar:na] at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:78) ~[feign-core-10.1.0.jar:na] at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103) ~[feign-core-10.1.0.jar:na] at com.sun.proxy.$Proxy73.getUser(Unknown Source) ~[na:na] at com.zkja.nanhai.admin.controller.AdminController.login(AdminController.java:23) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189) ~[spring-web-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.14.jar:9.0.14] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) ~[spring-web-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) ~[spring-web-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) ~[tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) [tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834) [tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417) [tomcat-embed-core-9.0.14.jar:9.0.14] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.14.jar:9.0.14] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_144] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_144] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.14.jar:9.0.14] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144] 2019-08-21 11:48:10.203 INFO 13252 --- [erListUpdater-0] c.netflix.config.ChainedDynamicProperty : Flipping property: admin-service-api.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647 2019-08-21 11:52:11.573 INFO 13252 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration 2019-08-21 11:57:11.577 INFO 13252 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration 2019-08-21 12:02:11.582 INFO 13252 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration 2019-08-21 12:07:11.591 INFO 13252 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration 2019-08-21 12:12:11.595 INFO 13252 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration 2019-08-21 12:17:11.596 INFO 13252 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration 2019-08-21 12:22:11.599 INFO 13252 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration 2019-08-21 12:27:11.609 INFO 13252 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration ``` **HardCodedTarget获取信息:** HardCodedTarget(type=AdminService, name=admin-service-api, url=http://admin-service-api)
Linux下配置DNS服务器,报错“has no address records (A or AAAA)”,怎么解决,求大师指导
我搞不懂这段报错,怎么解决,您会吗? May 16 04:47:57 localhost named: test.zone:8: NS record '192.168.9.159' appears to be an address May 16 04:47:57 localhost named: zone test.com/IN: NS '192.168.9.159.test.com' has no address records (A or AAAA) May 16 04:47:57 localhost named: zone test.com/IN: not loaded due to errors. May 16 04:47:57 localhost named: _default/test.com/IN: bad zone May 16 04:47:57 localhost named: zone 9.168.192.in-addr.arpa/IN: NS 'dns.test.com.9.168.192.in-addr.arpa' has no address records (A or AAAA) May 16 04:47:57 localhost named: zone 9.168.192.in-addr.arpa/IN: not loaded due to errors. May 16 04:47:57 localhost named: _default/9.168.192.in-addr.arpa/IN: bad zone May 16 04:47:57 localhost named: zone localhost.localdomain/IN: loaded serial 0 May 16 04:47:57 localhost named: zone localhost/IN: loaded serial 0 May 16 04:47:57 localhost named: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0 May 16 04:47:57 localhost named: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0 May 16 04:47:57 localhost named: zone 0.in-addr.arpa/IN: loaded serial 0 --------- [quote]原帖由 Shell_2015 于 2015-5-16 22:38 发表 has no address records? 你的DNS相关配置文件可否贴上来呢? [/quote] ------ 嗯,好的,马上。 rpm -qa|grep bind ,可见安装了如下rpm包,而配置文件,依次罗列其下,谢谢您了,热心人。 ![rpm -qa|grep bind.png (104.70K)](https://mail.qq.com/cgi-bin/download?mailid=ZL2217-inSo398ndZbBaHovn9tLc55&filename=rpm+-qa_grep+bind.png&sid=IN6XxMQ_IMOUMSN2&path=rpm+-qa_grep+bind.png&type=json) ----- gedit /etc/named.conf // // named.conf // // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS // server as a caching only nameserver (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // options { // listen-on port 53 {any;}; listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { any; }; recursion yes; dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory "/var/named/dynamic"; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; zone "." IN { type hint; file "named.ca"; }; zone "test.com" IN { type master; file "test.zone"; allow-update{none;}; }; //zone "test.com" IN { // type master; // file "test.com.zone"; //}; zone "9.168.192.in-addr.arpa" IN { type master; file "9.168.192.arpa"; }; include "/etc/named.rfc1912.zones"; include "/etc/named.root.key"; ------------------------------------------- gedit /var/named/test.com.zone $TTL 1D test.com. IN SOA dns.test.com. fed.test.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum test.com. IN NS dns.test.com. dns.test.com. IN A 192.168.9.159 www.test.com. IN A 192.168.9.156 bbs.test.com. IN A 192.168.9.156 ftp.test.com. IN A 192.168.9.157 test.com. IN MX 10 mail.test.com ---------------- gedit /var/named/9.168.192.arpa $TTL 1D @ IN SOA dns.test.com. admin.test.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum IN NS dns.test.com 159 IN PTR dns.test.com 156 IN PTR www.test.com 157 IN PTR ftp.test.com
相见恨晚的超实用网站
搞学习 知乎:www.zhihu.com 简答题:http://www.jiandati.com/ 网易公开课:https://open.163.com/ted/ 网易云课堂:https://study.163.com/ 中国大学MOOC:www.icourse163.org 网易云课堂:study.163.com 哔哩哔哩弹幕网:www.bilibili.com 我要自学网:www.51zxw
花了20分钟,给女朋友们写了一个web版群聊程序
参考博客 [1]https://www.byteslounge.com/tutorials/java-ee-html5-websocket-example
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
引言 本文主要是记录一下面试字节跳动的经历。 三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时
开源一个功能完整的SpringBoot项目框架
福利来了,给大家带来一个福利。 最近想了解一下有关Spring Boot的开源项目,看了很多开源的框架,大多是一些demo或者是一个未成形的项目,基本功能都不完整,尤其是用户权限和菜单方面几乎没有完整的。 想到我之前做的框架,里面通用模块有:用户模块,权限模块,菜单模块,功能模块也齐全了,每一个功能都是完整的。 打算把这个框架分享出来,供大家使用和学习。 为什么用框架? 框架可以学习整体
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
Python——画一棵漂亮的樱花树(不同种樱花+玫瑰+圣诞树喔)
最近翻到一篇知乎,上面有不少用Python(大多是turtle库)绘制的树图,感觉很漂亮,我整理了一下,挑了一些我觉得不错的代码分享给大家(这些我都测试过,确实可以生成喔~) one 樱花树 动态生成樱花 效果图(这个是动态的): 实现代码 import turtle as T import random import time # 画樱花的躯干(60,t) def Tree(branch
深深的码丨Java HashMap 透析
HashMap 相关概念 HashTab、HashMap、TreeMap 均以键值对像是存储或操作数据元素。HashTab继承自Dictionary,HashMap、TreeMap继承自AbstractMap,三者均实现Map接口 **HashTab:**同步哈希表,不支持null键或值,因为同步导致性能影响,很少被使用 **HashMap:**应用较多的非同步哈希表,支持null键或值,是键值对...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
JDK12 Collectors.teeing 你真的需要了解一下
前言 在 Java 12 里面有个非常好用但在官方 JEP 没有公布的功能,因为它只是 Collector 中的一个小改动,它的作用是 merge 两个 collector 的结果,这句话显得很抽象,老规矩,我们先来看个图(这真是一个不和谐的图????): 管道改造经常会用这个小东西,通常我们叫它「三通」,它的主要作用就是将 downstream1 和 downstre...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
相关热词 c# plc s1200 c#里氏转换原则 c# 主界面 c# do loop c#存为组套 模板 c# 停掉协程 c# rgb 读取图片 c# 图片颜色调整 最快 c#多张图片上传 c#密封类与密封方法
立即提问