Issues
In file included from /root/code/tars/TarsFramework-v3.0.5/tarscpp/servant/servant/Application.h:30, from /root/code/tars/TarsFramework-v3.0.5/AdminRegistryServer/AdminRegistryServer.h:17, from /root/code/tars/TarsFramework-v3.0.5/AdminRegistryServer/AdminRegistryServer.cpp:17: /root/code/tars/TarsFramework-v3.0.5/tarscpp/servant/servant/ServantHelper.h: In instantiation of ‘tars::ServantPtr tars::ServantCreation::create(cImp; tars::ServantPtr = tars::TC_AutoPtrtars::Servant; std::string = std::__cxx11::basic_string]’: /root/code/tars/TarsFramework-v3.0.5/tarscpp/servant/servant/ServantHelper.h:49:16: required from here /root/code/tars/TarsFramework-v3.0.5/tarscpp/servant/servant/ServantHelper.h:49:49: 错误:invalid new-expression of abstract class type ‘AdminRegistry 49 | ServantPtr create(const string &s) { T *p = new T; p->setName(s); p->setApplication(_application); return p; } | ^~~~~ In file included from /root/code/tars/TarsFramework-v3.0.5/AdminRegistryServer/AdminRegistryServer.cpp:18: /root/code/tars/TarsFramework-v3.0.5/AdminRegistryServer/AdminRegistryImp.h:47:7: 附注:因为下列虚函数在‘AdminRegistryImp’中为纯虚函数: 47 | class AdminRegistryImp: public AdminReg | ^~~~~~~~~~~~~~~~ In file included from /root/code/tars/TarsFramework-v3.0.5/AdminRegistryServer/DbProxy.h:28, from /root/code/tars/TarsFramework-v3.0.5/AdminRegistryServer/AdminReapThread.h:22, from /root/code/tars/TarsFramework-v3.0.5/AdminRegistryServer/AdminRegistryServer.h:18, from /root/code/tars/TarsFramework-v3.0.5/AdminRegistryServer/AdminRegistryServer.cpp:17: /root/code/tars/TarsFramework-v3.0.5/tarscpp/servant/protocol/framework/AdminReg.h:8295:29: 附注: ‘virtual tars::Int32 tars::AdminReg::dockerPull( 8295 | virtual tars::Int32 dockerPull(const std::string & baseImageId,tars::TarsCurrentPtr current) = 0; | ^~~~~~~~~~ make[2]: *** [AdminRegistryServer/CMakeFiles/tarsAdminRegistry.dir/AdminRegistryServer.cpp.o] 错误 1 make[1]: *** [AdminRegistryServer/CMakeFiles/tarsAdminRegistry.dir/all] 错误 2 make: *** [all] 错误 2
代码没匹配, 编译framework, tarscpp以及tarscpp/servant/protocol都要用匹配的git, 你要不都更新到最新吧
代码没匹配, 编译framework, tarscpp以及tarscpp/servant/protocol都要用匹配的git, 你要不都更新到最新吧
好的,最新的代码可以编译过去,多谢了
贡献:
tars2go支持include参数 和 单文件定义多个模块 TarsGo客户端独立运行时支持stat和property自动上报 go 1.16+ 版本 创建项目使用脚手架tarsgo命令 支持ssl
approve
在安装./linux-install.sh的时候报错,mysql的用户名密码都是正确的,提示错误如下: exec mysql parameter: [charset]=[utf8]|[host]=[172.16.0.110]|[pass]=[]|[port]=[]|[sql]=[grant SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICAT ION CLIENT, CREATE VIEW, SHOW VIEW, CREATE USER on . to 'tarsAdmin'@'%' identified by 'Tars@2019' with grant option;]|[user]=[admin]error: [TC_Mysql::execute]: mysql_query: [ grant SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE USER on . to 'tarsAdmin'@'%' identified by 'Tars@2019' with grant option; ] :Proxy ERROR:Sanity error: do not support sql relate to privileges,use chitu 2021-07-20 17:57:15 exec_mysql_script grant SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE USER on . to 'tar sAdmin'@'%' identified by 'Tars@2019' with grant option;, ret code: 255 2021-07-20 17:57:15 grant error, exit.
这个是MySQL用户赋权失败的提示,建议单独处理MySQL用户的权限后继续安装。 This is a notice of the failure of MySQL user grant privilege. It is recommended to deal with the permissions of MySQL users before continuing with the installation.
开发语言 php 如题,是否可以在同一个 tars 文件中定义多个 interface? module Test { interface FooA { string testA(); };
}; 如果可以,那么 tars.proto.php 中的 objName 应该如何定义呢? return [ 'appName' => 'App', 'serverName' => 'Testing', 'objName' => '??', ... ];
支持, 返回的是数组,两个obj, 可以试一试
@ruanshudong 好的,谢谢。
/lib64/libm.so.6: version GLIBC_2.29' not found /lib64/libstdc++.so.6: version
GLIBCXX_3.4.26' not found 能不能将依赖的库等放到项目里一起发布出来,安装的时候解决起来太麻烦了
呃...有人在么? 现在 tars 都没有维护的么,还是说又变成 KPI 项目了,有知情人么? 我看每个 project 下面都是一堆 2020年的问题都没人回答...
你这明显是编译环境和服务器环境stdc++版本不一致导致, 和tarsnode有啥关系
是的,的确是我环境的问题,已经解决,谢谢。 框架服务是用的官方的docker化部署,业务节点是用的自己的镜像,然后节点注册是参考的 tarsdocker 里的 https://github.com/TarsCloud/TarsDocker/blob/master/tarsnode/php/entrypoint.sh 记得好像就是这个脚本执行节点注册时提示的库依赖问题,记不太清了,好像这个脚本会去框架节点下载一个包,这个包里面的某个地方貌似有依赖到
您好: 在我的系统中,规划了三种配置,以定义应用程序运行逻辑,分别是程序启动参数,动态参数,实验参数; 我的问题: 1.在Tars中,没有看到可以定义启动参数的地方,唯一的conf模板,框架在应用自动生成并下发的,我可以自定义吗? 2.服务的配置(目前支持了应用配置,set配置、服务配置和节点配置)但是在我的部署中,添加了配置,但服务没有能动态拉取; 可能是什么原因导致的? 3.有一些离线生成的数据文件需要动态加载,这个框架是如何支持它的?在整个系统中,没有看到数据文件的推送。
1 启动参数目前是没有办法控制的 2 拉取配置, 需要在代码中增加addConfig这个调用 3 服务可以监听命令的, 可以通过发送命令给服务来实现文件的动态加载 具体可以参考相关的文档.
多谢支持 不知道添加启动参数这个Feature,是否有计划添加 该Feature在很多服务中,还是很重要的。
启动参数暂时没计划, 你可以直接放在配置文件中, 没啥太本质的区别
我们设计中,引入了插件开发,在刚启动的时候就创建对象了; 而定义的动态参数,是程序运行过程中可以动态更新的, 如果启动参数和动态参数放到一起,每次更新参数都重启的话,代价就要大一些。 这个问题,我已经修改框架,暂时支持了,不过还是希望有官方解决方案。
What language are you using? golang What operating system (Linux, Ubuntu, …) and version? Linux What runtime / compiler are you using (e.g. jdk version or version of gcc) Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
目前应该不支持
What language are you using? c++ What operating system (Linux, Ubuntu, …) and version? Linux What runtime / compiler are you using (e.g. jdk version or version of gcc) gcc Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). 大佬,请问下DCache现在开源版本稳定吗?可以用于生产环境吗?打算接入生产环境DCache
普通key-value应该是稳定的
那大佬的意思是搬上生产环境还不太成熟吗?求建议
只是使用普通的key-value是没有问题的
使用docker搭建框架的时候, 保持数据库不变, 通过官方的faramwork镜像进行提交后,打包后的镜像文件 , 是否能保存用户提交的tars服务包数据.(未使用docker文件映射) 经过尝试之后,我发现基于镜像打包后的framework中丢失了我之前提交的rpc服务包,请问应该通过什么方式避免这个问题? question docker container commit -m "create the 159 copy framework image" -a "hk" 44d1e0444be7 framework:v1
为什么不映射目录? 映射就是为了保持文件的
由于dcache建表比较繁琐,想把表结构放到镜像中去,如果把映射文件持久化到打包镜像 部署起来就方便了
没太明白, dcache建表在web管理平台上配置就好了啊?没搞明白你应用场景
What language are you using? cpp What operating system (Linux, Ubuntu, …) and version? Linux tars可以根据负载自动扩缩容吗?
目前不支持自动扩容,需要手动扩容服务
What language are you using? c++ What operating system (Linux, Ubuntu, …) and version? linux What runtime / compiler are you using (e.g. jdk version or version of gcc) [root@localhost build]# gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44) Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). DCache不能编译通过 /usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocaltesting::TestPartResultReporterInterface*::CreateKey()’中: gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv[_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv]+0x16):对‘pthread_key_create’未定义的引用 /usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocatortesting::internal::TraceInfo > >::CreateKey()’中: gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE9CreateKeyEv[_ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE9CreateKeyEv]+0x16):对‘pthread_key_create’未定义的引用 /usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocaltesting::TestPartResultReporterInterface*::GetOrCreateValue() const’中: gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv]+0x16):对‘pthread_getspecific’未定义的引用 gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv]+0x79):对‘pthread_setspecific’未定义的引用 collect2: 错误:ld 返回 1 make[2]: *** [bin/test-TimerThreadTest] 错误 1 make[1]: *** [test/Proxy/CMakeFiles/test-TimerThreadTest.dir/all] 错误 2 make: *** [all] 错误 2 求大佬指教是为什么?都是拉取的git最新代码
已经解决
What language are you using? 线上环境一般没有/usr/local 权限, 建议tarsnode安装可以配置安装路径
加一个目录软连接来解决? 现在其实也可以调整目录, 就是稍微麻烦一点, 安装时脚本里面修改一下目录
What language are you using? php What operating system (Linux, Ubuntu, …) and version? Linux centos 7 What runtime / compiler are you using (e.g. jdk version or version of gcc) Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). 能否作为外部调用内部http服务网关,使用网关如何实现修改头信息,token验证等。
TarsGateway 可以让外部服务和客户端通过HTTP调用内部使用tars、json、tarsTup和HTTP协议的服务,具体使用方式可以参考 Tars网关文档
Tars文件中定义如下: struct UpdateFieldInfo { 1 require bool replace = true; 2 require UpdateValue upDateValue; };
执行如下代码: uv := DCache.UpdateFieldInfo{} fmt.Println(uv)
得到结果: {false {0 }} 在构造UpdateFieldInfo时,replace并没有按照tars协议中定义的默认值进行初始化。
貌似缺省值只有在optional模式下才有效
RT
使用tarscpp不行了么?
去掉后面那个时间, 这个问题, 后面优化一下
去掉后面那个时间, 这个问题, 后面优化一下
遇到了同样的问题,请问具体是怎么处理呢?
去掉后面那个时间, 这个问题, 后面优化一下
遇到了同样的问题,请问具体是怎么处理呢?
解决了,把包名改成服务名就好了,打扰了
看了你们的评论都描述有点模糊, 把生成出来的压缩包名字src/HelloServer_20220428081241.tar.gz修改为src/HelloServer.tar.gz
What language are you using? c++ What operating system (Linux, Ubuntu, …) and version? linux What runtime / compiler are you using (e.g. jdk version or version of gcc) gcc Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). 求教大佬,DCache还有更详细一点的文档吗?总是安装失败,https://github.com/Tencent/DCache/blob/master/docs/install.md 这里的安装还是太粗略
可以参考文章 DCache 分布式存储系统|安装部署与应用创建,后续还会有关于 DCache 如何使用的系列文章更新
What language are you using? What operating system (Linux, Ubuntu, …) and version? What runtime / compiler are you using (e.g. jdk version or version of gcc) Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
该路由下的配置填写提示这个,我是在删除了配置之后,重新添加就会提示这个
网关的问题, 最好去网关那个仓库的issue里面问
What language are you using? php What operating system (Linux, Ubuntu, …) and version? centos What runtime / compiler are you using (e.g. jdk version or version of gcc) Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
先添加网关控制服务obj
先添加网关控制服务obj
添加不上,提示这个报错
What language are you using? c++ What operating system (Linux, Ubuntu, …) and version? Linux What runtime / compiler are you using (e.g. jdk version or version of gcc) gcc Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). 请教一下大佬,tars有没有提供STL的线程安全方面的参考呢。我在项目中较多使用了map,但是在多线程中容易出现map奔溃,想请问一下tars有没有提供map类似的功能或者有什么可以替代map的已实现线程安全的呢?谢谢!!!
直接加锁封装一下, 应该很容易吧?线程锁都tc库里都有, 自己封装一下难度很小
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
What language are you using? golang What operating system (Linux, Ubuntu, …) and version? docker in mac What runtime / compiler are you using (e.g. jdk version or version of gcc) when i run as the doc that notice : runtime error: invalid memory address or nil pointer dereference i saw the code is where AddServant()
please provide more information. some log screenshot will be better.
Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
是不是硬盘满了之类的问题?
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
相同服务名 配置不同的set就行
web上创建10个应用
相同服务名 配置不同的set就行
服务名不能相同呢
web上创建10个应用
建10个应用是可以,这样10个应该要更新时得上传10个发布包,这样太麻烦了,不知道有没有什么更方便的方法呢请教一下?
用命令行上传并发布,写个脚本,一次上传10个 https://tarscloud.github.io/TarsDocs/dev/tars-web-api.html#upload-and-publish
用命令行上传并发布,写个脚本,一次上传10个 https://tarscloud.github.io/TarsDocs/dev/tars-web-api.html#upload-and-publish
看到了,谢谢大佬指教!!!万分感激
框架的管理后台是:192.168.163.128:3000 我用另一台虚拟机(ip:192.168.163.129)部署tarsnode,下面是部署命令: docker run --name=tars-node --net=host -e INET=ens33 -e WEB_HOST="192.168.163.128:3000" -v /root/work/docker/tars/node/data:/data/app -v /etc/localtime:/etc/localtime tarscloud/tars-node:full 下面是报错: [root@localhost data]# docker run --name=tars-node --net=host -e INET=ens33 -e WEB_HOST="192.168.163.128:3000" -v /root/work/docker/tars/node/data:/data/app -v /etc/localtime:/etc/localtime tarscloud/tars-node:full --2020-11-08 00:12:36-- http://192.168.163.128:3000/get_tarsnode?ip=&runuser=root Connecting to 192.168.163.128:3000... connected. HTTP request sent, awaiting response... 200 OK Length: 3503 (3.4K) [text/plain] Saving to: 'get_tarsnode.sh' 0K ... 100% 221M=0s
2020-11-08 00:12:36 (221 MB/s) - 'get_tarsnode.sh' saved [3503/3503] get_tarsnode.sh: -------------------------------------------------------- #!/bin/bash #/**
Tencent is pleased to support the open source community by making Tars available.
Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
https://opensource.org/licenses/BSD-3-Clause
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License. / echo "runuser: root, webHost:http://192.168.163.128:3000, machine_ip:192.168.163.129, registryAddress:tcp -h 192.168.163.128 -p 17890" OSNAME=uname OS=1 if [[ "$OSNAME" == "Darwin" ]]; then OS=2 elif [[ "$OSNAME" == "Windows_NT" ]]; then OS=3 else OS=1 fi if [ $OS != 3 ]; then TARS_PATH=/usr/local/app/tars else TARS_PATH=c:/tars-install/tars fi if [ $OS != 3 ]; then if [ ! -d "/usr/local/app" ]; then echo "create tars base path: " mkdir -p /data/app ln -s /data/app /usr/local/app fi fi mkdir -p ${TARS_PATH} rm -rf tarsnode.tgz curl -O http://192.168.163.128:3000/files/tarsnode.tgz #休息1s, 避免下载的文件没有写成功 sleep 1 if [ ! -f "tarsnode.tgz" ]; then echo "Tars node download error: http://192.168.163.128:3000/files/tarsnode.tgz" exit fi if [ 'tcp -h 192.168.163.128 -p 17890' == '' ]; then echo "registryAddress is empty." exit fi if [ '192.168.163.129' == '' ]; then echo "machine_ip is empty." exit fi tar zxf tarsnode.tgz if [ $OS != 3 ]; then if [ -f ${TARS_PATH}/tarsnode/util/stop.sh ]; then ${TARS_PATH}/tarsnode/util/stop.sh fi else if [ -f ${TARS_PATH}/tarsnode/util/stop.bat ]; then ${TARS_PATH}/tarsnode/util/stop.bat fi fi cp -rf tarsnode ${TARS_PATH}/ cd ${TARS_PATH} echo "local machine ip:[192.168.163.129] succ" echo "tars registry:" tcp -h 192.168.163.128 -p 17890 sed -i "s/localip.tars.com/192.168.163.129/g" ${TARS_PATH}/tarsnode/conf/tars.tarsnode.config.conf sed -i "s/registryAddress/tcp -h 192.168.163.128 -p 17890/g" ${TARS_PATH}/tarsnode/conf/tars.tarsnode.config.conf if [ $OS != 3 ]; then sed -i "s/registryAddress/tcp -h 192.168.163.128 -p 17890/g" ${TARS_PATH}/tarsnode/util/execute.sh sed -i "s/localip.tars.com/192.168.163.129/g" ${TARS_PATH}/tarsnode/util/execute.sh else sed -i "s/registryAddress/tcp -h 192.168.163.128 -p 17890/g" ${TARS_PATH}/tarsnode/util/execute.bat sed -i "s/localip.tars.com/192.168.163.129/g" ${TARS_PATH}/tarsnode/util/execute.bat fi echo "install tarsnode succ, start tarsnode" if [ $OS != 3 ]; then id -u root &>/dev/null if [ $? != 0 ]; then useradd root fi chown -R root:root /usr/local/app/; ${TARS_PATH}/tarsnode/util/stop.sh
uid=whoami
if [ "$uid" != "root" ] && [ "root" != "" ]; then echo "su $runuser: now uid:$uid, runuser:$runuser" su - $runuser -c "sh ${TARS_PATH}/tarsnode/util/start.sh" else sh ${TARS_PATH}/tarsnode/util/start.sh fi
else ${TARS_PATH}/tarsnode/util/start.bat fi INFO=ps -e | grep tarsnode if [[ "${INFO}" != "" ]]; then echo 'Tars node installed success' else echo 'Tars node installed failed' fi runuser: root, webHost:http://192.168.163.128:3000, machine_ip:192.168.163.129, registryAddress:tcp -h 192.168.163.128 -p 17890 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1201k 0 1201k 0 0 13.3M 0 --:--:-- --:--:-- --:--:-- 13.4M cp: cannot overwrite non-directory '/usr/local/app/tars/tarsnode/data' with directory 'tarsnode/data' local machine ip:[192.168.163.129] succ tars registry: tcp -h 192.168.163.128 -p 17890 install tarsnode succ, start tarsnode start /usr/local/app/tars/tarsnode/bin/tarsnode --nodeid=192.168.163.129 --config=/usr/local/app/tars/tarsnode/conf/tars.tarsnode.config.conf Tars node installed success tarsnode.conf: --------------------------------------------------------
enableset=n setdivision=NULL
async-invoke-timeout=5000 refresh-endpoint-interval=60000 report-interval=60000 sample-rate=100000 max-sample-count=50 stat=tars.tarsstat.StatObj property=tars.tarsproperty.PropertyObj modulename=tars.tarsnode locator=tars.tarsregistry.QueryObj@tcp -h 192.168.163.128 -p 17890 sync-invoke-timeout=6000 asyncthread=3
logsize=10M config=tars.tarsconfig.ConfigObj notify=tars.tarsnotify.NotifyObj deactivating-timeout=3000 app=tars server=tarsnode localip=192.168.163.129 local=tcp -h 127.0.0.1 -p 19385 -t 10000 basepath=/usr/local/app/tars/tarsnode/data datapath=/usr/local/app/tars/tarsnode/data logpath=/usr/local/app/tars/app_log logLevel=DEBUG
endpoint=tcp -h 192.168.163.129 -p 19385 -t 60000 allow maxconns=1024 threads=5 queuecap=10000 queuetimeout=4000 servant=tars.tarsnode.NodeObj
endpoint=tcp -h 192.168.163.129 -p 19386 -t 60000 allow maxconns=1024 threads=5 queuecap=10000 queuetimeout=4000 servant=tars.tarsnode.ServerObj
registryObj=tars.tarsregistry.RegistryObj
heartTimeout=45 monitorInterval=3 synStatInterval=60
file=serversCache.dat minBlock=500 maxBlock=500 factor=1 size=10M
install tarsnode succ, check tarsnode alive MonitorNode ok, latestKeepAliveTime:1604823159, kaTimeout:300 MonitorNode ok, latestKeepAliveTime:1604823159, kaTimeout:300 MonitorNode ok, latestKeepAliveTime:1604823166, kaTimeout:300 MonitorNode ok, latestKeepAliveTime:1604823166, kaTimeout:300 MonitorNode ok, latestKeepAliveTime:1604823173, kaTimeout:300 MonitorNode ok, latestKeepAliveTime:1604823173, kaTimeout:300 MonitorNode ok, latestKeepAliveTime:1604823173, kaTimeout:300 MonitorNode ok, latestKeepAliveTime:1604823180, kaTimeout:300 MonitorNode ok, latestKeepAliveTime:1604823180, kaTimeout:300 MonitorNode ok, latestKeepAliveTime:1604823187, kaTimeout:300 MonitorNode ok, latestKeepAliveTime:1604823187, kaTimeout:300 请问,这是什么原因?要怎么排查问题?谢谢!
补充:transnode的机器一直打印 MonitorNode ok 。。。的log;但框架后台的 节点管理 中没有显示192.168.163.129的节点信息。
补充:把两台机器的防火墙关了后,在tasweb管理后台就可以看到新增的tarsnode了。。。;请问在多机器的环境中,framework要开放哪些端口才能确保tarsnode能正常接入?
可以看看framework/deploy/Dockfile文件, 里面都有端口说明
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
NotifyServer中 LoadDbThread::loadData函数 while (iOffset % 1000 == 0 || mysqlData.data().empty()); 这里的判定条件还是有问题吧?如果数据库数据为空,这里还是会死循环,直接改成while (iOffset % 1000 == 0 || mysqlData.data().empty())就好了
好像是, 不过没看懂你这个改的? 好像没改?
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
What language are you using? c++ What operating system (Linux, Ubuntu, …) and version? Raspberry Pi OS / Linux What runtime / compiler are you using (e.g. jdk version or version of gcc) Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
没试过呢, 这是啥机器? 啥OS linux的么?
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
What language are you using? c++ What operating system (Linux, Ubuntu, …) and version? Linux What runtime / compiler are you using (e.g. jdk version or version of gcc) gcc Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). 大佬,请教一下,tars框架对协议加密,推荐用什么算法啊,客户端是c#,tars框架我看到有提供算法,但是没有对应的c#版本,
cpp里面算法都是标准的, 你找个c#标准的匹配算法, 就可以用啊, des啥的
好的,搞定了,谢谢大佬
What language are you using? cpp What operating system (Linux, Ubuntu, …) and version? Linux What runtime / compiler are you using (e.g. jdk version or version of gcc) gcc Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). 当系统上存在如下两个网口配置时,使用linux-install.sh脚本部署会有问题,获取不到有效IP地址 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.17.13.145 netmask 255.255.240.0 broadcast 172.17.15.255 ether 00:16:3e:32:1c:65 txqueuelen 1000 (Ethernet) RX packets 25385738 bytes 6622473179 (6.1 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 18265294 bytes 15805736820 (14.7 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 veth084aa16: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether ee:c7:7a:c3:67:bc txqueuelen 0 (Ethernet) RX packets 2844063 bytes 255202967 (243.3 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1546386 bytes 432073030 (412.0 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 linux-install.sh 脚本里面 get_host_ip函数 IP=ifconfig | grep -w $1 -A 1 | tail -1 | awk '{print $2}' | cut -d ':' -f 2 有问题?
原来是IP=ifconfig | grep $1 -A 1 | tail -1 | awk '{print $2}' | cut -d ':' -f 2
拿不到IP么? 我怎么试了一下貌似可以拿到?
What language are you using? cpp What operating system (Linux, Ubuntu, …) and version? centos7, docker19.03.13, tarscloud/framework和tarscloud/tars-node的镜像都是latest版本 What runtime / compiler are you using (e.g. jdk version or version of gcc) g++4.8.5 Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). 你好!我在搭建一个服务,这个服务监视本地的文件(文件位于docker镜像和宿主机的共享文件夹里面),客户端则询问服务端关于这些文件的信息,以及传输文件。但是我发现服务端打不开这些文件,服务器程序通过函数opendir连文件夹都打不开。服务端程序通过popen("ls xxxx", "r")读不到很多文件,所以我也不能通过popen把工作交给其他的程序执行。 请问怎样子才能让服务程序读到本地的文件呢?
怎么看起来和tars没关系, 似乎是docker文件共享的问题?
已想到别的办法绕过这个问题,谢谢!
What language are you using? php What operating system (Linux, Ubuntu, …) and version? linux What runtime / compiler are you using (e.g. jdk version or version of gcc) Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). Uncaught Exception: socket tcp 连接失败 in /home/web/tars-client/src/vendor/phptars/tars-registry/src/client/CommunicatorRegistry.php:231 访问量高的时候,客户端偶尔会出现上述日志,大概都是什么情况导致的,有点找不到方向
连接主控失败? 是连接被主控关闭了么?
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
1.springboot中如何输出远程日志, 2.本地日志如何切分,滚动 3.spring中如何使用web管理平台配置的配置文件? 有没有demo或相关的文档说明呢,搞了几天了
https://github.com/TarsCloud/TarsDocs/blob/467a2f3a5dbdcd6bbde9751f1d5871bd9df24cfe/SUMMARY.md 辛苦查看一下以上文档,tarsjava部分有接入spring的内容。看看是否能解决您的问题
https://github.com/TarsCloud/TarsDocs/blob/master/dev/tarsjava/tars-tutorials.md 现在在这个文档中也有链接
Modify in app/web/client/dist/index.html.
在app/web/client/dist/index.html中修改。
No description provided.
This function may have to be handled manually. The build and release records theoretically need to be kept for a long time for future reference. This issue has been considered.
这个功能可能得自己手动处理了,build和发布记录理论上是需要长久保存备查的。这个问题有考虑了。
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
What language are you using? C++ What operating system (Linux, Ubuntu, …) and version? Linux What runtime / compiler are you using (e.g. jdk version or version of gcc) gcc 4.8.5 Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
The application has two microservices A and B. A calls B. A has one machine, and B has two machines B1 and B2. If B1 has a network failure, the packet loss rate reaches 60% and QPS reaches 46. A still does not shield B1. If the failure rate is further increased, for example, to 70% and maintain a QPS of 46, B1 will be shielded. When the QPS is reduced to 20, B1 cannot be recognized as a fault and will not be shielded. In an environment with 100 machines, the problem is more serious. According to actual observations, the larger the cluster size, the lower the QPS is allocated and the less sensitive the shielding.
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
web的服务名称可以用“-”分割符呢,如果使用了分隔符,除了界面上的输入限制,其他的代码处还有没有添加关于分割符的限制呢?
建议还是别用特殊字符
好的,谢谢
What language are you using? What operating system (Linux, Ubuntu, …) and version? MacOS Catalina v10.15.6 What runtime / compiler are you using (e.g. jdk version or version of gcc) Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). 安装MySQL: sh-3.2# docker run -d -p 3306:3306 \
--net=tars -e MYSQL_ROOT_PASSWORD="123456" --ip="172.25.0.2" -v /data/framework-mysql:/var/lib/mysql -v /etc/localtime:/etc/localtime --name=tars-mysql mysql:5.6
2f20e28e5b92aa55934a294a9f4282f2396a01d724628214545467b64b20bc77 docker: Error response from daemon: Mounts denied: The path /data/framework-mysql is not shared from OS X and is not known to Docker. You can configure shared paths from Docker -> Preferences... -> File Sharing. See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info. . 部署tars-framework sh-3.2# docker run -d \
--name=tars-framework --net=tars -e MYSQL_HOST="172.25.0.2" -e MYSQL_ROOT_PASSWORD="123456" -e MYSQL_USER=root -e MYSQL_PORT=3306 -e REBUILD=false -e INET=eth0 -e SLAVE=false --ip="172.25.0.3" -v /data/framework:/data/tars -v /etc/localtime:/etc/localtime -p 3000:3000 -p 3001:3001 tarscloud/framework:v2.4.0
e613eddaf5bac143d43b7c700f4f7647e6b0641bacfa9e902cf97b8c97ebbc33 docker: Error response from daemon: Mounts denied: The path /data/framework is not shared from OS X and is not known to Docker. You can configure shared paths from Docker -> Preferences... -> File Sharing. See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info. . 即使我在preferences里面已经添加了shared paths /data/ 还是同样问题。 但是在docker dashboard 里面已经created了,但无法使用。
docker: Error response from daemon: Mounts denied: 看起来是docker哪权限有问题, 估计得自己查一下
MacOS Catalina 之后是无法在根目录创建文件及目录的,最好把你的文件映射挂载到你的用户目录下,例如: ... -v /Users/YourUserName/docker/framework-mysql:/var/lib/mysql ...
node节点的app_log日志显示 我的框架服务是docker安装,另外的那台物理机node安装是脚本安装非docker安装 docker run -d --name=tars-framework --net=tars -e MYSQL_HOST="172.25.0.2" -e MYSQL_ROOT_PASSWORD="123456" -e MYSQL_USER=root -e MYSQL_PORT=3306 -e REBUILD=false -e INET=eth0 -e SLAVE=false --ip="172.25.0.3" -v /data/framework:/data/tars -v /etc/localtime:/etc/localtime -p 3000:3000 -p 3001:3001 tarscloud/framework:stable 通过这个来启动的容器,是因为没有做registry的端口映射吗请问一下?
使用docker, 你跨机器, 就不能用虚拟网络, 得用--net=host, 要不网络都是不通的
由于tars-server与laravel-tars依赖laravel5组件,以至于不能与新版本共同使用。希望官方能能够更新
tars-server已经不依赖laravel5组件了
What effect can be achieved by reporting PP?
You can report a value, which will be displayed on the UI. There can be several algorithms such as summation and average. There is a display on the tars native page.
可以上报一个数值, ui上会展示这个数值, 可以有求和, 平均等几种算法。在tars 原生的页面有展示。
Only service monitoring and feature monitoring can be seen on the page. Which page is displayed?
在页面上只看到服务监控和特性监控,是在哪个页面展示呢?
Feature monitoring.
就是特性监控。
No description provided.
Yes, it is the implementation of the interface in xxx_imp.go generated by tars, which is called in a coroutine way.
是的,就是根据tars生成的xxx_imp.go的里面的接口实现,是以协程方式被调用的。
There may be many reasons why active nodes cannot be found based on the error message for the Query node. The information in the figure is not enough to tell. You can look at the relevant logs or try to reinstall the TARS framework.
根据报错信息为query节点无法找到active的节点,可能原因很多,图中的信息不足以判断,可以看看相关日志,或者尝试重新安装TARS框架。
Error log:
|ERROR|[TARS][ObjectProxy::doTimeout, objname:tars.tarsstat.StatObj, queue timeout error] |ERROR|[TARS][ObjectProxy::doTimeout, objname:tars.tarsstat.StatObj, queue timeout error] |ERROR|[TARS][ObjectProxy::doTimeout, objname:tars.tarsproperty.PropertyObj, queue timeout error]
The request timeout for Stat and Property is shown here, and the restart result is null for the query node. Maybe the Query node is suspended and you can try to restart the TARS framework
这里显示Stat和Property的请求超时,重启结果报错为query节点null,可能是query节点挂了,可以尝试重启TARS框架
This problem is usually caused by maven's inability to download the dependencies normally. The possible reason is that POM configuration is incorrect and the source of corresponding dependencies cannot be accessed, etc. You can try to check the POM configuration and replace the source of dependent packages with domestic mirror source, etc.
这个问题通常是因为maven无法正常下载依赖造成的,可能原因是pom配置不正确,相应依赖的源无法访问等,可以尝试检查pom配置,替换依赖包的源为国内镜像源等进行尝试
Check whether there are multiple PHP versions on the server. This is generally the reason.
查看服务器上是否有多个PHP版本,一般都是这个原因。
But the PHP execution path of the template has been modified, why is another one executed?
可是模板的php执行路径已经修改了,为什么执行了另一个?
Check the startup script and the php execution path in the configuration sent to the node node, and the modified template may not be synchronized.
查看启动脚本和发到node节点的配置里的php执行路径,可能改的模板并没有同步过来。
Try restarting, it should be regenerated after restarting.
尝试重启,重启了就应该重新生成了的。
Tip: 2020-08-05 18:06:22 mysql is alive cp: Unable to get the file status of "/data/app/tars/cpp/deploy/web/demo/sql/*.sql" (stat): No such file or directory 2020-08-05 18:06:22 mysql version is: 5.7.29-log,
It needs to cooperate with the latest version of the framework. The new version of the demo directory is gone, and the web provides a port and service externally.
需要配合最新版的framework,demo目录新版本没有了, web对外就提供一个端口和服务。
chmod a+x linux-install.sh ./linux-install.sh MYSQL_HOST MYSQL_PASSWORD INET REBUILD(false[default]/true) SLAVE(false[default]/true) MYSQL_USER MYSQL_PORT
A password must be set, otherwise the shell will not support it.
必须设置密码, 否则shell不支持。
No description provided.
Check the adminregistry log. Generally, the service does not exist or the time between the service and mysql is not consistent.
查看adminregistry的日志,一般是服务不存在或者是服务和mysql的时间不一致所导致的问题。
RouterServer 日志 [server config]: | Application(app) DCache | ServerName(server) TestRouterServer | BasePath(basepath) /usr/local/app/tars/tarsnode/data/DCache.TestRouterServer/bin/ | DataPath(datapath) /usr/local/app/tars/tarsnode/data/DCache.TestRouterServer/data/ | LocalIp(localip) 7.1.0.3 | Local(local) tcp -h 127.0.0.1 -p 43756 -t 10000 | LogPath(logpath) /usr/local/app/tars/app_log/ | LogSize(logsize) 10485760 | LogNum(lognum) 10 | LogLevel(loglevel) | Log(log) tars.tarslog.LogObj | Node(node) tars.tarsnode.ServerObj@tcp -h 7.1.0.3 -p 19386 -t 60000 | Config(config) tars.tarsconfig.ConfigObj | Notify(notify) tars.tarsnotify.NotifyObj | OpenCoroutine(opencoroutine) 0 | CoroutineMemSize(coroutinememsize) 1073741824 | CoroutineStackSize(coroutinestack) 131072 | CloseCout(closecout) 1 | NetThread(netthread) 1 | ManualListen(manuallisten) 0 | ReportFlow(reportflow) 1 | BackPacketLimit(backpacketlimit) 100 | BackPacketMin(backpacketmin) 1024 | ---------------------------------------------------------------------------------------------------- | [set file cache ] OK | ---------------------------------------------------------------------------------------------------- | [set roll logger] OK | ---------------------------------------------------------------------------------------------------- | [set time logger] OK | ---------------------------------------------------------------------------------------------------- | [set remote config] OK | ---------------------------------------------------------------------------------------------------- | [set remote notify] OK | ---------------------------------------------------------------------------------------------------- | [set node proxy] OK | ---------------------------------------------------------------------------------------------------- | [set admin adapter] OK | [TC_Socket::bind] bind error :Address already in use, 127.0.0.1:43756 | bind:tcp -h 127.0.0.1 -p 43756 -t 10000 error:std::exception | [Application]:std::exception
tarsAdminRegistry 日志 2022-02-09 09:40:52|139898073896704|DEBUG|ExecuteTask::getTaskRsp, taskNo=e6193914ab904cb388edad3b261e35ef, rsp:{"createTime":"2022-02-09 09:40:52","status":0,"serial":true,"taskNo":"e6193914ab904cb388edad3b261e35ef","userName":"admin","taskItemRsp":[{"percent":0,"executeLog":"","statusInfo":"EM_I_RUNNING","endTime":"","startTime":"2022-02-09 09:40:52","status":1,"req":{"userName":"admin","command":"restart","parameters":{},"setName":"","serverName":"TestRouterServer","nodeName":"7.1.0.3","application":"DCache","itemNo":"6e029e4dbaef475c8332f83c935c564b","taskNo":"e6193914ab904cb388edad3b261e35ef"}}]}
| 2022-02-09 09:40:56|139898040325888|DEBUG|ExecuteTask::getTaskRsp, taskNo=e6193914ab904cb388edad3b261e35ef | 2022-02-09 09:40:56|139898040325888|DEBUG|ExecuteTask::getTaskRsp, taskNo=e6193914ab904cb388edad3b261e35ef, rsp:{"createTime":"2022-02-09 09:40:52","status":0,"serial":true,"taskNo":"e6193914ab904cb388edad3b261e35ef","userName":"admin","taskItemRsp":[{"percent":0,"executeLog":"startServer [DCache.TestRouterServer] from 7.1.0.3 :server is activating, please check: ","statusInfo":"EM_I_SUCCESS","endTime":"2022-02-09 09:40:53","startTime":"2022-02-09 09:40:52","status":2,"req":{"userName":"admin","command":"restart","parameters":{},"setName":"","serverName":"TestRouterServer","nodeName":"7.1.0.3","application":"DCache","itemNo":"6e029e4dbaef475c8332f83c935c564b","taskNo":"e6193914ab904cb388edad3b261e35ef"}}]} | 2022-02-09 09:40:59|139898090682112|DEBUG|updateRegistryInfo2Db affected:4 | 2022-02-09 09:40:59|139898090682112|DEBUG|loadIPPhysicalGroupInfo get server group from db, records affected:0 | 2022-02-09 09:40:59|139898048718592|DEBUG|into getLogData
/usr/local/app/tars/app_log//DCache/TestRouterServer/DCache.TestRouterServer.log
==================================================================================================== [proxy config]:
[load client]:
locator tars.tarsregistry.QueryObj@tcp -h 7.1.0.3 -p 17890:tcp -h 7.1.0.4 -p 17890 sync-invoke-timeout 3000 async-invoke-timeout 5000 refresh-endpoint-interval 60000 stat tars.tarsstat.StatObj property tars.tarsproperty.PropertyObj report-interval 60000 keep-alive-interval
netthread
asyncthread 3 modulename DCache.TestRouterServer enableset n setdivision NULL
[server config]:
Application(app) DCache ServerName(server) TestRouterServer BasePath(basepath) /usr/local/app/tars/tarsnode/data/DCache.TestRouterServer/bin/ DataPath(datapath) /usr/local/app/tars/tarsnode/data/DCache.TestRouterServer/data/ LocalIp(localip) 7.1.0.3 Local(local) tcp -h 127.0.0.1 -p 43756 -t 10000 LogPath(logpath) /usr/local/app/tars/app_log/ LogSize(logsize) 10485760 LogNum(lognum) 10 LogLevel(loglevel)
Log(log) tars.tarslog.LogObj Node(node) tars.tarsnode.ServerObj@tcp -h 7.1.0.3 -p 19386 -t 60000 Config(config) tars.tarsconfig.ConfigObj Notify(notify) tars.tarsnotify.NotifyObj OpenCoroutine(opencoroutine) 0 CoroutineMemSize(coroutinememsize) 1073741824 CoroutineStackSize(coroutinestack) 131072 CloseCout(closecout) 1 NetThread(netthread) 1 ManualListen(manuallisten) 0 ReportFlow(reportflow) 1 BackPacketLimit(backpacketlimit) 100 BackPacketMin(backpacketmin) 1024
[set file cache ] OK
[set roll logger] OK
[set time logger] OK
[set remote config] OK
[set remote notify] OK
[set node proxy] OK
[set admin adapter] OK [TC_Socket::bind] bind error :Address already in use, 127.0.0.1:43756 bind:tcp -h 127.0.0.1 -p 43756 -t 10000 error:std::exception [Application]:std::exception /usr/local/app/tars/tarsnode/data/DCache.TestRouterServer/bin/TestRouterServer redirect stdout and stderr to /usr/local/app/tars/app_log//DCache/TestRouterServer/DCache.TestRouterServer.log
The docker version is Version: 2.1.0.
The version is too low. Use version 2.4.5. It is recommended to update to tarscloud/framework:v2.4.5.
版本太低了, 用2.4.5版本,建议更新至tarscloud/framework:v2.4.5。
What language are you using? What operating system (Linux, Ubuntu, …) and version? What runtime / compiler are you using (e.g. jdk version or version of gcc) Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
按说问题不大,可以跑
No description provided.
Define the corresponding path in logback and modify the log level. Or in the < logger name = tars_ CLIENT_ LOGGER" level="ERROR" > < appender-ref ref="client_ logger"/ > It is also OK after < / logger >. Similar to other Dao layers. If you need mybatis log and other operations. The output can be modified or not according to the package path or loggername. This log and log4j are basically consistent with other log controllers
The log output level can be customized for a package path
You can customize the log output level for loggername
在logback中定义对应的路径修改日志的等级即可。 或者在 < logger name="TARS_CLIENT_LOGGER" level="ERROR" > < appender-ref ref="client_logger"/ > < /logger >后也是可以的。 类似操作其他的dao层一样。若是需要Mybatis的日志等操作。也是按这样的package 路径 或者loggername来修改输出或者不输出。 这个日志和Log4j与其他的日志控制器基本一致的 1、 可以针对某个package路径统一定制日志输出等级 2、 可以针对loggerName来定制日志的输出等级
The previous 2.1 web did not have this problem.
Maria DB 10.4.13 was used.
The installation script will automatically create a TarsAdmin database user for subsequent service use. The installation script executes the corresponding creation commands by detecting the user mysql version, because different versions of mysql are different. But mariaDB is special, so the creation of TarsAdmin user may not be executed successfully.
安装脚本运行过程会自动创建TarsAdmin数据库用户,用于后续服务的使用。安装脚本通过检测用户mysql版本来执行相应的创建命令,因为不同版本mysql有所差别。但是mariaDB较为特殊,因此可能没有成功执行TarsAdmin用户的创建。
Attachment: CMD log command PM2 list
[PM2][WARN] Current process list running is not in sync with saved list. tars-node-web tars-user-system differs. Type 'pm2 save' to synchronize.
Follow the WARN log output by cmd. The reason is that the currently running process list is not synchronized with the saved list. Just enter pm2 save as prompted in the log.
按照cmd输出的WARN日志,原因是当前运行的进程列表没有和已保存的列表同步,按照日志中的提示输入pm2 save即可
After creating a folder in protocol/servant, cmake again prompts "does not contain a CMakeLists.txt file".
Both commands "git clone https://github.com/TarsCloud/TarsFramework.git --recursive "and "git submodule update --remote --recursive" are executed 100%.
According to the log in the figure, the missing CMakeList files are all in the submodule tarscpp. The reason is that there is no clone. Please check the file status under the tarscpp module.
根据图中日志显示,缺失的CMakeList文件都在子模块tarscpp中,原因大概率是没有clone下来,请检查tarscpp模块下的文件情况
No description provided.
There is currently no direct way to view it. You can see the version of TarsWeb on the TarsWeb management page. If necessary, you can view the current git commit record through git log, and find the corresponding version on GitHub.
目前没有直接查看的方式,TarsWeb管理页面可以看到TarsWeb的版本。如若需要可以通过git log查看当前的git提交记录,在GitHub上找到对应版本.
No description provided.
The first parameter of the install.sh installation script is the host address of TarsWeb, which needs to include the port, that is, ip:port, such as 1.2.3.4:3000. Only entering the IP will not call the relevant interface. Shows that the installation is successful is a problem with the current installation script, which will be repaired later.
install.sh安装脚本的第一个参数为TarsWeb的host地址,需要包含端口,即ip:port,例如1.2.3.4:3000,只输入IP会无法调用相关接口。显示安装成功是目前安装脚本存在的问题,后期会进行修复。
Remote login, not convenient to stop with the web.
There is no way to manually kill it as long as the tarsnode node is still there and the node service status is active, the service will continue to be pulled. In the source code implementation, only the stopServer that calls the node node will set the service status to inactive.
没有办法,手动kill掉只要tarsnode节点还在,并且节点服务状态为active,就会一直拉起服务。源码实现中,只有调用node节点的stopServer才会将服务状态设置为inactive。
No description provided.
Use int instead of TarsPhp.
TarsPhp中使用int代替.
No description provided.
TarsGo implements TarsHttpMux based on http natively encapsulated by Go. It is very simple to use, but it does not provide HTTPS-related analysis. Since HTTP is not a tars protocol and has little to do with the tars framework, you can directly use the http package natively encapsulated by Go to implement https.
TarsGo中基于Go原生封装的http,实现了TarsHttpMux,使用上非常简单,但是没有提供HTTPS相关的解析。由于HTTP不是tars协议,与tars框架关系不大,可以自行直接使用Go原生封装的http包实现https。
升级下版本
Refreshing or logging out will not work, and it still prompts that you are not logged in.
It may be a bug that the ticket returned in the user module is undefined. The latest version of TarsWeb has fixed this problem. You can try to upgrade TarsWeb to solve this problem.
可能是用户模块中返回的ticket为undefined的bug,最新版的TarsWeb已经修复这个问题,可以尝试升级TarsWeb解决这个问题。
No description provided.
There is currently no direct way to view it. You can see the version of TarsWeb on the TarsWeb management page. If necessary, you can view the current git commit record through git log, and find the corresponding version on GitHub
目前没有直接查看的方式,TarsWeb管理页面可以看到TarsWeb的版本。如若需要可以通过git log查看当前的git提交记录,在GitHub上找到对应版本
The make & make tar command in the example executes compilation and packaging, first compiling and then packaging. The executable file is generated during the compilation phase, and the file is added to the release package during the packaging phase. Therefore, the executable file is the file generated during the intermediate phase of the command. It can also be used for debugging. In general, the service code does not specify the IP and port, but is specified when publishing the service through TarsWeb.
示例中的make & make tar命令执行编译和打包,先编译再打包,可执行文件是编译阶段生成的,打包阶段会将文件加入发布包,因此可执行文件是命令中间阶段生成的文件,可以不予理会,也可用于调试。一般情况下服务代码不会指定IP和端口,而是通过TarsWeb发布服务时指定的。
No description provided.
It can be set in the template, or prx in the code can be configured.
模板里面可以设置,或者代码里面prx有函数可以配置。
No, it is configured in the template.
不是,是在模板里面配置的。
In the client domain.
client域内。
This is the load load of the machine. It is only displayed for the moment, it has no effect
这是机器的负载load,目前只是显示看看, 无作用
No description provided.
This involves the use of k8s. Exposing applications in k8s to the Internet can be achieved by exposing pod or service. You can find related implementation methods by yourself and choose the implementation method that suits you.
这个就涉及到k8s使用的问题了,向外网暴露k8s中的应用,可以通过暴露pod或者是service等实现,可以自行查找相关实现方法,选择适合自己的实现方式
No description provided.
It needs to be migrated to a machine where tarsnode has been deployed. When the client requests it, it will first request the service address stored in the cache. If it is not available, it will obtain the update service address from the registry and then request the service.
需要迁移到已经部署tarsnode的机器上,客户端请求时会优先请求缓存中保存的服务地址,不可用时从注册中心获取更新服务的地址,再请求服务。
The services on my side are all normal. When starting the web, it shows that it is successful, but the process does not exist.
In framewok, PM2 logs
在framewok里看,pm2 logs
Why do I go down when I compile?
Can I jump over?
It seems that in the Internet environment, compile it and then transfer it to the intranet to recompile.
There is a download directory. Copy is OK in the past.
有一个download目录的,copy过去就行
This is the management port of the service, used by tarsnode.
这是服务的管理端口, 给tarsnode用的。
After configuration, you can check if there are corresponding zipkin logs when zipkin and local requests are made. If not, it means the configuration was unsuccessful.
可以在配置好后,看一下zipkin和本地的请求的时候 ,有没有对应的zipkin的日志。若是没有的话,就表示配置不成功。
The self-start detection after down, that is, the frequency protection is pulled up after the program hangs.
down之后的自启检测,也就是程序挂了之后拉起做个频率保护。
Tarsnode informs tarsregistry.
tarsnode通知tarsregistry。
After installing the framework through docker on the server, port 3001 can be accessed and the password is reset after success. Later, when the gateway is installed to generate the token, it is found that 3001 cannot be accessed. 3000 can be accessed normally.
Just use port 3000. In the new version, the user module and management module ports are combined into one port, and they are all accessed through 3000. TarsGateway's documentation has not been updated, and will be updated later.
使用3000端口就行了,新版本中将用户模块和管理模块端口合并到一个端口了,都是通过3000访问。TarsGateway的文档还没有更新,后续会更新。
No description provided.
Yes, you need to configure forwarding.
是的,要配置转发吧。
No, the production environment usually uses net=host mode.
不能 ,生产环境通常用net=host模式。
Look at the output warm log. If the saved list is not synchronized, enter the command according to the prompt.
看输出的warm日志,没有同步saved list,按照提示输入命令试试。
It's a matter of authority.
权限的问题。
基本情况 tarsweb的版本的为2.4.4,Tars Framework用的是github上的master分支手动编译安装 问题描述 根据官方文档的指示通过docker的方式自动注册了一个节点,然后可以在web管理平台上面看到新注册的这个节点,我并没有在这个节点容器的部署任何服务的情况下,使用docker stop命令结束了容器,打算删除这个节点,等到web页面显示该节点变成inacitvate的时候,点击删除,页面消息框弹出undifine的错误。试着去使用api的方式去删除这个不活跃的节点,发现返回的json数据状态显示为200状态,但是依旧发现在web端任然该节点还是存在。 所以就有一些好奇,是我这边的删除节点的操作有误还是tarsweb平台的bug,如果是真的想要删除这个节点,那么标准的方式或者是应该要做哪一些操作
tarsweb的bug, 新版本已经解决了
What language are you using? Java go What operating system (Linux, Ubuntu, …) and version? Linux What runtime / compiler are you using (e.g. jdk version or version of gcc) jdk8,golang1.14 Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). TarsGo客户端,如果不是部署在Tars框架内的话,不会自动上报state和property。而TarsJava即使不部署在Tars框架内,也会正常自动上报,这个特性还是很好用的,用到的场景也比较多,因为很多情况下,服务是不会部署在Tars框架内的。 使用的是当前最新的TarsGo release版本1.1.4,不知道有没有计划解决这一问题。
你得用communicator,设置stat & property属性, 设置你上报的服务的stat, property的obj吧
你得用communicator,设置stat & property属性, 设置你上报的服务的stat, property的obj吧
设置过了,还是不行,我也在QQ群里问了下,好像这个确实是个问题。下面这这两种方式都尝试了,还是不行。代码如下: //communicator.Client.Stat = "tars.tarsstat.StatObj" //communicator.Client.Property = "tars.tarsproperty.PropertyObj" communicator.SetProperty("property", "tars.tarsproperty.PropertyObj") communicator.SetProperty("stat", "tars.tarsstat.StatObj")
我现在添加了这段代码,给非tars客户端也添加了tars服务的配置文件,并且启动go tars.Run(),是可以上报了,但是感觉这不是一个很好的方案。代码如下: tars.ServerConfigPath = "tars配置文件路径...." go tars.Run()
希望之后版本可以出一个比较优雅的解决方案。
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
The tars I just used, and Docker. The main control is on 172.25.0.3. 172.25.0.4 is node1 and 172.25.0.5 is node2. .3 mapped out 3000,3001. .4 mapped out 9000-9010 to host 9000-9010 .5 maps out 9010-9020 to 9010-9020 of the host.
Q1. Choose tars.default or tars.go.default for the template? The picture in the document is tars.default.
Q2. Can the selected node be .3? Still can only choose .4 or .5?
Q3. The port to which OBJ is bound must be between 9000-9010 or 9010-9020, or can it be random, for example 17874?
A1. Templates are fine, no difference
A2. Go services can be published
A3. If docker is in host mode, the port can be unmapped or random.
A1. 模板都可以,没区别
A2. go的服务都可以发布
A3. docker如果是host模式的,端口可以不用映射,也可以随机。
Put the generated tars_ start.sh After the script content is copied, it is OK to start in the foreground, but click start on the page, and a configuration file (not tarsconfig configuration, but local) in the project is not loaded.
See the document for configuration
java -Dconfig=/usr/local/app/tars/tarsnode/data/TestApp.VertxHelloServer/conf/TestApp.VertxHelloServer.config.conf -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Xms2000m -Xmx2000m -Xmn1000m -Xss1000k -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSParallelRemarkEnabled -XX:+CMSScavengeBeforeRemark -verbosegc -XX:+PrintGCDetails -XX:ErrorFile=/usr/local/app/tars/app_log//TestApp/VertxHelloServer/jvm_error.log -Xbootclasspath/a:/usr/local/app/tars/tarsnode/data/TestApp.VertxHelloServer/bin/conf -cp /usr/local/app/tars/tarsnode/data/TestApp.VertxHelloServer/bin//classes:/usr/local/app/tars/tarsnode/data/TestApp.VertxHelloServer/bin//lib/* com.qq.tars.server.startup.Main -Xbootclasspath/a:/usr/local/app/tars/tarsnode/data/TestApp.VertxHelloServer/bin/conf 直接执行java -Dconfig=/usr/local/app/tars/tarsnode/data/TestApp.VertxHelloServer/conf/TestApp.VertxHelloServer.config.conf -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Xms2000m -Xmx2000m -Xmn1000m -Xss1000k -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSParallelRemarkEnabled -XX:+CMSScavengeBeforeRemark -verbosegc -XX:+PrintGCDetails -XX:ErrorFile=/usr/local/app/tars/app_log//TestApp/VertxHelloServer/jvm_error.log -Xbootclasspath/a:/usr/local/app/tars/tarsnode/data/TestApp.VertxHelloServer/bin/conf -cp /usr/local/app/tars/tarsnode/data/TestApp.VertxHelloServer/bin//classes:/usr/local/app/tars/tarsnode/data/TestApp.VertxHelloServer/bin//lib/* com.qq.tars.server.startup.Main 就可以把程序正常启动起来 在页面上点击就启动不起来 错误日志提示 我的/usr/local/app/tars/tarsnode/data/TestApp.VertxHelloServer/bin/conf中的一个配置文件找不到
Restart the tarsnode. I think it's still necessary to think about the business code.
把tarsnode重启一下,估计还是得业务代码上想想办法。
No description provided.
Assembly implementation, with the source code in boost.
汇编实现的,用的boost里面的源码。
For example, if multiple services are deployed on a node, there may be java, php, and go. Once one of the services is abnormal, such as If the CPU is used up, other services will also be affected. Is there any way to avoid this situation?
In theory, as long as multiple services are deployed on the same node, this kind of problem cannot be avoided. It is recommended to improve your monitoring and give early warning in time. Normally, each service is backed up at multiple points. Even if a server is really down, there will be no impact. It can also be solved with docker, k8s and the like, one docker for each service, limit it.
理论上来说,只要是多个服务部署在同一个节点,这种问题就避免不了。建议完善你的监控,及时预警。正常来说每个服务都是多点备份的,就算一台服务器真的宕机了,也不会有什么影响。用docker, k8s之类的也可以解决的, 每个服务一个docker, 限制一下。
No description provided.
If it is deployed on Tencent Cloud or the like, just go to the gateway via slb. If you deploy by yourself, the gateway is deployed on the external network and the domain name can be directly resolved.
如果是部署在腾讯云之类的, 通过slb转到网关就可以了。如果是自己部署, 网关部署在外网, 域名直接解析即可。
No description provided.
Yes, there is vector.
可以的,有vector。
Just add nginx in front of the gateway, and nginx is not needed for forwarding. You can use tars that gateway directly.
在网关前加nginx就可以了,不需要nginx进行转发。可以直接用tars那个网关。
this means that when you use the tup proxy, when the client requests, you need to sequence the tarsobject into binary and put it in the body for forwarding. General scenarios are not used. The core and practical function is the mode of JSON.
这个意思是说当你使用这个tup proxy的时候,在客户端请求的时候,需要自己把tarsObject序列化成二进制,放到Body中做转发。一般的场景并不会用到。核心且实用的功能,是json的模式。
In what scenarios will tup proxy be used?
tup proxy在什么场景下会用到?
Tup can use this mode when your IOS or Android serialization scenario uses the tar protocol. The benefits and choices depend on your business scenario and the employees' grasp of the overall project. After all, this part requires IOS & Android development engineers to be familiar with this part of the resolution protocol. The core point is still JSON as the RPC transport protocol, or the tar stream as the RPC transport protocol. Their role in the forwarding service is equivalent, so is the scenario used. Generally speaking, it is recommended to use JSON for gateway users. In the future, the JSON coming in from the gateway will be dyed directly on the web. You will see the call chain and parameters of the complete gateway. After using JSON, you can configure and dye some.
tup在你的ios OR android的序列化场景使用的是tars协议的时候,可以使用这种模式。收益和选择看你的业务场景和员工对整体工程的把握,毕竟这一部分需要ios&& android的开发的工程师也熟悉这一部分的解析协议。 核心点还是json作为Rpc传输协议,还是tars流作为rpc传输协议,他们的作用在转发服务中是对等的,使用的场景也是如此。 总体而言,建议走网关的用json,后续,会在web上直接对网关进来的json做染色,会看到完整网关进来的调用链和参数,用json后面好配置染色一些。
With the latest version, the back-end service still reports an error. The back-end version is 1.7.2.
It still reported an error. I debugged it. If this line of code is wrong, it will throw an exception if it doesn't go in.
Is there any restriction on the post request parameter?
还是报错了,我debug了,是这行代码出错了,判断没进去,就抛异常,
是不是post请求参数有什么限制?
what is your abnormal information here? If the getname cannot be obtained here, the name is not present when parsing, that is, the tup is not opened.
你这里的异常信息是什么?这里若是获取不到getName的话,就是解析的时候名称不在,就是tup这里没有开。
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
I can't access the web with my 3008.
3008:3000 3009:3001
In other words, the container port must specify 3000 and 3001, and the external port is optional, right?
也就是说,容器端口必须指定3000 和3001,外部端口随意,是吗?
Yes, unless you change the configuration of tarsweb. However, it is best not to modify the port number. If the login jump address is written dead in the configuration file of the web project and the port number of the login service is changed, the login jump will fail.
对,除非你改tarsweb的配置。不过最好是不要修改端口号,web 项目里配置文件中写死了登录跳转地址,改了登录服务的端口号,登录跳转会失败。
Is the node port limited?
那node节点端口有限制吗?
No.
没有。
I want to add information like function name and line number.
C + + can add a layer of macro packaging.
c++可以自己加一层宏包装。
This is for other servers, that is, if the framework is on machine A and the business service is on machine B, you need to install tarNode separately on B. The same node is not needed.
这个是给其他服务器准备的,就是说框架在A机器,业务服务在B机器的话就需要给B上单独安装tarNode,同节点是不需要了。
No description provided.
No, because the port conflicts. The framework also contains a node, the host mode you use, so the port will conflict.
不行,因为端口冲突了。framework里面也包含了一个node,你都用的host模式,所以端口会冲突。
No description provided.
Use frame rpc to call, automatically load, the frame does.
用框架rpc调用, 自动负载的, 框架做了。
No description provided.
There is no way. After manually killing it, as long as the tarsnode node is still there and the node service status is active, the service will continue to be activated. In the source code implementation, only the stopServer that calls the node node will set the service status to inactive.
没有办法,手动kill掉之后,只要tarsnode节点还在,并且节点服务状态为active,就会一直拉起服务。源码实现中,只有调用node节点的stopServer才会将服务状态设置为inactive。
No description provided.
Yes, tarspatch needs to be with tarsweb. Because of the uploaded release package, tarspatch needs to access it. If you use a shared disk, you can deploy multiple tarspatch. But tarslog is generally one set, you can use multiple sets, use templates to assign different business services, and report logs to different tarslogs. It is equivalent to tarslog is the log server, which receives the logs of each tars service.
是的,tarspatch需要和tarsweb在一起。因为上传的发布包, tarspatch需要访问到。如果使用一个共享盘,就可以部署多台tarspatch了。但tarslog, 一般就一台, 你可以多台, 用模板分配不同的业务服务, 上报日志到不同的tarslog。相当于tarslog是log服务端,接收各tars服务日志的。
No description provided.
It is strictly orderly.
是严格有序的。
Take a look at the service template. PHP is configured in the template, which should be consistent.
看看服务模板, php这个是模板里面配置的, 按说应该要一致。
The document link on GitHub also failed.
The new version of tarsweb and tarsframwork is still the old version, not docker deployment. After I download the source code, I execute the SQL statement in the SQL folder, then change the configuration in the config, mainly change the database address and registry address, and set all enable to false, and finally execute NPM run PRD.
TarsWeb has a bug that the ticket is undefined. This problem has been fixed in the latest commit version. You can try to download the latest version and reinstall it. At the same time, TarsWeb currently has a bug in authentication, which may not be turned off if it is false in config.
TarsWeb存在ticket为undefined的bug,已经在最新的commit版本中修复了这个问题,可以尝试下载最新的版本重新安装。同时TarsWeb目前鉴权存在bug,在config中为false可能也无法关掉。
Your configuration is wrong.
配置错误了。
When providing the client with HTTP protocol capability, you can use this gateway. You don't need to start an HTTP service by yourself. It provides HTTP capability for all tar services.
提供给客户端http协议能力的时候,可以使用这个网关,不需要自己启动一个http服务了,统一给所有的tars服务提供了 http的能力。
Change Chrome browser, or clear the browser cache, maybe JS cache, or command + R refresh. If none of these works, upgrade the version.
换Chrome浏览器,或者把浏览器的缓存清了,可能是js缓存了,再或者command+R刷新一下。都不行升级一下版本看看。
For example, Shenzhen and Shanghai have different DB configurations. How can I identify which configuration I use?
This is to set the configuration of existing machine nodes in batch, and then when the capacity is expanded, will the configuration of this private template be automatically carried?
这个是要批量设置已有机器节点的配置,然后扩容的时候,自动会把这个私有模板的配置携带上的吗?
Is it possible to build multiple templates (Shenzhen, Shanghai) without using private templates, and then select different templates for different nodes.
是不是也可以不用私有模板,我建多个模板(深圳,上海),然后不同的节点,选择不同的模板。
No description provided.
When providing the client with HTTP protocol capability, you can use this gateway. You don't need to start an HTTP service by yourself. It provides HTTP capability for all tar services.
提供给客户端http协议能力的时候,可以使用这个网关,不需要自己启动一个http服务了,统一给所有的tars服务提供了 http的能力。
Is it just the HTTP protocol?
只是http协议吗?
There are still current limiting, fusing, JSON, tup.
还有限流,熔断,json,tup。
What's the difference from other HTTP gateways?
那跟其他http网关的区别是什么?
If you import HTTP and export tars, you don't need to transfer agreements. The service itself is also managed on the tar platform, so the back-end tar service expansion and so on can be completely seamless perception. At the same time, it also supports the forwarding of ordinary HTTP to replace some functions of nginx. The forwarding configuration of the gateway is managed uniformly on the tars web.
入口http, 出口tars,就不需要转协议什么的。 服务本身管理也在tars平台上,所以后端tars服务扩容之类的,都能完全无缝感知。 同时也支持普通http的转发,取代部分nginx的功能。网关的转发配置在tars-web上统一管理。
Is the server-side protocol to be changed to JSON?
那么服务端的协议是不是要改为json之类的?
No, use the new version of the language lib and recompile it. The apigateway has protocol transformation. After it is deployed to the platform, the client can request the tar service specified by the backend after installing the URL and JSON format defined by apigateway.
并不用,使用新版本的语言lib, 重新编译即可。 apigateway带了协议转换了,部署到平台后,客户端安apigateway定义好的url和json格式就可以请求到后端制定的tars服务了。
Can the request body be directly JSON when calling HTTP?
http调的时候请求体可以直接json吗?
HTTP request, put JSON in the package, and take a look at the document.
http请求,包体里面放json,看一下文档。
Does the server need to upgrade to 1.7.2?
服务端需要升级到1.7.2吗?
The support of java version is above 1.7.2. If you originally provided HTTP service for the client using springboot, you need to take a look at the usage scenario, switch to the request mode of apigateway, and the business clients such as IOS and Android need to be changed accordingly.
java版本的支持是1.7.2以上,若是原本给客户端使用springboot提供了http的服务的,那么需要看一下使用场景,需要切换成apigateway的请求模式,ios和android等业务掉用端,需要做相应的改变。
After reading the document, it is said that the body of post serializes the contents of the basepacket package tars. I also want to ask: where can I see the basepacket? Is there a document on the tars communication protocol and serialization protocol?
看了一下文档说post的body为BasePacket包tars序列化的内容。还想问下:BasePacket这个包可以在哪里看到?有没有tars通信协议和序列化协议的文档?
The official document of protocol design is available. You can have a look at the document.
协议的设计官方的文档有,可以看一下文档。
It is found that only the client is used, and this log file is not available online. What is the general question?
This is the client log controller added in last year's version. Only the client will automatically output a separate log controller.
这是去年的版本添加的客户端日志控制器,只有客户端会自动输出单独的日志控制器。
No description provided.
This should not depend on it. Why dependence?
不依赖吧?为什么说依赖?
The token required to install gateway is from user_ System.
安装gateway需要的token是从user_system获取的。
To install the gateway interface, you need to call the web, and the token calling the web is generated by the user system.
安装gateway接口,需要调用web,调用web的token都是用户系统生成的。
源码安装 部署getway ,在本地为DHCP情况, 网关地址可以任意指定可用的ip吗?
I see a tars_ping judgment in the code, but I don't see any code calling tars_ ping.
Now there is no active live operation.
现在没有主动保活操作的。
@ tarshttpservice ("httpobj") this is to declare an obj and register it with TAF, right?
Is there a monitoring system for tar HTTP?
How can the tar protocol of tar server be quickly converted to the JSON protocol of HTTP?
Tarshttpservice is a functional annotation, which indicates that the application can have the capability of HTTP service, and obtain the port from the configuration of servant to listen to the corresponding port to provide services. The monitoring request of httpservice is not available. It can report the monitoring information by itself. You can use the gateway directly. Now it is open. You can have a try.
1、TarsHttpService是一个功能性注解,表示这个应用可以拥有HTTP服务的能力,并从servant的配置中获取端口侦听对应的端口提供服务。 2、httpService的监控请求并没有,可以自己上报监控信息。 3、可以直接用网关,现在已经开放了,可以试一试。
Does this mean tupproxy? Is there a java version gateway?
是指的tupproxy吗,有java版本的网关吗?
https://github.com/TarsCloud/TarsGateway It can completely replace tupproxy. All gateway forwarding configurations can be configured on the tarsweb platform. Now Java language supports it.
https://github.com/TarsCloud/TarsGateway 可以全面替换tupProxy,所有网关转发配置,tarsweb平台上都可以配置了,现在java语言都是支持的。
Now Maven center still seems to be 1.7.1.
It is 1.7.2, and it has been to the central library. The gateway is supported in all language versions.
有1.7.2了,已经到中央库了,已经全语言版本都支持这个网关了。
No description provided.
Not at the moment.
暂时没有。
The normal running virtual machine does not find any application directory under the / tars directory, only the services of stars.
The directory does not exist. Check it. It is estimated that the configuration file of tarsnode is empty. Take a look. This problem is known and has not been modified.By the way, mirror docker libstdc.so Up.
目录不存在,检查一下,估计tarsnode的配置文件为空了,你看一下,这个问题已知了,还没修改。 顺便把docker镜像 libstdc.so 升一下。
Take current and send response directly.
拿着current直接sendResponse。
No description provided.
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
What function can be used instead of exit in the download.
You don't have to look at the swote document from the perspective of tars and Yii.
不用从tars和yii角度,看swoole文档。
No description provided.
Context is used between two services, and status is passed from the beginning to the end of the call chain.
context 是两个服务之间用的,status 是从调用链的开始传到结束。
No description provided.
https entry is supported, but you need to compile the configuration yourself, enable https, and make your own certificate. Or you can add a NGINX outside, https forwarding http is enough.
支持https入口,不过需要自己编译配置,开启https,自己制作证书等。或者可以在外面加个NGINX,https转发http就可以了。
No description provided.
Go can use the go package method, https and tars are irrelevant, you need to implement it yourself.
go用go包方式就可以了, https和tars就无关了, 需要自己实现。
How to use crt and key certificate files? Specifically, when deploying on TARS, how to load these certificates?
如何使用crt和key等证书文件?具体到TARS上部署的时候,如何加载这些证书?
It can be made into remote configuration, pulled to the local, and then loaded; or packaged with the bin file for release.
可以做成远程配置, 拉取到本地, 然后加载;或者和bin文件打包到一起发布。
Look at the tarsnode log of the corresponding machine, it may be a port problem. Or try to delete the original record from the mysql table and add it again.
看一下对应机器的tarsnode日志,有可能是端口的问题。或者尝试去mysql的表删除原来的记录,再添加一次。
No description provided.
Add files through the web and pull remote files through addConfig.
通过web添加文件,并通过addConfig拉取远程文件。
It should be that the interface implementation function signature is incorrect.
应该是接口实现函数签名不对。
No description provided.
Refer to https://doc.tarsyun.com/adminer/start/index.html#/.
参照 https://doc.tarsyun.com/adminer/start/index.html#/ 。
There is no response or error when clicking the default button.
In tars 1.0, if it is the default, there will be an icon in front.
This error is reported when installing and publishing.
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
2020-05-29 14:51:52|26977|ERROR|CDbHandle::doUpdateServerStateBatch exception: [TC_Mysql::execute]: mysql_query: [ UPDATE t_server_conf SET present_state='Inactive', process_id= 0 WHERE application='DidKeyBuilder' AND server_name='didkeyClient' AND node_name='10.38.166.103';UPDATE t_server_conf SET present_state='Inactive', process_id= 0 WHERE application='didkeyBuilder' AND server_name='didkeyServer' AND node_name='10.38.166.103';UPDATE t_server_conf SET present_state='Inactive', process_id= 0 WHERE application='didkeyClient' AND server_name='didkeyClient' AND node_name='10.38.166.103' ] :You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE t_server_conf SET present_state='Inactive', process_id= 0 WHERE applicati' at line 1 sql:UPDATE t_server_conf SET present_state='Inactive', process_id= 0 WHERE application='DidKeyBuilder' AND server_name='didkeyClient' AND node_name='10.38.166.103';UPDATE t_server_conf SET present_state='Inactive', process_id= 0 WHERE application='didkeyBuilder' AND server_name='didkeyServer' AND node_name='10.38.166.103';UPDATE t_server_conf SET present_state='Inactive', process_id= 0 WHERE application='didkeyClient' AND server_name='didkeyClient' AND node_name='10.38.166.103'
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
What kind of order should be executed? Or where are the documents?
It's auto generated, with an MVN plug-in. Automatically generated plug-ins can run on MAC and Linux. (see https://github.com/TarsCloud/plugins/tree/master/java-protobuf-plugin and http://note.youdao.com/noteshare?id=ec37e7283c946dc98b9c03c6d0870a0e and https://github.com/TarsCloud/plugins)
是自动生成的,有个mvn插件。自动生成的插件可以在mac和linux运行。(见文档https://github.com/TarsCloud/plugins/tree/master/java-protobuf-plugin 和 http://note.youdao.com/noteshare?id=ec37e7283c946dc98b9c03c6d0870a0e 和 https://github.com/TarsCloud/plugins )
This is implemented in the tarsnode part. It will help you to bring the address of this part. CP does not and does not affect; terminal problems may be plug-in problems.
这个是tarsnode部分实现的,会帮你带上这一部分的地址。cp里面没有也不影响;终端的问题 可能是插件的问题。
In tags. The latest version is v2.4.0, corresponding from 2.4.0. Stable is also the latest. Stable should not be 2.4.0, but the difference should be small. It hasn't changed much recently. It is recommended to use tag with version number as much as possible to avoid passive upgrade. In the future, it is recommended to use docker with version number.
在Tags中,最新的版本为v2.4.0,从2.4.0开始对应,stable目前也是最新的。stable应该不是2.4.0的, 但是差别应该也不大了, 最近没怎么改了。建议尽量使用带版本号的Tag,可以避免被动升级。以后建议就用带版本号的docker了。
How does this tar node correspond to the tarsframe version? Do you also push the version corresponding to 2.4.0?
https://hub.docker.com/r/tarscloud/tars-node
这个tars-node跟tarsframe版本怎么对应?是否也推送下对应 2.4.0 的版本?
https://hub.docker.com/r/tarscloud/tars-node
This is not necessary. Node is just the runtime environment. The tarsnode application will be installed automatically after the container starts and successfully connects to the framework, so there is no version concept.
这个不用,node只是运行时环境。TarsNode应用会在容器启动并成功连接Framework后自动安装,所以没有版本概念。
Remarks should not be shown in Figure 1, should be the service registration port, rpc port. The management port is a web port.
备注图1所示应该不是,应该是服务注册的端口, rpc的端口。管理端口是web端口。
172.25.13 is the node of framewrok, and 172.25.1.5 is the node of work.
What should be filled in for local?
172.25.1.3是framewrok的节点,172.25.1.5是work的节点
还有这里所示的local应该填什么?
The local is generated by the framework and does not need to be processed by yourself.
local是框架生成的,不需要自己处理。
It does not matter, this is because yesterday's watch does not exist.
没关系,这是因为昨天的表不存在。
No description provided.
No, the specific protocol type can be seen in the introduction of the tar protocol type.
没有,具体的协议类型可以看一下tars协议类型的介绍。
时间类型最好用long替代
Yes, you need to add this node to the private template. When importing a project, you need to check whether the corresponding Zipkin package has been imported. Service a and service B need to have the corresponding Zipkin opened and imported. After reporting, you can see the specific data. Java = > java can be used. Other mixed language calls are temporarily unknown.
是的,在私有模板里面要加上这个节点,项目引入的时候,要察看是否已经 引入对应的zipkin包,服务A、服务B都要有对应的zipkin的开启和引入,上报后就可以看得到具体的数据了。 java =>java的可以,其他的语言混合调用暂时未知。
The client log said that the link was closed, but the server received this request, what is the matter?
Client-to-server messages and server-to-client messages are asynchronous, tcp is full-duplex, and two channels are sent and received.
客户端到服务器的消息和服务器到客户端的消息是异步的,tcp是全双工的,收发走的是两条通道。
This is caused by the error of getting configuration file; without the block in the remarks, you can use getcommunicator directly, and you don't need to develop a config deployment environment in the tars. (see the two documents https://tarscloud.github.io/TarsDocs/dev/tarsjava/tars-quick-start.html and https://tarscloud.github.io/TarsDocs/dev/tarsjava/tars-tutorials.html ) these two documents can be developed from the client side and the server side. All the online services are here. You can install the documents step by step. The example of the official website is a direct new one. It's an old document, which is running locally in a tars environment. The new document has an explanation for this.
这里是由于配置文件获取错误导致的;不需要备注中的块,直接getcommunicator就可以使用,不需要制定config在tars部署环境。(见两个文档 https://tarscloud.github.io/TarsDocs/dev/tarsjava/tars-quick-start.html 和 https://tarscloud.github.io/TarsDocs/dev/tarsjava/tars-tutorials.html )这两个文档可以从客户端·服务端开发,服务上线全部都在这了,安文档的一步一步处理即可。 官网的例子是直接new的一个,那个是老的文档,是脱离tars环境下本地跑的,新的文档上面对这块有说明。
Restart takes effect.
重启生效。
In addition to the image below, do I need to import other dependencies?
No, it's OK to configure the current remote log address for logback. The remote log can be combined with logback normally. It's included in the documentation. Take a look. So you don't have to deal with it yourself. After adding the adapter of logback, all logs can be customized to remote. The format and log structure are subject to the configuration of logback. (description document is doc.tarsyun.com )
不需要的,logback配置现在的远程日志地址就好了,远程日志可以正常的和Logback结合了,说明文档里面都有。可以看一下。所以不用自己处理了,增加上logback的适配器后,所有的日志都可以自定义到远程,格式和日志的结构以logback的配置为准即可。(说明文档为doc.tarsyun.com)
Which part of the document is the combination of concrete logback.xml and tars?
具体的logback.xml与tars的结合的文档是在哪一部分?
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
the name in front of @ and the back in @ If the IP port number does not match, it can still be called.
Is it because the service name is not important when directly connected to the node?
Because the tars protocol server will verify this name, the http protocol is not important.
因为tars协议服务端会验证这个名称,所以http协议就不重要了。
The reason may be that the virtual machine is used to install centos. When mysql is installed, it is not mapped to the host machine. You can try to correct the time zone of mysql in docker. The time zone needs to be synchronized.
原因可能是使用虚拟机装centos,安装mysql时候没有映射到宿主机,可以尝试将docker里的mysql的时区改正,时区需要同步。
The machine configuration is too low to compile with multi-threads, and the -j parameter cannot be used for 1 core.
机器配置太低,不能加多线程编译,1核不能用-j参数。
Try telnet 3000 port, telnet can directly use the external network ip.
尝试telnet一下3000这个端口,telnet直接用外网ip即可。
Not normal. But it is normal for querystat to have no data. Both queries should have no data or very little data.
不正常。但querystat没数据是正常的,两个query应该都没数据或者很少数据。
接口对比数据列表中,对比日的数据都是0是为啥?
After the xxx.tars file is generated, the file has been modified, the interface is added, and then re-make releaseb, both sides have been modified. The client
imp.h
the client's Makefile
The gameProxy is written incorrectly, you should use typedef tars::TC_AutoPtr< gameProxy > gamePrx.
gameProxy写错了,应该用typedef tars::TC_AutoPtr< gameProxy > gamePrx。
This plug-in is for the protobuf interface. The tars-node container comes with a compiled plug-in.
这个插件是给protobuf接口用的,tars-node容器中自带有个编译好的插件。
@TARS-Answer 没找到您说的tars-node容器中自带有个编译好的插件插件位置,可以说下具体在哪里吗
@TARS-Answer 同样按着教程,发现报--go_out: protoc-gen-go: unknown plugin "tarsrpc"错误,重试了很多遍都不行
After sending the http protocol to the stat service, check the related code of the call to see if you are actively sending requests to tarsstat.
把http协议发送到stat服务了,把调用的相关代码检查一下 ,查看自己是否主动发请求到tarsstat。
It may be the problem of SLAVE parameters during deployment (see note 1); or this user may not have write permission for this table, and it needs to be set at the database level, try to manually execute sql in the terminal.
可能是部署的时候,SLAVE参数问题(见备注图1);也可能这个用户对这张表的写权限没有,需要在数据库层面设置,尝试一下终端里手动执行sql。
due to the low version of logback
由于logback版本低造成的
This is used to map time, just delete it, docker does not think too much about the windows system.
这个是用来映射时间的,删掉就可以了,docker没有过多考虑windows系统。
That version of php has a bug, which was fixed afterwards. Now the more stable version is 2.4, you can upgrade it.
那个版本的php有bug, 之后修复了,现在比较稳定的版本是2.4,可以升级一下。
This version number can be ignored and is of little use.
这个版本号可以不管,用处不大。
These services will not affect the business.
这几个服务挂了也不会影响业务。
Refresh the status , maybe the status is wrong when the service is started.
刷新一下状态, 可能服务刚起来状态不对。
Close go mod, it is recommended that go use version 13 or above, and go module use auto.
关闭go mod,建议go用13以上版本,gomodule用auto。
What language are you using? php What operating system (Linux, Ubuntu, …) and version? centos What runtime / compiler are you using (e.g. jdk version or version of gcc) gcc (GCC) 9.2.0 Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). 使用php-fpm连tarsphp的tcp服务,当客户端开启了长链接即$client = new \swoole_client(SWOOLE_SOCK_TCP | SWOOLE_KEEP); 服务端过一会儿就会提示swServer_master_onAccept(:115): accept() failed, Error: Too many open files[24] 是什么原因导致文件句柄增多的,ulimit -n 设置的已经够大了,这个值设置多少合适?
客户端php-fpm,使用swoole_client???
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
The version is not correct. It is recommended to update it completely.
版本不对,建议完整更新一下。
If the error is reported in the remarks, it is because the static string STATUS_GRID_KEY in the servant; //User ID of grayscale This paragraph is commented out, saying that the grayscale release is unstable, and then tars deleted this function. I released the note and compiled it. Will there be problems later?
如备注图这个报错是因为servant里面static string STATUS_GRID_KEY; //需要灰度的用户ID 这段被注释掉了,说是灰度发布不稳定,然后tars删除了这个功能,我把注释放开,编译通过了,后面会出现问题吗?
No problem.
不会有问题。
It is generated directly, plus the parameters /usr/local/tars/cpp/script/cmake_tars_server.sh NetCheck NetCheckServer Net just fine
是直接生成的,加上参数 /usr/local/tars/cpp/script/cmake_tars_server.sh NetCheck NetCheckServer Net就好了
DB is in the template framework dB, which is on the tarslog server.
db都在模板framework-db, 都在这里面,在tarslog的服务器上。
If the A service calls the B service interface too fast, the B service will restart, and there will be no problem calling at a very slow frequency.
There should still be problems with the service itself. For example, there are some thread safety problems in it. If the number of calls is small, it is generally difficult to trigger. If the concurrency is large, it is easy to trigger.
应该还是服务本身有问题,比如里面有些线程安全的问题,调用量小一般难触发,并发量大一些,就容易触发。
The application has not found any problems for the time being.
应用程序暂时没有发现有什么问题。
The application has not found any problems for the time being.
也没core?没道理突然退出,看看是否开启了core。
How to set the core switch?
怎么设置core开关?
Ulimit-c unlimited, first look at ulimit to see if the core is not allowed.
ulimit-c unlimited,先看下ulimit,看是不是不让core
Ulimit - C is 0. Do I need to restart tars after opening it?
ulimit -c是0,打开后要重启Tars吗?
Restart tarsnode, and then restart the service.
重启tarsnode,然后重启服务。
The core file is still not found.
还是没有发现core文件。
Did you exit from your program?
自己程序里exit了吗?
No exit, but a panic.
没有exit,但有Panic。
Panic will quit.
panic就会退出。
Is disk space nearly full? Is running on a virtual machine.
Maybe.
有可能。
No description provided.
Just do a directory soft connection. For services running on the existing network, restart each one after the soft connection.
做目录软连接就行,在现网运行的服务,做软连接后要挨个重启。
There is no connection library, you need to rely on tarscpp, right-click the project name property link library to add.
没有连接库,需要依赖tarscpp,项目名右键属性链接库添加。
There may be many cases of failure to connect. It may be that during the installation of the Tars framework, the root account password is incorrectly filled in and the tars user cannot be created, or the mysql user may not have the corresponding host permission. You can check whether it is added in the user table in the mysql database. Corresponding permissions.
无法连接的情况可能有很多,可能在Tars框架安装过程中,root账号密码填错导致无法创建tars用户,也可能没有开mysql用户对应host的权限,可以在mysql数据库中的user表查看是否添加了对应权限。
No description provided.
For win7 and above, the compiler has not tried the minimum version, but it can support c++11.
win7以上, 编译器没试过最低版本, 但支持c++11的即可。
No description provided.
As with normal services, the address should start with udp when binding.
和普通服务一样的,绑定的时候地址用udp开头应该就行了。
No description provided.
Yes.
可以。
推荐使用linux / docker
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
No description provided.
Use docker, update docker directly, just restart, be careful not to rebuild db.
使用docker, 直接更新docker, 重启即可,注意千万不要rebuild db。
No description provided.
No description provided.
No docker environment or docker does not start
没有docker环境或者docker没有启动
No description provided.
Of course, you can get local development and debugging during debugging. The normal process is to package and upload the latest code, or you can find the project code directly modified in the tarsnode directory of the service deployment, but the second method also needs to restart the service.
当然, 调试时可以弄到本地开发调试。正常流程是打包上传最新代码,或者可以在服务部署的tarsnode目录下找到项目代码直接修改也行,但第二种方法还要重启服务才行。
For a centos source, refer to https://github.com/TarsCloud/TarsDocker.
换一个centos源,参照 https://github.com/TarsCloud/TarsDocker 。
No description provided.
Mysql ip and inet use ifconfig to view.
mysql ip,inet用ifconfig查看。
It will be deleted automatically.
会被自动删除掉的。
Modification tars.default It's OK to restart the service after that, right?
修改tars.default后重启服务就可以了是吗?
Yes.
是的。
The obj in the code does not match the management platform.
代码里面obj和管理平台不匹配。
No problem.
没有问题。
It's like / main / < flow_ report_ Obj >? It doesn't matter. It can be added or not.
是说要类似 /main/<flow_report_obj> 吗? 这个没关系, 加不加都可以的。
The service has been running for a long time. I found that I couldn't get the data today, so I went to have a look. Found port not listening.
Just restart the service.
重启一下服务,就好了。
No description provided.
Change the IP address of database and configuration file, or use docker directly.
改数据库和配置文件的ip,或者直接用docker起来就行。
No description provided.
The Pb of tars does not go directly through the Pb stream, which is suitable for the Pb flow call within the tars service; If the C-side service directly provides the Pb flow, it will be good to follow the Pb official process request.
tars的pb不是直接走的是pb流,适合tars服务内部的Pb流调用; 若c端的服务直接提供pb的流,走pb官方的流程请求就好了。
This issue is fixed by this pr.
For example, Baidu's brpc uses a single connection by default, while Google's grpc reuses a connection based on http2? Do multiple connections or connection pools theoretically have higher concurrent throughput and lower latency?
Packet reuse links can improve throughput and reduce latency. Simply speaking, reducing system calls is the biggest bottleneck.
小包复用链接才能提高吞吐和降低延时,简单说减少系统调用,纯服务,系统调用是最大的瓶颈。
In the case of small packets, it is better to use fewer connections?
就是说小包的情况下,应该用更少的连接更好?
Even in the reuse mode, multiple links are created. Generally, there are four sockets for the target IP node.
即使是复用的模式下,也是新建多个链接的。一般tars针对目标ip节点的socket是4个。
So why does Dubbo use one? What are the reasons for this?
那为什么dubbo这种用的是一个呢?这是出于什么考虑呢?
Not all of them are one. It's just that this configuration is sufficient in most cases, not fixed at 1. Especially when the contract is more than 10MB, connection needs to be added to improve some QPS. In this part, combined with the network infrastructure, an IP initiated port is only 65545 at most. When there are 10000 services in the back-end, the socket is definitely not enough. This part can solve this problem to a great extent. The second is the large-scale cluster environment, the traffic is particularly large, a large number of sockets will bring load to the router. Therefore, as long as the packet is not too large, in fact, a connection can also be used. It is OK to pay attention to the socket starvation effect. This part needs a lot of theoretical knowledge, which is also the cornerstone of tar design. There will be sufficient theoretical basis for each design.
并不都是一个,只是说这个配置在大多数的情况下够用,不是固定是1,特别是在发包是10mb以上的时候,还是需要增加connection来提升部分qps。这一部分结合网络基础的情况,一个Ip可发起的端口,最大只有65545,当调用后端有1万个服务的时候,这个socket是肯定不够用的。这一部分可以很大程度解决这一个带来的问题。第二个是大规模的集群环境下,流量特别大,大量的socket会给路由器带来负载。所以,只要包不要太大,其实一个连接也可以,关注socket饥饿效应就可以了。 这一部分需要大量的理论知识,这个也是tars设计的基石,肯定会有各方面充足的理论基础给各个设计上面有支撑。
No description provided.
After 1.7, logback is used by default, and the log output of logback can be configured. The logs of the kernel are also unified into one log controller, so there will not be multiple log controllers in the original time. This log output has little to do with @ slf4. You can see the process of log processing at that time, and then locate the log output.
1.7后默认使用logback,配置logback的日志输出即可。内核的日志也统一到了一个日志控制器,不会在原本的时候出现多个日志控制器的情况。这个日志输出和@slf4关系不大,可以看看当时日志处理的时候流程是怎么样的,再定位日志输出的情况。
The log cannot be seen in the management background. What should be configured? Version 1.6 is directly printed to the STD file; version 1.7 does not exist in the background file.
日志在管理后台看不到,是不是要配置什么?1.6版本,直接就打印到std文件里了;1.7版本管理后台的文件里就没有了。
The 1.7 version is also printed to the console by default, or there will be.
1.7版本默认也是打印到控制台的,还是会有的。
System.out.println () information can be displayed in the management background, log.info () will not be displayed. It seems that the log of version 1.7 can only use logback. You can see that there is a context conversion in the program. After relying on tars, it can't be replaced with other log frameworks. Will you consider optimization in this follow-up?
System.out.println()的信息在管理后台能显示,log.info()的就不会显示。 1.7版本的日志好像只能用logback,看到程序里有context转换,依赖了tars之后就不能替换成其它的日志框架了,这个后续会考虑优化吗?
It has nothing to do with this, log.info Show that the two have nothing to do with each other. To see if the project has other log controller conflicts, you can see the project dependencies. The MDC of logback can also support context processing without conflict. You can use Maven's dependencies to see if there are multiple log controllers, and you can delete them.
和这个没有关系,log.info展示这两个没有任何的关系。看看项目是不是有其他的日志控制器冲突了,可以看看项目依赖。 context上下文的处理,现在logback的MDC也可以支持,并不冲突。可以用maven的dependencies看看是不是有多个日志控制器的情况,exclude掉即可。
谢谢TARS小姐姐了
欢迎这位朋友积极参与TARS社区贡献,积极参加活动。TARS周边必到~~
A null value was lost in the Pb object.
丢了个null值到pb对象里。
No description provided.
Compile and package, just push it with curl.
编译打包, 直接用curl推上去就行了。
The error is always reported when pushing: method not allowed.
推的时候总是报错:Method Not Allowed。
It doesn't matter. See if it has been uploaded and released on the platform.
这个提示没关系。平台上看看是否已经上传和发布。
No description provided.
Tarscontext is also available in 1.6. No change.
TarsContext 这个1.6也有的。没有变。
No description provided.
Yes, see you https://github.com/TarsCloud/TarsJava/blob/master/docs/tars_tracing.md ,Now Zipkin is integrated.
有的,见https://github.com/TarsCloud/TarsJava/blob/master/docs/tars_tracing.md ,现在集成的是zipkin。
This CPP solution needs the next version.
这个cpp的方案需要下一个版本了。
I think Jackson has similar security problems; So I want to know it. Internal business will replace fastjson.
Google's JSON library is relatively stable, safe and adaptable. This follow-up will be abstracted into customization. The biggest core point of choosing gson is that gson has no major problems since it came into being. The logic and neatness of the implementation from the code is also suitable. Of course, tarsjava still can't say which serialization tool to use. It should be used by users themselves. Gson is just a recommendation.
google的json库相对稳定安全,适应性广,这个后续会抽象成自定义吧。 选择gson的最大的核心点还是gson从它产生到现在没有重大的问题。在从代码的实现的逻辑和整洁度也适合。当然tarsjava这里还是不能说,规定用哪种序列化的工具。应该是需要使用者自己使用就好。gson也只是一个推荐哈。
The servantObj in your code may be different from the configuration. Check carefully that the characters in the addServant corresponding to your Server.cpp should be consistent with the web platform configuration.
可能你代码中的servantObj与配置的不一样,仔细检查下你Server.cpp对应addServant 中填的字符要跟web平台配置的一致。
I want to know the difference between the following two folder paths? Both folders are on the node service node 1./usr/local/app/tars/tarsnode/data/Test.test/bin/conf.yaml 2./data/tars/tarsnode-data/Test.test/bin/conf.yaml After I push the configuration file to the service node. When parsing, it prompts that the file cannot be found.
Normally, push is not required. When the service is up, it will automatically pull the configuration. There are APIs to help you pull the configuration.
正常不需要push, 服务起来的时候自动会去拉取配置, 有api帮你拉取配置的。
But when it was released, there was only one.
The service file was successfully deployed and uploaded for the first time. The port was mapped on the host machine and the call was successful. An error was reported when adding one more.
但是在发布的时候,只有一个。
第一次顺利部署并上传了服务文件,端口映射出来在宿主机上并且调用成功了,再加一个的时候报错了。
Check the web log error. In fact, it is enough to deploy a service. In the business code, different servants are treated differently. One of them implements the rpc protocol listening port and the other listens to the web port. Deploying the same app and server on the same node will report duplicate errors.
查看web日志错误是什么。实际上这种部署一个服务就行了,在业务代码里边对不同的servant做不同处理,其中一个实现rpc协议监听端口,另一个监听web端口。 在同一个节点上部署相同的app、server,是会报重复错误的 。
I looked at the log, the only constraint failed, I checked the database, and the last deleted thing was not deleted.
翻看了一下日志,唯一约束失败,查看了数据库,上次删除的东西没删掉。
You must install a tarsnode for the node server, and then specify this node when deploying the service, and bind it to the external network.
节点服务器你得安装一个tarsnode, 然后部署服务的时候, 指定这台节点, 绑定到外网。
The Tars environment is deployed on Tencent Cloud Server, and then the business is deployed on other Tencent Cloud Servers. But some of the business is still in the IDC computer room. I plan to deploy the business on a machine with a public IP and register it in the Tars registration center. The problem here is that when I set up the Tars environment, when I run the linux-install.sh script to deploy Tars, the bound network card is the internal network card (mainly the name of the public network card cannot be seen in ifconfig), I am in IDC After installing tarsnode on the machine, can I register in the Tars registration center?
在腾讯云服务器上部署了Tars环境,然后把业务部署在其他腾讯云服务器上。但是有部分业务还在IDC机房,我打算把业务部署在有公网ip的机器上,注册到Tars注册中心里面。这里的问题是,我在搭建Tars环境时,运行linux-install.sh脚本部署Tars的时候,绑定的网卡是内网网卡(主要是ifconfig里面看不到公网网卡的名称),我在IDC机器上安装tarsnode之后,能注册到Tars注册中心里面吗?
As long as the network is connected, but your mode is all external IP, which may be insecure.
只要网络都是连通的就可以,但是你这个模式都是外网ip,可能会不安全。
Remove the external network IP of the business server on the cloud, and build an agent on a cloud server with an external network to route to these business servers. In this case, can the IDC server access the business server normally?
把云上的业务服务器外网ip去掉,在一台有外网的云服务器上搭建代理,来路由到这些业务服务器上。这样的话,IDC的服务器能正常访问业务服务器吗?
Yes, just be a general agent.
可以的,做个通用代理就行。
Is Nginx OK? I used to think that this need to be the fourth layer of the network, TCP.
Nginx可以吗?我之前以为这种需要做到网络的第4层,TCP。
No.
不行。
I deployed the Tars environment on the A server. If I deploy some services on the B server and register their IP and port in the Tars registry, do I need to deploy a Tars environment on the B server?
The B server is the node server. The node server only needs to deploy tarsnode.
B 服务器就是节点服务器, 节点服务器只需要部署tarsnode即可。
Because the epoll notification is done with a handle.
因为用了句柄做的epoll的通知。
I suggest you use the yaml format directly.
建议你直接用yaml格式。
If it is in yaml format, how to get this service on the server side. I don't seem to provide such a method through tars.xxxx (such as tars.GetServerConfig()). Do you need to parse the file?
如果是yaml格式,在服务端怎么得到这个服务。我通过 tars.xxxx好像没有提供这样的方法(例如tars.GetServerConfig() 这样的方法)。需要解析文件吗?
Pull it down and analyze it yourself. Pull from the remote to the local hard drive, read it from the hard drive yourself, and then parse it into the yaml format.
拉下来自己解析。从远程拉到本地硬盘, 自己从硬盘读取, 然后解析成yaml格式。
AliCloud VPS, with intranet IP, automatic node installation is successful, and node management cannot be found, manual start prompt: [set admin adapter] OK [main exception]:[TC_Socket::bind] bind error :Cannot assign requested address
Look at the service configuration file, what is the ip, this is caused by the wrong ip
检查服务配置文件中的ip是多少, 这种问题一般都是ip不对导致的
tars.tarsnode.config.conf localip=172.17.184.102 endpoint=tcp -h 47.94.149.80 -p 19385 -t 60000 endpoint=tcp -h 47.94.149.80 -p 19386 -t 60000 With intranet and with extranet
tars.tarsnode.config.conf localip=172.17.184.102 endpoint=tcp -h 47.94.149.80 -p 19385 -t 60000 endpoint=tcp -h 47.94.149.80 -p 19386 -t 60000 有内网的有外网的
It's a bit troublesome. If you don't have a gateway in front and you need to bind a virtual external network IP, you need to: 1 Binding 0.0.0.0 2 Create a private template: local = tcp -h 127.0.0.1 -p 9999 -t 3000
The local port should not conflict with your service IP
有点麻烦, 如果你前面没有网关, 又需要绑定虚拟的外网ip, 就需要: 1 绑定0.0.0.0 2 建立私有模板: local = tcp -h 127.0.0.1 -p 9999 -t 3000
local这个port不要和你服务的ip冲突
No description provided.
The client calls, you can specify the master address tars.tarsregistry.QueryObj@tcp -h master IP -t 60000 -p 17890.
客户端调用,可以指定主控地址 tars.tarsregistry.QueryObj@tcp -h 主控IP -t 60000 -p 17890。
Is there a single point of failure? What if this server goes down?
这样是否会存在单点故障?如果这台服务器挂了怎么办?
It is possible to configure multiple IP.
是可以配置多个ip的。
tars.tarsregistry.QueryObj@tcp -h master IP -t 60000 -p 17890, can the master IP be filled in more than one?
tars.tarsregistry.QueryObj@tcp -h 主控IP -t 60000 -p 17890, 主控IP可以填多个吗?
Prompt cannot execute java|errno=No such file or directory, manually start the service can be successful, through the tar web platform, restart can not start the service, what is the reason?
tarsnode restarts, otherwise the environment variables will not take effect
tarsnode重启 否则环境变量不会生效
In the erp system, there is a basic data for department information. Many other tables refer to this field. When deleting the basic department information, check whether it is referenced by other tables. Is there a better solution?
This entanglement point is mainly in the statistics of the related table data. If the original table is associated, the query complexity will increase. If the data is not related, the deleted data cannot be excluded. Usually, when the amount of data is small, it is directly related, and when the amount of data is large, it is processed through an intermediate table. Solution:
MySQL foreign key + cascade delete Soft delete, the DB component is compatible with soft delete logic. It is generally recommended to soft delete, if necessary, it can be redundant.
这个的纠结点主要还是在对关联表数据统计的时候,如果关联原表会导致查询复杂度升高,不关联又无法排除已删除的数据。通常数据量小的时候直接关联,数据量大的时候通过中间表来处理。 解决方法:
MySQL外键+级联删除 软删除,在DB组件兼容软删除逻辑。 一般建议软删除,必要的情况下,可以冗余。
Use unsigned long will report an error, unsigned int get uint32.
Unsigned long is not supported because java does not support it.
不支持unsigned long,因为java不支持。
No description provided.
Enter the operation and maintenance management, and then enter the template management to modify, you can specify the memory size.
进入运维管理,再进入模板管理修改,即可指定内存大小。
There is no problem with direct addressing.
This error can be ignored, under normal circumstances xxx —config = xxx.conf, this configuration is for the tars framework.
这个错误可以不管, 正常情况下 xxx —config = xxx.conf, 这个配置是给tars框架用的。
No description provided.
Framework can be deployed with docker, tarsnode can be deployed with docker or physical machine.
framework可以用docker部署, tarsnode用docker或者物理机部署都可以。
No description provided.
The incoming parameters are not of type int, but of type string, DB_STR.
传入的参数不是int类型,是string类型,DB_STR。
Try to update the master, remember to update the submodule.
尝试更新一下master, 记得submodule都要更新。
No description provided.
You can compile and upload the image source yourself. Or you can try to print phpinfo, check the location of php.ini, make a replacement, and map the expanded directory to docker.
可以自己编译上传镜像源。或者可以尝试下,打印phpinfo,查看php.ini的位置,做一下替换,同时把拓展的目录映射到docker。
No description provided.
This will not create the service source code, you need to install a rename command.
这样会创建不了服务源码,需要安装一个rename命令。
ServerObject::isAutoStart tars.auth not allow to restart in limited state
A manual restart will remove it.
手动重启一次就解除了。
Initialization cannot take too long, which will be killed by tarsnode.
初始化不能有太耗时的操作,这样会被tarsnode杀掉。
C + + should be supported, but bugs are not excluded.
C++应该是支持了,但是不排除有bug。
There are compiled pages in the web, but they are not opened by default. Java may not work. (Pb here means protobuf)
web里面有带编译页面,不过默认没打开,Java的话可能不行。(这里的PB是protobuf的意思)
The code below the picture shows that the proxy object will be created when it is controlled in the cache and string2proxy will be used when calling the target service.
图片下面的代码有,代理对象在缓存中控的时候会创建,在调用目标服务的时候,会使用string2proxy。
Local development, why does the server always report this error: com.qq.tars.rpc.exc.CommunicatorConfigException: |error occurred on create proxy, servant endpoint is empty! But the client can be called normally, what is the reason?
This is caused by a configuration error. If you use it on the platform, you can get the communicator directly.
这个是由于配置错误导致的,在平台上使用,直接获得communicator即可。
I encountered a problem. After restarting the node, the framework can run normally, but the node cannot run. Restart the framework, the node can run normally, but the framework service will hang.
You are all deployed with -net=host. In this case, the ports will conflict, and you need to create a virtual network to solve it.
你都是—net=host部署的吧, 这样做端口会冲突,需要创建虚拟网络解决。
The net changed to a virtual one, or the previous error (see notes 1 and 2), how to solve it? There is no problem with php execution path determination. Manual execution of the script service can be up, and there is no problem with the output of environment variables, but when executed on the platform, it will overwrite the config and script every time. Is there a way not to overwrite the script? Restarting tarsnode will not work. The problem now is that business services cannot be started or restarted on the platform. Manual script execution is fine. If the service is started manually, Active on the platform has been changing.
net换了虚拟的,还是出现和之前的错误(见备注图1和2),怎么解决?php执行路径确定没问题,手动执行脚本服务可以起来,输出环境变量也没问题,但在平台执行,每次都会覆盖config和脚本,有没有办法不覆盖脚本呢?重启tarsnode也不行。现在的问题是业务服务在平台启动不了,也重启不了,手动执行脚本可以。如果是手动启动的服务,平台上的Active一直在变动。
No description provided.
Currently, there is no need to rely on the establishment of other project. The docker part does not support direct docker publishing at present.
现在暂时没有,需要依赖其他的项目的组建,docker部分现在暂时不支持直接docker发布。
Just pack it and put it under your project. Subsequent versions will be deployed to the official pom.
需要打包一下放到你的项目下就好。后续的版本会deploy到正式的pom上。
No description provided.
It can be changed so that the data is encrypted. The tup layer is re encrypted, and the benefit is not high. Some scenarios can be used.
可以改的,这样数据就是加密了。tup层再加密,收益不高,一些场景可以用。
This is tarscelint = > tarsserver uses the encryption mode when setting up scocket. HTTPS means that when your service needs to be used by your business side, you can use HTTPS to provide services, and the communication between tar services is the same. This version is not supported yet. The Java version of 2.0.0 will be added.
这个是tarscelint => tarsServer在建立scocket的时候使用加密的模式;https是指你的服务要给你业务端使用的时候,可以使用https来提供服务 ,tars服务之间的通信不变。 现在这个版本还不支持。2.0.0的java版本会加上。
No relevant configuration was found in the communicator config, or where did it need to be configured?
在CommunicatorConfig里没有找到相关配置,还是说需要在哪里配置的?
Group1 and group2 do not cross machine rooms. There is a unified agent service across machine rooms. The above figure refers to the concept of application group set, and the meaning of group1 and group2. Even in multi-site computer rooms, the communication is also connected by VPN, so it is invisible on the tars platform. From Shanghai computer room a to Nanjing computer room B, there is not a public network, but a special dedicated line or VPN. This part is also encrypted.
group1与group2不跨机房,跨机房有个统一的代理服务。 上面的这个图是指他的应用分组set的概念,group1和group2的意思。即使是多地的机房,通信也是使用的是vpn链接的,所以在tars平台上面,也是一个不可见的。 上海机房a到南京机房B,不是走的公网,是有专门的专线或者vpn相联的,这一部分是也是加密的。
If business service 1 and business service 2 are both hung, will the request be transferred to business service 3 of another computer room?
如果业务服务1与业务服务2都挂了的话,那会把请求转到另一个机房的业务服务3上吗?
If set is not configured, you can read https://doc.tarsyun.com/adminer/start/index.html#/tarsdoc/dev/tars-idc-set.md carefully.
如果没有配置set,则轮训转发的,可以仔细读一下https://doc.tarsyun.com/adminer/start/index.html#/tarsdoc/dev/tars-idc-set.md 这篇。
In tarsnode, I use docker to create a virtual network. In tarsframe-work, I use the host's ip. When tarsnode runs, I upload the package. When publishing, I get an error ("batchPatch err: NodeImp.cpp: patchPro: 111 | error: ip 172.25 .0.1 is invalid ") Is there a problem with the deployment process?
Yes, such deployment of IP verification cannot pass.
是的,这样部署ip效验不能通过。
Is tarsnode directly bound to the host IP? I want to deploy a tarsnode with java environment on the same host. How should it be reasonable?
tarsnode 直接绑定宿主 ip吗?我想在同一个主机上部署一个有java环境的tarsnode,应该如何部署才合理?
Start another tarsnode docker, and connect to tarframework in the mode of network bridge on the same machine. For example, in the tarsnode template, add: / tars / node <cmd_white_list_ip>, configuration, equal to framework ip, let go of the ip.
再启动一个tarsnode 的docker, 同一台机器上, 用网络桥接的模式和tarframework连接。例如在tarsnode模板里面, 增加: /tars/node<cmd_white_list_ip>, 配置, 等于framework ip,把ip放开一下。
If the corresponding position of the remark map is changed to cmd_white_list_ip = xx.xx.xx.xx, it needs to be restarted to take effect.
如备注图对应位置改为cmd_white_list_ip=xx.xx.xx.xx,需要重启后生效。
After rebooting, this configuration will disappear, what should I do? The tarsnode node is configured with a whitelist of frameworks and cannot be released. In the tarsnode template, after I have set the ip to framword, the tarsnode still reports an error after restarting batchPatch err: NodeImp.cpp: patchPro: 111 | error: ip 172.25.0.1 is invalid.
重启后这个配置就没了,怎么办?tarsnode 节点配置了framework的白名单还是发布不了。tarsnode模版里面我已经设置了ip为framword 的ip之后,tarsnode 重启后还是发布报错 batchPatch err:NodeImp.cpp:patchPro:111| error:ip 172.25.0.1 is invalid。
The docker restart framework is gone, don't restart. It is recommended to replace the IP bound to the framework with a virtual tar network, so that there is no problem in the unified network disconnection. But if the ip changes, you need to redeploy the microservice.
重启framework的docker是没了,别重启。推荐把 framework 绑定的ip 换成虚拟的tar网络,这样在统一网断里面就没有问题了。但ip变了就需要重新部署微服。
No description provided.
Use tcpclient in the tc library or socket_async (refer to https://doc.tarsyun.com/adminer/start/index.html#/tarsdoc/dev/tarscpp/tars-thirdparty-protocol.md)
用tc库里面的tcpclient,或者socket_async(可参考https://doc.tarsyun.com/adminer/start/index.html#/tarsdoc/dev/tarscpp/tars-thirdparty-protocol.md )
在web管理平台上的运维管理下的节点管理里,对某个节点点击删除,报错:删除节点:undefined 右上角的版本显示是:2..4.4
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
Do I need to configure java in docker environment to run java microservice? docker refers to tarscloud / frameword 2.4.0
You can use the docker of tarsnode, the framework document writes only recommends deploying framework services and not deploying business services.
你可以使用tarsnode的docker,framework文档写了只建议部署框架服务 不要部署业务服务。
If you want to deploy Java microservices, because Java depends on the environment, so this can't run, is there any solution?
如果要部署Java微服,因为Java就依赖环境,所以这个跑不起来,有什么处理办法吗?
The node has docker in java environment, just use that.
节点有java环境的docker,使用那个就可以了。
No description provided.
No, the tarslog service is just a remote log collection. To solve the problem that multiple node services need to find logs by one server, you can look at the access elk if you need web retrieval. This change is also a change in version 1.7. The log controller of 1.6 will continue to use HA in its original mode. In version 1.6, only bugs and problems will be fixed, and no new functions will be added, but this branch will always be.
没有的,tarslog服务仅仅是远程日志收集,解决多个节点服务排查日志需要一台一台服务器找的问题,所以需要web检索的,可以看看接入elk。这个变更也是1.7版本中的变更哈。1.6的日志控制器还是会以原本的模式继续使用哈,1.6版本也是仅bug和问题修复,不会新增加功能,但是这个分支会一直都在。
Start, stop, or send custom commands.
启动,停止,或者发送自定义命令等。
The file name is passed in the tars. Enter it from the following entry.
This is an error when updating the log level on the page.
This part will still take effect. If the file is not found here, an exception will be output normally. However, the lower level will operate the log level again. Here (picture 3) you need to optimize and modify the output log level later. This exception should be thrown here (picture 4), which does not affect the level of log processing in the current environment.
这一部分还是会生效的,这里文件没有找到的话,会正常的输出一个异常,不过下层会再次操作一次日志等级的,这里(图片三)后续需要优化一下,修改这个输出的日志等级。 应该是这里(图片四)抛的这个异常,这里并不影响它处理当前环境下的日志等级。
这个问题我想是logback.xml文件的位置, 有的java项目打包并不是把logback.xml与class文件放在一起, 所以logback.xml最好是能可以配置其路径
No description provided.
^M is the line break of windows, which is not supported when running. We need to deal with it here. The command dos2unix can be converted.
^M是WINDOWS的换行符,在跑的时候不支持。这里要处理一下。dos2unix这个命令可以转换。
You may use a public IP instead.
No description provided.
The dependent files of tar can be published separately when they are published. Tar client and tar server depend on them.
tars的依赖文件,发布的时候单独可以发布,tars-client,tars-server依赖。
right.
对。
Is it configured as a port?The tars framework I currently deploy is connected via VPN.
是配置成端口吗?我目前部署的tars框架是通过VPN连接的 。
My service is tar.gz, where will my installation package be decompressed after publishing with tars?
Only one service can be published on the same node, and multiple different services can be published. tar.gz is the service release package, which is uploaded by calling the patch service through the TarsWeb page. The default path is /usr/local/app/patchs/tars.upload/, which contains all the uploaded release packages in the history. After the service is released, it is managed by the tarsnode node service, and the default decompression path is the node service tarsnode/data/.
相同节点同一服务只能发布一个,可以发布多个不同服务。tar.gz为服务发布包,通过TarsWeb页调用patch服务上传,默认保持路径为/usr/local/app/patchs/tars.upload/下,包含历史所有上传的发布包。服务发布后通过tarsnode节点服务管理,默认解压路径为节点服务tarsnode/data/下。
After the node deploys the service, you need to delete the node, and you need to clear all the services deployed above.
节点部署服务后,需要删除node, 需要将部署上面的服务都下线清理掉。
There is an error in compiling mysqlclient. Go directly to "/root/TarsFramework/build/src/mysql" to compile mysqlclient, and upgrade cmake to the latest version (3.17).
编译mysqlclient出错了, 直接到/root/TarsFramework/build/src/mysql下编译mysqlclient试一试,同时将cmake升级到最新版本(3.17)。
This seems to have no connection to MySQL lib library. Try to upgrade cmake to the latest version (3.17)
这个感觉有可能是没有连接到mysql的lib库,尝试将cmake升级到最新版本(3.17)
callback_findObjectByIdInSameGroup_exception _objName:BServantObj Deplo learncpp.BServer.BServantObj ,then run: ./testCoro usage: ./testCoro CallTimes sObj use default parameter num : 1 sObj : BServantObj Serverb is deployed on the framework, and testcoo runs locally.
callback_findObjectByIdInSameGroup_exception _objName:BServantObj 部署了 learncpp.BServer.BServantObj , 然后跑: ./testCoro usage: ./testCoro CallTimes sObj use default parameter num : 1 sObj : BServantObj ServerB部署在框架上了,testCoro在本地跑。
Take a look at the basic concepts of the documents( https://doc.tarsyun.com/adminer/start/index.html#/tarsdoc/base/tars-concept.md) and understand them. Simply put, after the service is deployed on the platform, it can be called as follows:
Testcoo directly connects to the port of obj object of this service;
Testcoo sets the locator to automatically obtain the port of obj through the master control (only the name of obj is needed at this time).
把文档( https://doc.tarsyun.com/adminer/start/index.html#/tarsdoc/base/tars-concept.md ),基础概念看一下,理解一下。 简单的说,服务部署在平台上以后,,可以这样调用: 1、testCoro直连这个服务的obj对象的端口; 2、testCoro设置locator, 通过主控自动获取到obj的端口(这个时候只需要obj的名字)。
Encodeurl, converted to %20, this must be right, but if other + comes over, it needs to be converted to space when decode.
encodeURL, 转成了%20, 这个肯定是对的, 但是如果其他+过来, decode的时候按说是需要转成空格。
But + can stay the same. Isn't it wrong to decode? I don't know how to use it here. I used it to decode the value of the query parameter twice, and then something went wrong.
但+可以保持原样,这样decode不是就错了吗?不知道这里怎么用的,用着用着对query参数的value做两次decodeurl,然后就出问题了。
Yes, there is a problem here. It should be the same in the path part and escaped in the query part. But generally no one has a + sign in the path? It is not easy to trigger this bug under normal circumstances. It should not be decoded twice here.
是的,这里是有问题的, 应该是在path部分保持原样, 在query部分转义;不过一般没人在path里面有+号?正常情况下不容易触发这个bug。应该是这里不能做两次decode。
For example, the port 3000 has been changed to my custom port 8000, but when accessing the web console, the first step in the index.html will automatically jump to: port 3001, where is this port 3001 changed?
Modify it in the DEMO in the same directory.
在同目录的DEMO里面修改。
This is a bug of the user authentication module. This problem has been fixed in version 2.4.4 (20200612). You can try to update to a version above 2.4.4.
这是用户鉴权模块的Bug,已经在2.4.4(20200612)版本修复了这个问题,可以尝试更新到2.4.4以上的版本。
In /usr/local/app/web/config/webConf.js I modified the web port. Then COMMIT DOCKER later pulls up the new docker image again. Found that the contents of webConf.js are back to the default. Is there a convenient way to replace the web port? Or can you tell me where the webConf.js was generated? I will change the corresponding script.
/ usr / local / tars / cpp / deploy / web can be directly mapped using the host mode. The service will be automatically started when the container is started. This port may not be easy to change. It is recommended to use nginx proxy.
/usr/local/tars/cpp/deploy/web,可以使用host模式直接映射出来,容器启动的时候会自动启动服务,这个端口可能不太好改,建议用nginx代理一下。
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
Using docker.
Last log time
system time
Frame time
Host time
The date time in docker is correct, but the program time is not correct.
Maybe that it is related to insufficient memory resources and was killed by the system, it seems that these services are not up.
有可能和内存资源不足有关,被系统杀掉了,看起来就是这些服务都没起来。
The service has crashed. You can use the file command to check which service has crashed.Memory is recommended to use 2 core 4G at least.
服务崩溃了,可以使用file命令检查是哪个服务崩溃了。内存建议至少使用2核4G。
Screenshot of template file
Web console output
Log of Web
The template selected is a custom template. However, after I log in to the container and start this jar, it can work normally. How should I deal with this problem?
Starting the service through the console is not standardized, and there are many possible reasons for failure, such as incorrect input parameters and template file errors. The template file in Figure 1 is wrong. The values of some fields need to be replaced. Publishing through TarsWeb will automatically complete the replacement process. The high probability of error on the left of Figure 2 is because port 3001 is not opened, TarsWeb opens authentication by default, and you need to jump to port 3001. The latest TarsWeb has merged authentication, no more ports are opened, and can be repaired by upgrading TrsWeb.
通过控制台启动服务并不规范,失败可能原因较多,比如传入参数错误,模板文件错误等。图一中的模板文件是错误的,一些字段的值需要替换,通过TarsWeb发布会自动完成替换这个过程。图二左边错误大概率是因为3001端口没开,TarsWeb默认开启鉴权,需要跳转到3001端口。最新的TarsWeb已经将鉴权合并,不再多开端口,可以通过升级TarsWeb进行修复。
TarsWeb enables authentication by default, and port 3001 needs to be opened. The RetHat7 system has the problem of only opening port 22 even if the firewall is turned off. You need to use the firewall command firewall-cmd to open the corresponding port access. TarsWeb can also be updated to the latest version, the latest version has merged the authentication module, no need to open more ports.
TarsWeb默认开启鉴权,需要开启3001端口。RetHat7的系统存在即便关闭防火墙也只开放22端口的问题,需要使用防火墙命令firewall-cmd开启相应端口的访问权限。也可将TarsWeb更新到最新的一个版本,最新版本已经将鉴权模块合并,无需多开端口。
When tars are deployed with k8s, each pod has a tarsnode and service. When the service needs to be replaced, use k8s to republish. k8s will pull up a pod again, and the original pod will be deleted. There will be tarsnode information remaining in the main control, and the endpoint information is not deleted for the deleted node, resulting in the inaccessibility of the newly released service. It will not be accessible until the full load time reaches 1 hour later. Is there any way to circumvent this problem?
You can use statefullset, refer to the document https://doc.tarsyun.com/adminer/start/index.html#/tarsdoc/installation/k8s-docker-1.md , but the biggest problem with this deployment method is data Sharing needs to be solved by yourself. The performance of nfs is too slow. If it is deployed on the cloud, you may need to write the CSI plug-in yourself, and then hang the cloud disk in the container.
可以用statefullset,参照文档https://doc.tarsyun.com/adminer/start/index.html#/tarsdoc/installation/k8s-docker-1.md , 但这种部署方式最大的问题就是, 数据共享需要自己解决, 用nfs性能太慢, 如果部署在云上, 可能需要自己写CSI插件, 然后把云盘挂在到容器里面。
You can configure more than one here. At present, it is loop (rotation training). The server address is configured as xxxobj@tcp -H XXX - P 333: TCP - H XXX - P 222, so the remote log server can be configured for high availability.
这里配置多个就可以了,目前就是loop(轮训)了,服务器地址配置为xxxobj@tcp -h xxx -p 333:tcp -h xxx -p 222,这样配置远程日志服务器可以实现高可用。
No description provided.
tarslog requires a large hard disk, it is best to deploy independently; tarsstat&tarsproperty, at least 2G memory is recommended; other components do not have too many requirements.
tarslog需要大硬盘, 最好独立部署;tarsstat&tarsproperty, 建议至少2G内存;其他组件没有太大要求。
This is triggered by its own business, just like the 3.1 asynccontext of servlet, which is called after the end of its async business.
这个是自己业务触发的,和servlet的3.1的asynccontext一样,在自己的业务async事件结束后调用就好。
In the internal implementation, the type of completefuture is returned. It is triggered in the framework layer. Is the implementation of spring MVC the same?
在内部实现的时候,是返回了CompleteFuture的类型,在框架层去触发的,spring mvc的实现也是这样的吗?
Yes, that's spring encapsulation, but that's for HTTP, and the tars protocol now uses this API temporarily.
对,那个就是spring封装掉了,不过那个是针对http的,tars的协议现在暂时使用的是这个api。
Does this feature use demo in some examples?
这块的特性在example中有一些使用demo吗?
This will be disabled when compiling,
right? Will the online ones be banned?
Which compilation option is prohibited?
It is used for debugging. It should not be encountered normally. If it is encountered, it means there is a bug. If the online version is released, assert will not take effect. Under Linux, the default is release, which is automatically disabled. Don't forbid it in general. If the program is interrupted during running, it means there is a fatal bug.
调试用的,正常不应该碰到,碰到就说明有bug。线上的如果用release版本,assert就不会生效。 linux下默认就是release,release就自动禁止了。一般不要禁止,在跑程序时如果中断了,就说明有致命bug。
Can I crash it online?
那可以线上直接让它crash掉吗?
Assert usually doesn't crash and doesn't work normally. It should be tested and found that it shouldn't exist online. If it does exist online, it can only crash, otherwise the program can't work. If release is used, online assert will not be triggered. However, in this case, the program may be in an unknown state. For serious internal logic errors, this general debugging stage should be triggered. The reason why assert is convenient for debugging is that you can probably know what the problem is by looking at assert.
assert一般都是不crash也不能正常工作的,这种都应该测试就发现了,线上不应该有,如果线上真的有,就只能crash,不然程序都没法工作了。如果用的是release,线上assert不会触发的,不过真的有碰到这种情况,程序可能就处于未知状态了。 而严重的内部逻辑错误,这种一般debug阶段就应该触发了,之所以有assert,是调试方便,一看assert大概就知道是什么问题了。
After manually starting and stopping the service, upload the publishing service again, why can't the service start? Operation process: stop is to kill the process directly in the linux console, start is to use the corresponding executable program of the microservice + corresponding configuration to start, that is, directly enter the executable program execution under the node, prompting that the exception is a port conflict.
Generally, it is not recommended to start and stop the service directly by logging in to the server. There are certain security issues. Start or stop the service directly. If the command parameters are correct, there is usually no problem. The Tars Node startup service also starts the service by creating a shell execution file tars_start.sh, and saves the startup script in the bin directory of the corresponding service. Start the service manually. An exception occurs after manually starting and stopping the service. It may be because there is a problem with the parameter configuration when starting the service. You can refer to the startup script in the service bin directory. The difference between manually starting and stopping through the TarsFramework management is the service log. Each time the service is started and stopped through the Tars framework, the service information and status are updated in the database.
一般来说不建议通过登录服务器直接进行服务启动与停止,存在一定的安全问题。直接启动或停止服务,命令参数正确的话,通常不会存在问题,Tars Node启动服务也是通过创建shell执行文件tars_start.sh来启动服务的,并且会将启动脚本保存在对应服务的bin目录下,供手动启动服务。手动启停服务后出现异常,可能是因为启动服务时的参数配置存在问题,可以参考服务bin目录下的启动脚本。手动启停于通过TarsFramework管理的区别在于服务日志,每次通过Tars框架启动与停止服务都会在数据库中更新服务的信息与状态。
No description provided.
Cross service link tracking is a simple point, which can be transferred by setting its own value in context; for mature points, opentracing can be introduced. MDC is just a storage tool in a process or thread. It is convenient to pass some variables. Now it supports Zipkin. You can have a look at the document.
跨服务链路追踪,简单点,可以通过context自己赋值传递;成熟点,可以引入opentracing。mdc只是一个进程或者线程内的存储工具,方便传递一些变量,现在支持zipkin,可以看一下文档。
No description provided.
When writing a script to start, set a domain name corresponding to your current ip, to your /etc/hosts, and then set the environment variable: export DOMAIN = this domain name, and then use docker to start the framework, this should avoid this problem .
写脚本启动时, 设置一个域名名称对应你当前的ip, 到你的/etc/hosts,然后设置环境变量: export DOMAIN = 这个域名名称,再用docker方式启动framework,这样应该可以规避这个问题。
If the password of admin is forgotten, currently only the fields of related tables in the database can be reset to solve:
Log in to mysql View db: db_user_system Modify the table: t_user_info Reset admin user record, reset password to empty When logging in to the web, you will be prompted to set the admin password.
(Please refer to https://tarscloud.github.io/TarsDocs/installation/web.html#chapter-7 for password forgetting related content.)
如果admin的密码遗忘, 目前只能重置数据库中相关表的字段来解决:
登录mysql 查看db: db_user_system 修改表: t_user_info 重置admin用户记录, 将password重置为空 登录web时, 将会提示设置admin密码.
(可参照 https://tarscloud.github.io/TarsDocs/installation/web.html#chapter-7 中的密码遗忘处理相关内容。)
This test method always needs to restart the master node of docker, otherwise an error will be reported. When one service is stopped, another service will not be used.
Reason: It is possible that the time of the database and the registry is not synchronized, resulting in that the newly added service does not load the endpoint information into memory. In theory, if you stop a service, the registry will not delete the information of the stopped servant endpoint. Unless the one-hour full load time expires, the client call will still return two endpoints, but the client will do a connectivity test and select the one with a smooth connection. Solution: You can change the main frame time of tars to the time zone you want, such as +8 time zone, and then mysql modify the configuration file to +8 time zone. In addition, if the two applications are located on different physical machines, you need to make them between Keep time synchronized. You need to ensure that the time of the tars main control service is the same as the time of the virtual machine, otherwise the endpoint information cannot be loaded into memory.
原因:有可能数据库与registry的时间没有同步,导致新增加的服务没有将endpoint信息加载到内存中,理论上你停掉一个服务,registry是不会把停掉的servant的endpoint的信息删除的,除非等到一个小时的全量加载时间到了之后才会,客户端调用仍会返回两个endpoint,但客户端会做一个连接性测试,选出连接通畅的一个出来。 解决方法:你可以将tars的主框架时间改为你想要的时区,比如+8时区,然后mysql修改配置文件为+8时区,另外如果这两应用位于不同的物理机上,需要使他们之间保持时间同步。需要保证tars 主控服务的时间与虚拟机的时间是一样,否则endpoint信息没法加载到内存。
Refer to the example in the document (https://tarscloud.gitbook.io/tarsdocs/rumen/hello-world/tarsphp#chapter-4). In an existing http service, I copied the tars file and made a client requesting other tcp services. When I made the client according to the document, an error occurred after the request The error log appears to be pulled back after the service hung up(Remarks Figure is the abnormality of app_log). What is the reason?
The last line of the log can be ignored. After the general service is hung, all workers are not alive any more will continue to appear. A check will be performed every ten seconds. The log will be printed after the inspection. Not completely successful, so the test failed.
最后那行日志可以忽略,一般服务挂了之后会持续出现all workers are not alive any more,每十秒会进行一次检查,检查完就会打印日志,你的错误原因是因为10秒内服务没有完全启动成功,所以检测没有通过。
But the request for another tars service through http fails, and the TARS service is debugged correctly. As long as I request other tcp service through http cross service, an exception occurs.
但通过http请求另外的tars服务失败,TARS服务调试正确,只要我通过http跨服务请求其他tcp服务,就出现异常。
There should be a problem with the tars client code.
应该是tars client这部分的代码有问题。
Otherwise the client structure generated with tars2php.php, there is only one PHPHttp without PHPTars, and an error of not finding this class will be reported
否则用tars2php.php生成的客户端结构,没有PHPTars只有一个PHPHttp,会报找不到这个类的错误?
No, using PHPTars, there is a problem with tarsclient.proto.php in the document (https://doc.tarsyun.com/adminer/start/index.html#/tarsdoc/hello-world/tarsphp.md), please change the serverName to PHPTars. The servant directory structure generated by the client should be the same as the server, and appName, serverName, objName should point to the service being called.
否,使用PHPTars,文档(https://doc.tarsyun.com/adminer/start/index.html#/tarsdoc/hello-world/tarsphp.md )中的tarsclient.proto.php有问题,将它的serverName改成PHPTars。客户端生成的servant目录结构,应该和服务端是一样的,appName,serverName,objName应该指向的是被调用的服务。
The time of the tars framework is normal, and the time of service management is also correct.
This is the time of the tarsframework container.
This is the time that has been adjusted to Asia / Shanghai. Based on this adjustment, the time of other functions in TarsWeb is correct. Today, looking at the final heartbeat of the node, time is normal (See the blue box), but the timestamp when the framework was deployed yesterday was wrong (see the red box). I first deployed the framework, the time was May 16th, but the record was 17th. 172.25.0.11 This is a node node, which is deployed after the framework.
Maybe the time zone of the time in docker is not correct.
也许是docker内时间的时区不正确,一样节点的docker里的
In fact, the length of a lockless circular queue is made here.
这里其实是做了一个无锁环形队列长度。
There is a bug. It usually has permissions.
有bug,一般都带了权限。
Now P90 statistics is approximately average, which may not be strictly P90 data, because strictly P90 is to count the time-consuming of all requests, which will generate a lot of calculations. The current method is to calculate the P90 time-consuming of the request in the single pressure measurement process, and then weight the evaluation in the total process, which is approximate to the P90 data. In addition, we need to consider the data escape in the data use case. When analyzing the use case, if there are commas in the actual data, there will be some problems in the separation. The earlier platform of TAF didn't solve this problem, so it's better to make JSON. One solution is to modify these three keyword characters with , convert them before cutting processing logic, and replace them when filling, and fix them here in the next version. Or use the parser combiner, boost:: Spirit x 3.
现在P90的统计是做了近似平均,可能不是严格意义的p90数据,因为严格意义的p90是要统计所有请求的耗时,这样会产生大量的计算。现在的做法是单压测进程计算周期内请求的P90耗时,然后在总进程里面加权评估,是近似P90数据。 除此之外,还需要考虑数据用例里的数据转义,解析用例的时候,万一实际数据也有逗号啥的,分隔会有点问题,之前这个taf早期那个平台也没有解决这个,还是得搞成json的最好。 一种解决方案是后面遇到这3个关键字符用\修饰一下,切割处理逻辑前转换一下,填充的时候再换回来,下个版本修复一下这里。或者用parser combinator,boost::spiritx3。
The allocated virtual memory is not large enough.
分配的虚拟内存不够大。
There is no data for the day, and the data will be displayed the next day.
当天没有数据,第二天就会有数据显示。
There may be problems with the business code, configuration errors in the service deployment process, etc. There are many possible reasons, and you need to check the error log for troubleshooting
可能是业务代码存在问题、服务部署过程配置错误等,可能的原因很多,需要查阅错误日志进行排查
If you have any questions, please refer to the relevant documents in the documentation, check the issues in the web section.
有问题可以参考说明文档里,关于web的部分中检查问题的相关内容。
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
No description provided.
E:It's not thread-safe. C:线程不安全。
If using the tc_mysql library, does each servant need to instantiate an object?
如果使用tc_mysql的库,每个servant都需要实例化一个对象吗?
yes
是的
Generally mysql has limited links, multiple server deployment, each server has N servants, there will be many links, is it easy to exceed the number of links?
一般mysql有限定链接,多server部署,每个server有N个servant,便会有很多链接,链接数容易超限吗?
Not all services need to connect to the datebase, or you can have one mysql per partition. If it is a global service, you can have a proxy service to specifically communicate with mysql, so that the number of links will not exceed the limit
不是所有的服务都要连接datebase,或者可以每个分区一个mysql。如果是全局服务,可以做个代理服务专门去和mysql通讯,这样链接数就不会超限了
Below is a list of service status and feedback information.
E:It is very likely that your application will try to listen to this port twice before and after. For example, tarsphp will listen to 10002 when it is started, and it will also try to listen to this port when hyperf is initialized. C:很有可能你的应用前后两次尝试监听这个端口,比如tarsphp启动的时候监听了10002,hyperf初始化的时候也在尝试监听这个端口。
How can I check which ports are monitored by tarsphp?
如何查看tarsphp监听了哪些端口?
tarsphp only monitore the application port you configure.
tarsphp只监听你配置的应用端口。
Observe how long it took to start the service and fail to start it. It may have been started for a long time, and the heartbeat report was reported normally. For example, tarsphp starts the relevant registration first, and then starts the first detection and reporting of the heartbeat ten seconds later. In these 10 seconds, the hyperf is still initializing, and the hyperf hangs after the heartbeat is triggered. It is recommended to track the startup process code.
看刚启动服务到启动失败全程经历了多久,有可能中间启动了很久,心跳上报正常上报了。比如tarsphp先启动执行相关注册,然后十秒以后开始第一次检测和上报心跳,在这10秒里hyperf还在初始化中,心跳触发之后hyperf才挂掉,建议跟踪一下启动过程的代码。
`
E:The reason for the error is that it hasn’t gotten up yet. C:报错的原因是服务还没起来。
E:The node is not up.You can add a monitor script to monitor it, there is written in the document. C:节点没有起来。可以加一个monitor脚本, 监控一下, 文档里面有写。
E: Check whether the tarsAdminRegistry is started. If it is started, there is a framework check function on the web platform to check if there is a service configuration error. C:检查tarsAdminRegistry是否启动,如果启动了,在web平台上有一个框架检查功能, 检查一下,是否存在服务配置的错误。
E:Not normal, this is actually useless. This piece of logic seems to be useless in the current version. Before the internal version, it was loaded into memory for easy viewing. The current version can be checked directly on the web. C:不正常,这个其实没用。 这个段逻辑在目前版本好像是没用的, 内部版本之前是加载内存里面, 方便查看, 现在的版本可以直接用web查db了。
E:This time can be configured in the template. C:在模板里可以配置这个时间。
E:Yes. If the client has done the same, there will be two. C:答:是的。若客户端也做了的话。就会有两次。
During system initialization, stringtoproxy notifyhelper's proxy, computeifabsent will lock. Next, when initializing any proxy for the first time, updateservantendpoints will find available nodes, At this time, stringtoproxy queryhelper's proxy will be added internally The same communicator, the same concurringhashmap, the same cache, and the same computeifabsent are in infinite CAS loop.
When different objs happen to bump into a hashcode, and they are all in computeifabsent, there is a dead cycle.
What is the small version?
小版本是多少?
https://stackoverflow.com/questions/43861945/deadlock-in-concurrenthashmap This should be OK. It seems that in jdk8, this is the problem. As long as we avoid the use of computeifasent, we can avoid the nesting of computeifasent in computeifasent for the same map. If we simply change it, we don't need computeifasent. Once we have a solid container, null will be put into the new one, which should be no problem. Anyway, a reentrant lock is added before computeifabsent in getservantfactory.
https://stackoverflow.com/questions/43861945/deadlock-in-concurrenthashmap 这个应该还好。好像jdk8里,这个是问题。只要避免computeIfAbsent这个用法就好,同一个map,避免computeIfAbsent里嵌套computeIfAbsent,简单改的话,不用computeIfAbsent,老老实实contains一把,null就new一个put进去,应该就没问题。反正getServantFactory里computeIfAbsent前是加了一把可重入锁的。
This part has been modified in 1.7, but it will not have this problem in 1.6. After the problem is confirmed, it will be changed back. https://bugs.openjdk.java.net/browse/JDK-8161372 Oracle's official fix is up to 1.9. The old version still needs to use the old one. Do you want to avoid this problem with the mode provided here, or go back to the old operation mode.
这一部分1.7有修改,1.6不会有这个问题,后面问题确认后,就改回去。 https://bugs.openjdk.java.net/browse/JDK-8161372 oracle的官方的fix的时间是到了1.9的版本。老的版本还是要用老的,你这里提供的这个模式规避这个问题,还是要回退到老的操作模式。
What is the version of JDK used for reading? Haven't you met this problem?
阅文用的jdk版本是啥,没遇到这个问题么?
1.7 is a new one now, using version 1.8. This bug only exists when the reservationnode is expanded and operated by other threads. When spring operation is used, because tarsclient was initialized before. proxy.get When it is running, it must be. It will not be created when it is running. When this part of API is in 1.7, it's true that some of the code uses the new API. When this part is updated later, we need to look at the overall processing mode of JDK to have a controllable risk.
一部分是1.6的版本, 所以不产生这个问题 1.7的是现在新上的一部,使用的是1.8的版本。这个bug也就是在ReservationNode 在扩且被其他的线程操作的时候 才会有,使用的是spring操作的时候 ,因为tarsclient是在之前初始化掉了。proxy.get的时候,必然是有的,不会在运行的时候会有创建这种操作了。 这一部分api 在1.7的时候 ,确实一部分代码使用了新的api了,这一部后面在更新的时候,也要再看一下jdk的整体的一个处理的模式才可以有个可控的风险。
No description provided.
E:Generally, TCP is used, and UDP is basically not used in the intranet to ensure that the data will not be lost like UDP. C:一般都用tcp,内网基本不用udp了,保证数据不会像udp可能有丢失。
E:It is better to use strnstr. C:使用strnstr更好。
E:There is a framework check on the web platform. Check it and try. C:web平台上有一个框架检查,检查一下试试。
E:Yes. C:可以。
E:The new version only has .h file, so you only need to include this directory. C:新版本只有.h, 所以只需要include这个目录就可以了
No description provided.
E:tars is used as a keyword, business is not allowed, you can use “tars2cpp —with-tars xxx.tars”. C:tars作为关键字, 不允许业务使用的, 如果非要使用 tars2cpp —with-tars xxx.tars。
E:Answer one :No, just include applaction.h directly. Answer two:No,directly include: / usr / local / tars / cpp / include C:回答1:不需要,直接include applaction.h即可。 回答2:不需要,直接include: /usr/local/tars/cpp/include
E:Automatically generated, use the ps and grep instructions to find and display this process path. There is a conf directory under the corresponding directory, which contains this configuration file. C:自动生成,使用ps和grep指令查找显示这个进程路径。对应目录下有个conf目录,里面含有这种配置文件。
The following figure shows the startup log of tarsnode.
E:tarsnode will update this file regularly,When the update happens, the file will be cleared when the power is cut off. C:tarsnode会定时更新这个文件,当更新的时候正好断电这个文件内容会被清掉。
Copy this configuration file from another node, can I continue to use this node?
E:Yes, just replace the ip inside. C:可以,注意替换里面的ip即可。
No description provided.
E:The result of tarsnode compilation is a binary file, just replace the tarsnode executable file. C:tarsnode编译的结果就是一个bin,只替换这个tarsnode的执行文件即可。
But the management page shows off, and there is no log.
该issue长期未更新。如果问题依旧没解决,欢迎重新打开issue。TARS社区有您更精彩。 Thanks for your supporting. The issue has not been updated for a long time. If the problem is still not resolved, welcome to reopen the issue.
No, the two places marked in the figure generally do not need to be locked. The mark at the end of Recv MessageQ is the request distribution of the message queue, and the untimed requests are distributed to the handle threads. The second place is marked as Send MessageQ to return the request via network IO. Where there is a lock, it is usually the handle threads that put the returned result into the Send MessageQ process, and multiple processing threads safely send the operation to the queue.
不会,图中标注的两处地方一般情况下不需要锁,Recv MessageQ末端的标记处为消息队列的请求分发,将未超时的请求分发到handle threads中。第二处标记为Send MessageQ通过网络IO返回请求。有锁的地方一般为handle threads将返回结果放入Send MessageQ的过程中,多个处理线程线程安全地将操作发送队列
E:Yes.If it is not moved, it will be closed by the server. C:是的,放着不动, 就会被服务端关闭。
E:Unpack the uploaded package to see if hellogo is right or Linux program. C:将上传的压缩包解开看看HelloGo是否是对的, 是否是linux的程序。
I forget that I use MacOS, and go is easy to make this kind of error. In windows, I build in go and then manually package and publish. This kind of error is also common. This kind of error is easy to occur when the production package is not released in a period of time. It is easy to ignore the Linux problem when debugging locally.
No description provided.
E:C: \ tars \ cpp, this is the framework compiled and installed.cmake —build . —config Release —target install.You will go to C: \ tar \ cpp, and then go to this directory to execute the installation script. C:C:\tars\cpp , 这个是框架编译完, install出来的。cmake —build . —config Release —target install 就会到C:\tars\cpp, 然后就到这个目录下, 执行安装脚本。
It still can't, I tried several times according to the instructions, and then compiled all the exes, which means target install didn't execute.
E:It may be a Windows permission problem. Use the administrator user to open CMD. Otherwise, Disk C will not write. C:可能是windows权限问题,用管理员用户打开cmd,否则C盘不让写。
There is a compilation error of demouitl, and other running scripts have not reported an error.
E:That's what caused it. Mask this, do not compile demoutil, and remove "add" subdirectory (utildemo). C:就是这个引起的。把这个屏蔽掉,不编译demoutil,把"add_subdirectory(UtilDemo)"去掉。
yum install -y flex
E:It shouldn't be, MAC and Linux are the same. C:不应该, mac和linux是一样的。
Open install.sh and there is no place to download and install node.
E:Download the node installed by NVM with NVM. C:下载nvm,用nvm安装的node。
CentOS can connect to MySQL service under win with MySQL command, and run VMware under win. CentOS is installed in VMware, and mysql-h 192.168.8.109-uroot-p under CentOS can be connected.
E:This mode doesn't work, "docker network create - D bridge -- subnet = 192.168.8.0/16 -- gateway = 192.168.8.1 tars". This is just that IP looks like a subnet, and communication can't be done. C:这种模式行不通,"docker network create -d bridge --subnet=192.168.8.0/16 --gateway=192.168.8.1 tars",这个ip看起来是一个子网的,通信做不到。
E:The gateway address of the container bridge. C:容器网桥的网关地址。
E:No problem. Go to the container, or check the container. Maybe the network is not matched. C:没问题,进容器看看,或者inspect下容器,可能是网没配对。
#548.txt Who can help to read this document?
E:Gateway ip172.17.0.1/8 and container IP 192.168.8.109 may have problems. C:网关IP172.17.0.1/8,容器IP 192.168.8.109,可能会有问题。
Do you mean doker0?
E:The gateway is 172.17.0.1/16, but the same is not true. You can understand it by entering the container ifconfig. C:网关是172.17.0.1/16,不过一样不通,进容器ifconfig就懂了。
E:Remove the - d parameter at startup to see the running log, and you will know why you quit. C:启动的时候去掉-d参数可以看到运行日志,就知道为什么会退出了。
The above MySQL failure is the logs of docker, which is the connect failure.
E:IP is not matched. It is recommended to follow the tutorial. C:ip没配对,建议跟着教程做。
The tutorial begins with 172. Do you want to keep it the same? It can be changed to 192.168.
MySQL in the container can't be connected. Another MySQL service, does the container exit?
E:When starting the container, there will be an automatic framework installation process. If you fail to connect mysql during installation, you will automatically exit. C:启动容器的时候会有个框架自动安装过程,如果安装的时候连接MySQL失败会自动退出。
Is the IP of the container the same as that of the host when it is started? The container cannot connect to the MySQL of the host, so the container exits. How to locate it?
E:This is the problem of the network. It is recommended to follow the document completely first, and observe it after success. If you need to change Mysql to the host mysql, you don't need to change anything except the environment variables related to MySQL. C:这个是网络的问题,建议先完全按照文档进行一遍,成功之后观察一下。如果需要更换MySQL为宿主机MySQL的话,除了MySQL 相关的环境变量需要更改,别的都不用动。
E:Physical MEM size in the file "/proc/" + spid + "/statm" Unit: K (to be examined) C:"/proc/" + spid + "/statm"这个文件里面的, physical mem size,单位为K(待考证)
E:Restart will call the service interface, each tars has an admin management port for tarsnode. C:重启调用服务的接口,每个tars有一个admin的管理端口给tarsnode调用。
No description provided.
E:You need to look at the content of the specific replacement, some are replaced by the replacement script, and some are replaced by mysql-tool replacement text. C:需要看具体替换的内容,有的是replace脚本替换的,有的是mysql-tool替换文本替换的。
No description provided.
E:Yes. When writing the service address on the web platform,you fill in the ip you need. C:可以。在web平台上写服务地址的时候,填入你需要的ip。
No description provided.
E:Because the time of the tars registry is inconsistent with that of the database, the cache is always read and will not be updated. Kill the process of the registry, and the registry will restart. C:因为Tars注册中心的时间和数据库的时间不一致,导致一直读的是缓存,不会更新。把注册中心的进程kill掉,注册中心重启后就有了。
No description provided.
E:An obj name corresponds to a port. For details, see < XXX. XXX. Obyadapter > in server.conf, where service, endpoint and protocol are one-to-one correspondence. There won't be much benefit from deploying multiple instances on one server, because when the same service is deployed on one server, there will be no usability consideration. When one server hangs up, it will no longer provide available services. C:一个obj name对应一个端口。具体可以看一下server.conf里的<xxx.xxx.objAdapter>,里面servant,endpoint和protocol是一一对应的; 一台服务器上面部署多个实例并不会有太多的收益 ,因为相同的服务部署在一台服务器上面 ,就没有可用性方面的考量了,当一台服务器挂掉的时候 ,就不再提供可用的服务了。
E:The cluster version of percona xtradb cluster aims to solve a large number of transactions and calculations. Percona xtradb cluster prohibits DML and other operations on a table. If you want to use this version of the storage engine, you need to manually handle some of the table types. C:Percona-XtraDB-Cluster的集群版本的目标是解决大量事务和计算使用的。Percona-XtraDB-Cluster禁止在一张表上有DML等操作。若是要使用这个版本的存储引擎的时候 ,需要手工处理一部分表的类型。
2020-05-05 19:50:05|139781505799936|ERROR[StatDbManager::updateEcsStatus exception: [TC_ Mysl::execute]: mysql query: update 't ecstatus' set lasttime' = '20200505 1950' where appname='tars_ stat_ 172.16.68.159' and action=0 ] : Percona-XtraDB- Cluster prohibits use of DML command on a table (tars_ stat.t ecstatus) that resides in non-transactional storage engine with pxc strict_ mode = ENFORCING or MASTER 2020-05-05 19:50:05|139781505799936|DEBUG|IsdbTableExistishow tables like '%t ecstatus%|affected:1 2020-05-05 19:50:05|139781505799936|ERRORITARS NOTIFY ERROR ERROR:172.16.68.159lupdateEcsStatus ip:47.99.135.112|por:3306: 统计入库失败,请及时处理!