Closed TARS-Question closed 4 years ago
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秒内服务没有完全启动成功,所以检测没有通过。
The current situation is that the request for http service is normal.
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服务正常。
但通过http请求另外的tars服务失败,TARS服务调试正确,只要我通过http跨服务请求其他tcp服务,就出现异常。
There should be a problem with the tars client code.
应该是tars client这部分的代码有问题。
Should the PHPTars in the red box in the sample code be changed to PHTHttp.
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
范例代码中红色框中的PHPTars是否要改成PHTHttp
否则用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应该指向的是被调用的服务。