TinyWebServer
TinyWebServer copied to clipboard
求助:在云服务器上运行,9006端口已打开,main.cpp也配置好了,仍出现以下错误
server: webserver.cpp:131: void WebServer::eventListen(): Assertion `ret >= 0' failed. Aborted (core dumped)
已解决,原因是mysql的root用户只能访问本地,修改用户权限即可。
请问下有出现过timer tick错误吗?
你好,没有碰到过你所说的这种错误。
发送自 Windows 10 版邮件https://go.microsoft.com/fwlink/?LinkId=550986应用
发件人: @.> 发送时间: 2021年4月9日 14:25 收件人: @.> 抄送: @.>; @.> 主题: Re: [qinguoyi/TinyWebServer] 求助:在云服务器上运行,9006端口已打开,main.cpp也配置好了,仍出现以下错误 (#51)
请问下有出现过timer tick错误吗?
― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/qinguoyi/TinyWebServer/issues/51#issuecomment-816442649, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZELS7XIIBN2UNVG6VSLWLTH2MUZANCNFSM42Q3RBHQ.
感谢你的回复!麻烦再请教一个问题🙏🏻 我按照步骤,连接上了server。然后在再浏览器中输入 127.0.0.1:9006, 却无法连接到服务器。我使用netstat -anp命令,发现默认端口在使用中了,说明server开启状态。可是不知道为何浏览器上无法访问到。log报错信息就是timer tick了,不知道你有什么建议吗? 谢谢!
[cid:A987C46D-6969-4DB1-9D67-E7CBE077FBF7]
[cid:7612D5E4-CA0B-4B2A-BFD9-A7C7708D36DC] [cid:192560B7-CA69-417B-AD45-F8CC762B2D0B]
On Apr 9, 2021, at 3:15 PM, WjLiu @.@.>> wrote:
你好,没有碰到过你所说的这种错误。
发送自 Windows 10 版邮件https://go.microsoft.com/fwlink/?LinkId=550986应用
发件人: @.> 发送时间: 2021年4月9日 14:25 收件人: @.> 抄送: @.>; @.> 主题: Re: [qinguoyi/TinyWebServer] 求助:在云服务器上运行,9006端口已打开,main.cpp也配置好了,仍出现以下错误 (#51)
请问下有出现过timer tick错误吗?
― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/qinguoyi/TinyWebServer/issues/51#issuecomment-816442649, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZELS7XIIBN2UNVG6VSLWLTH2MUZANCNFSM42Q3RBHQ.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/qinguoyi/TinyWebServer/issues/51#issuecomment-816468617, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMXSKYV4MNF3TL7E4TL6JVTTH2SPRANCNFSM42Q3RBHQ.
[https://www.polyu.edu.hk/emaildisclaimer/PolyU_Email_Signature.jpg]
Disclaimer:
This message (including any attachments) contains confidential information intended for a specific individual and purpose. If you are not the intended recipient, you should delete this message and notify the sender and The Hong Kong Polytechnic University (the University) immediately. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited and may be unlawful.
The University specifically denies any responsibility for the accuracy or quality of information obtained through University E-mail Facilities. Any views and opinions expressed are only those of the author(s) and do not necessarily represent those of the University and the University accepts no liability whatsoever for any losses or damages incurred or caused to any party as a result of the use of such information.
time tick不是报错,服务器开启状态下如果5秒内没有新的请求就会写入一个time tick到log。 我不知道你是本地设备还是云服务器在运行这个项目。如果是本地设备,以新装的ubuntu 20.4和新装的mysql 8.0为例,运行这个项目的操作过程是:(1):更改mysql root用户密码和远程连接,具体见https://blog.csdn.net/qq_40088207/article/details/104950894;(2):按项目里README操作并运行,如果mysql.h文件报错,则说明lib中没有mysql/mysql.h文件,需要在终端输入sudo apt-get install libmysql++-dev
在云服务器运行只是多一个开放9006端口的操作,同时也要在云服务控制台上开放对应端口;
浏览器一直没反应 我不知道为什么
浏览器一直没反应 我不知道为什么
服务器端口没开放吧,防火墙看下
可能时你的资源 目录没设置吧 。可以先在服务器上使用wget判断一下能不能获取。如果可以那可能时防火墙错误,只配置云服务器的安全组
您好!我也遇到了同样的问题,但是修改mysql中root用户的权限以后,问题仍然没解决,请问您是如何修改的呢
我是云服务器的防火墙没打开9006端口,选择打开云服务器入流量的所有端口试试
搭建过程遇到的问题: 问题1:编译过程中mysql.h报错,编译库的位置问题 在编译时添加相应的lib和include文件路径 问题2:日志显示MySQL ERROR, 数据库连接池的问题,把webserver.cpp中的数据库连接池的构造函数init那里,把第一个参数'localhost"改为"127.0.0.1"就可以了 问题3:在服务器上的防火墙打开9007端口 打开想要的端口(以9000为例):ufw allow 9000 查看本机端口使用情况:ufw status
我是云服务器的防火墙没打开9006端口,选择打开云服务器入流量的所有端口试试
是我我打开云服务器端口就可以了,感谢~
进入mysql shell
mysql -u root -p
给root开启可远程登录
ALTER user 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123123';
FLUSH PRIVILEGES;
我之前就这两步骤没做 连接不上mysql,你试一试 | | 飞鸟飞啊飞 | | @.*** | 签名由网易邮箱大师定制 在2021年11月3日 @.***> 写道:
已解决,原因是mysql的root用户只能访问本地,修改用户权限即可。
请问可以具体说一下怎么修改权限的吗,我mysql8把那个host下面的localhost修改成了%运行还是出这个错位
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
进入mysql shell mysql -u root -p ## 给root开启可远程登录 ALTER user 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123123'; FLUSH PRIVILEGES; 我之前就这两步骤没做 连接不上mysql,你试一试 | | 飞鸟飞啊飞 | | @.*** | 签名由网易邮箱大师定制 在2021年11月3日 @.***> 写道: 已解决,原因是mysql的root用户只能访问本地,修改用户权限即可。 请问可以具体说一下怎么修改权限的吗,我mysql8把那个host下面的localhost修改成了%运行还是出这个错位 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
我昨天也是这样做的,我今天发现了应该是我服务器的端口没开导致的,目前还没尝试,感谢您的回复
我遇到这个情况重启云服务器就行了