Giter Club home page Giter Club logo

Comments (19)

sevennt avatar sevennt commented on July 17, 2024

@csdnshyang 你的 k8s 中目前有正在运行的服务么,比如 Istio 的示例 Bookinfo。

from naftis.

shancang avatar shancang commented on July 17, 2024

我的也是同样的问题
image
image

from naftis.

sevennt avatar sevennt commented on July 17, 2024

@shancang 总的服务数和总的 Pod 数,计算时时排除了 istio-systemkube-systemnaftis 这三个 namespace,见 #23

如果这个查询不到服务和 Pod,需要先确认下 k8s 中已经部署了除 istio-systemkube-systemnaftis 以外的业务服务,比如 Bookinfo。

from naftis.

shihaiyang-world avatar shihaiyang-world commented on July 17, 2024

@shancang 总的服务数和总的 Pod 数,计算时时排除了 istio-systemkube-systemnaftis 这三个 namespace,见 #23

如果这个查询不到服务和 Pod,需要先确认下 k8s 中已经部署了除 istio-systemkube-systemnaftis 以外的业务服务,比如 Bookinfo。

k8s集群里有许多服务。

kc get svc --all-namespaces |wc -l
     395
kc get svc -n istio-system |wc -l
      10
kc get svc -n naftis |wc -l
       4
kc get svc -n kube-system |wc -l
       8
kc get svc -n zelda |wc -l
     131

k8s里开了认证,但是应该不是这个问题,毕竟istio相关的svc能扫到。

from naftis.

shihaiyang-world avatar shihaiyang-world commented on July 17, 2024

@csdnshyang 你的 k8s 中目前有正在运行的服务么,比如 Istio 的示例 Bookinfo。

Bookinfo的我去掉了。但是我自己做了一批spring boot的服务。
就是gated-launch-* 的几个服务。

from naftis.

shihaiyang-world avatar shihaiyang-world commented on July 17, 2024

111111

统计4xx 5xx的流量中可以看到服务的痕迹。

from naftis.

shihaiyang-world avatar shihaiyang-world commented on July 17, 2024

@shancang 总的服务数和总的 Pod 数,计算时时排除了 istio-systemkube-systemnaftis 这三个 namespace,见 #23

如果这个查询不到服务和 Pod,需要先确认下 k8s 中已经部署了除 istio-systemkube-systemnaftis 以外的业务服务,比如 Bookinfo。

#23 #14 都看了。就是按照时候需不需要做什么配置啊。默认的就能扫到所有的service吗。
mysql那个pod里的表就3张,是不是有问题。

 ✘  ~  kc get po -n naftis
NAME                            READY     STATUS    RESTARTS   AGE
naftis-api-6fd57564db-zv48b     1/1       Running   1          1d
naftis-mysql-799554c7f9-4krw2   1/1       Running   0          1d
naftis-mysql-test               0/1       Error     0          1d
naftis-ui-8d6fcc85f-mwvkq       1/1       Running   0          1d

naftis-mysql-test 的logs

1..1
not ok 1 Testing MySQL Connection
 (in test file /tests/run.sh, line 2)
   `mysql --host=naftis-mysql --port=3306 -u root -pWlRncGh3UWY5VQ==' failed
 mysql: [Warning] Using a password on the command line interface can be insecure.
 ERROR 2003 (HY000): Can't connect to MySQL server on 'naftis-mysql' (110)

naftis-mysql 中的表

show tables;
+------------------+
| Tables_in_naftis |
+------------------+
| task_tmpl_vars   |
| task_tmpls       |
| tasks            |
+------------------+
3 rows in set (0.00 sec)

我猜测是安装过程中出现什么问题了,可能是DNS的问题?

from naftis.

sevennt avatar sevennt commented on July 17, 2024

@csdnshyang 连不上 MySQL,delete 掉 naftis-api,让它重启下试试。

from naftis.

shihaiyang-world avatar shihaiyang-world commented on July 17, 2024

@sevennt 删除了naftis-api ,结果没有变化。看naftis-api的log,init db success。

kc logs -f naftis-api-6fd57564db-nnxmd -n naftis
APP]> (1) 2019-01-09 03:39:32 [INFO]  [Args] Host:0.0.0.0
APP]> (1) 2019-01-09 03:39:32 [INFO]  [Args] Port:50000
APP]> (1) 2019-01-09 03:39:32 [INFO]  [Args] InCluster:true
APP]> (1) 2019-01-09 03:39:32 [INFO]  [Args] ConfigFile:/etc/naftis/config/config.toml
APP]> (1) 2019-01-09 03:39:32 [INFO]  [Args] Namespace:naftis
APP]> (1) 2019-01-09 03:39:32 [INFO]  [Args] IstioNamespace:istio-system

2019-01-09T03:39:32.047716Z	info	[GIN-debug] [WARNING] Now Gin requires Go 1.6 or later and Go 1.7 will be required soon.
2019-01-09T03:39:32.047899Z	info	[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
2019-01-09T03:39:32.047926Z	info	[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)
2019-01-09T03:39:32.051820Z	info	[GIN-debug] GET    /api/probe/healthy        --> github.com/xiaomi/naftis/src/api/handler.Healthy (4 handlers)
2019-01-09T03:39:32.051852Z	info	[GIN-debug] POST   /api/login/account        --> github.com/xiaomi/naftis/src/api/handler.LoginAccount (4 handlers)
2019-01-09T03:39:32.051877Z	info	[GIN-debug] GET    /api/login_user           --> github.com/xiaomi/naftis/src/api/handler.LoginUser (5 handlers)
2019-01-09T03:39:32.051891Z	info	[GIN-debug] GET    /api/diagnose             --> github.com/xiaomi/naftis/src/api/handler.ListStatus (5 handlers)
2019-01-09T03:39:32.051909Z	info	[GIN-debug] GET    /api/metrics              --> github.com/xiaomi/naftis/src/api/handler.ListMetrics (5 handlers)
2019-01-09T03:39:32.051922Z	info	[GIN-debug] GET    /api/d3graph              --> github.com/xiaomi/naftis/src/api/handler.D3Graph (5 handlers)
2019-01-09T03:39:32.051943Z	info	[GIN-debug] GET    /api/services             --> github.com/xiaomi/naftis/src/api/handler.Services (5 handlers)
2019-01-09T03:39:32.051955Z	info	[GIN-debug] GET    /api/services/:uid        --> github.com/xiaomi/naftis/src/api/handler.Services (5 handlers)
2019-01-09T03:39:32.051979Z	info	[GIN-debug] GET    /api/services/:uid/pods   --> github.com/xiaomi/naftis/src/api/handler.ServicePods (5 handlers)
2019-01-09T03:39:32.051994Z	info	[GIN-debug] GET    /api/pods                 --> github.com/xiaomi/naftis/src/api/handler.Pods (5 handlers)
2019-01-09T03:39:32.052012Z	info	[GIN-debug] GET    /api/pods/:name           --> github.com/xiaomi/naftis/src/api/handler.Pods (5 handlers)
2019-01-09T03:39:32.052024Z	info	[GIN-debug] GET    /api/tasks                --> github.com/xiaomi/naftis/src/api/handler.ListTasks (5 handlers)
2019-01-09T03:39:32.052048Z	info	[GIN-debug] GET    /api/tasks/:id            --> github.com/xiaomi/naftis/src/api/handler.ListTasks (5 handlers)
2019-01-09T03:39:32.052064Z	info	[GIN-debug] POST   /api/tasks                --> github.com/xiaomi/naftis/src/api/handler.AddTasks (5 handlers)
2019-01-09T03:39:32.052081Z	info	[GIN-debug] GET    /api/tasktmpls            --> github.com/xiaomi/naftis/src/api/handler.ListTaskTmpls (5 handlers)
2019-01-09T03:39:32.052102Z	info	[GIN-debug] GET    /api/tasktmpls/:id        --> github.com/xiaomi/naftis/src/api/handler.ListTaskTmpls (5 handlers)
2019-01-09T03:39:32.052118Z	info	[GIN-debug] POST   /api/tasktmpls            --> github.com/xiaomi/naftis/src/api/handler.AddTaskTmpls (5 handlers)
2019-01-09T03:39:32.052139Z	info	[GIN-debug] PUT    /api/tasktmpls/:id        --> github.com/xiaomi/naftis/src/api/handler.UpdateTaskTmpls (5 handlers)
2019-01-09T03:39:32.052150Z	info	[GIN-debug] DELETE /api/tasktmpls/:id        --> github.com/xiaomi/naftis/src/api/handler.DeleteTaskTmpls (5 handlers)
2019-01-09T03:39:32.052170Z	info	[GIN-debug] GET    /api/tasktmpls/:id/vars   --> github.com/xiaomi/naftis/src/api/handler.ListTaskTmplVars (5 handlers)
2019-01-09T03:39:32.052182Z	info	[GIN-debug] GET    /api/kube/info            --> github.com/xiaomi/naftis/src/api/handler.Kubeinfo (5 handlers)
2019-01-09T03:39:32.052204Z	info	[GIN-debug] GET    /ws                       --> github.com/xiaomi/naftis/src/api/router.Init.func1 (4 handlers)
[naftis] (1) 2019-01-09 03:39:32 [INFO]  [db] init success
2019-01-09T03:39:32.058964Z	warn	Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
[GIN] 2019/01/09 - 03:40:08 | 200 |      89.329µs |    10.6.233.192 | GET      /api/probe/healthy
[GIN] 2019/01/09 - 03:40:09 | 200 |      53.899µs |    10.6.233.192 | GET      /api/probe/healthy
[GIN] 2019/01/09 - 03:40:18 | 200 |      44.828µs |    10.6.233.192 | GET      /api/probe/healthy
[GIN] 2019/01/09 - 03:40:19 | 200 |      70.034µs |    10.6.233.192 | GET      /api/probe/healthy
[GIN] 2019/01/09 - 03:40:27 | 200 |     224.141µs |    10.6.119.200 | POST     /api/login/account
[GIN] 2019/01/09 - 03:40:28 | 200 |      194.46µs |    10.6.119.200 | GET      /ws?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NDcwMDg4MjcsInVzZXJuYW1lIjoiYWRtaW4ifQ.XSBVP20T9ZtBl2iptNMW23dbAynMXfY3AHW3pi-vzbc
[GIN] 2019/01/09 - 03:40:28 | 200 |      161.72µs |    10.6.119.200 | GET      /ws?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NDcwMDg4MjcsInVzZXJuYW1lIjoiYWRtaW4ifQ.XSBVP20T9ZtBl2iptNMW23dbAynMXfY3AHW3pi-vzbc
[GIN] 2019/01/09 - 03:40:28 | 200 |      81.027µs |    10.6.119.200 | GET      /api/metrics
[GIN] 2019/01/09 - 03:40:28 | 200 |      49.732µs |    10.6.233.192 | GET      /api/probe/healthy
[GIN] 2019/01/09 - 03:40:29 | 200 |      82.918µs |    10.6.233.192 | GET      /api/probe/healthy
[GIN] 2019/01/09 - 03:40:38 | 200 |     110.507µs |    10.6.119.200 | GET      /api/metrics
[GIN] 2019/01/09 - 03:40:38 | 200 |      45.607µs |    10.6.233.192 | GET      /api/probe/healthy
[GIN] 2019/01/09 - 03:40:39 | 200 |      54.475µs |    10.6.233.192 | GET      /api/probe/healthy
[GIN] 2019/01/09 - 03:40:48 | 200 |     124.487µs |    10.6.119.200 | GET      /api/metrics
[GIN] 2019/01/09 - 03:40:48 | 200 |     146.451µs |    10.6.233.192 | GET      /api/probe/healthy
[GIN] 2019/01/09 - 03:40:49 | 200 |      76.074µs |    10.6.233.192 | GET      /api/probe/healthy

from naftis.

shihaiyang-world avatar shihaiyang-world commented on July 17, 2024

@sevennt 好的,我加一下。

from naftis.

tmtbe avatar tmtbe commented on July 17, 2024

我也是看不到,是0

from naftis.

sevennt avatar sevennt commented on July 17, 2024

@tmtbe 稍等,修复中。

from naftis.

sevennt avatar sevennt commented on July 17, 2024

@csdnshyang @tmtbe @shancang 试试 0.1.4-rc6 这个版本。

from naftis.

shihaiyang-world avatar shihaiyang-world commented on July 17, 2024

@sevennt 经测试问题修复。非常感谢!

from naftis.

tmtbe avatar tmtbe commented on July 17, 2024

已修复,tks

from naftis.

tmtbe avatar tmtbe commented on July 17, 2024

还有,有些功能看不到,比如服务详情,和网络图,都显示不出来

from naftis.

tmtbe avatar tmtbe commented on July 17, 2024

default

显示是空白的

from naftis.

sevennt avatar sevennt commented on July 17, 2024

@tmtbe 网络拓扑目前在某些 istio 版本里面显示有问题,后续我们可能会去掉。
服务详情没数据么?可以新开一个 issue。

from naftis.

caijinhai avatar caijinhai commented on July 17, 2024

@sevennt 网络拓扑图看不到,是哪些版本上是有问题的,哪些版本是ok的,其他的数据都是好的。请问能有什么方式查看是那一部分的问题吗?

from naftis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.