安装命令 docker run --detach --name solo --network=host --env RUNTIME_DB='MYSQL' --env JDBC_USERNAME='******' --env JDBC_PASSWORD='******' --env JDBC_DRIVER='com.my ..

腾讯云 docker 部署 solo 无法登录后台

安装命令

docker run --detach --name solo --network=host --env RUNTIME_DB="MYSQL" --env JDBC_USERNAME="******" --env JDBC_PASSWORD="******" --env JDBC_DRIVER="com.mysql.cj.jdbc.Driver" --env JDBC_URL="jdbc:mysql://*.*.*.*:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true" b3log/solo --listen_port=8080 --server_scheme=http --server_host=blog.lijida.cn

登录后台报错:

Caused by: jodd.http.HttpException: Can't connect to: https://hacpai.com/oauth/solo/client2; <--- java.net.SocketTimeoutException: connect timed out
	at jodd.http.HttpRequest.open(HttpRequest.java:777)
	at jodd.http.HttpRequest.open(HttpRequest.java:759)
	at jodd.http.HttpRequest._send(HttpRequest.java:887)
	at jodd.http.HttpRequest.send(HttpRequest.java:853)
	at org.b3log.solo.processor.OAuthProcessor.redirectAuth(OAuthProcessor.java:117)
	at org.b3log.solo.processor.OAuthProcessor_$$_jvst2b8_27._d8redirectAuth(OAuthProcessor_$$_jvst2b8_27.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.b3log.latke.ioc.JavassistMethodHandler.invoke(JavassistMethodHandler.java:116)
	at org.b3log.solo.processor.OAuthProcessor_$$_jvst2b8_27.redirectAuth(OAuthProcessor_$$_jvst2b8_27.java)
	... 44 more
Caused by: java.net.SocketTimeoutException: connect timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at jodd.http.Sockets.connect(Sockets.java:55)
	at jodd.http.net.SocketHttpConnectionProvider.createSSLSocket(SocketHttpConnectionProvider.java:182)
	at jodd.http.net.SocketHttpConnectionProvider.createHttpConnection(SocketHttpConnectionProvider.java:99)
	at jodd.http.HttpRequest.open(HttpRequest.java:775)
	... 55 more
	at jodd.http.HttpRequest.open(HttpRequest.java:759)
	at jodd.http.HttpRequest._send(HttpRequest.java:887)
	at jodd.http.HttpRequest.send(HttpRequest.java:853)
	at org.b3log.solo.processor.OAuthProcessor.redirectAuth(OAuthProcessor.java:117)
	at org.b3log.solo.processor.OAuthProcessor_$$_jvst2b8_27._d8redirectAuth(OAuthProcessor_$$_jvst2b8_27.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.b3log.latke.ioc.JavassistMethodHandler.invoke(JavassistMethodHandler.java:116)
	at org.b3log.solo.processor.OAuthProcessor_$$_jvst2b8_27.redirectAuth(OAuthProcessor_$$_jvst2b8_27.java)
	... 44 more
Caused by: java.net.SocketTimeoutException: connect timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at jodd.http.Sockets.connect(Sockets.java:55)
	at jodd.http.net.SocketHttpConnectionProvider.createSSLSocket(SocketHttpConnectionProvider.java:182)
	at jodd.http.net.SocketHttpConnectionProvider.createHttpConnection(SocketHttpConnectionProvider.java:99)
	at jodd.http.HttpRequest.open(HttpRequest.java:775)
	... 55 more
[INFO ]-[2019-10-25 10:51:17]-[org.b3log.solo.service.ExportService:153]: Github repo syncing....
[INFO ]-[2019-10-25 10:51:17]-[org.b3log.solo.service.ExportService:269]: Github repo synced

有哪位大神能帮忙解决一下吗

  • Solo

    Solo 是一款小而美的开源博客系统,专为程序员设计。

    Solo 有着非常活跃的社区,可将文章作为帖子推送到社区,来自社区的回帖将作为博客评论进行联动。

    这是一种全新的网络社区体验,让热爱记录和分享的你不再感到孤单!
    具体细节请浏览 B3log 构思

    877 引用 • 6713 回帖 • 669 关注
  • Q&A

    提问之前请先看《提问的智慧》,好的问题比好的答案更有价值。

    1318 引用 • 8600 回帖 • 578 关注
8 回帖
请输入回帖内容...
  • 88250

    在服务器上 ping 一下社区看看:ping hacpai.com

    1 回复
  • weiweihaha

    ping 不通,我加了 118.31.188.179 的配置后才可以 ping 通

    1 回复
  • 88250

    那可能是你服务器 DNS 解析配置有问题吧。

    1 回复
  • weiweihaha

    和这个异常有关系吗,现在可以 ping 通社区了

    [ERROR]-[2019-10-25 11:17:55]-[org.b3log.latke.servlet.RequestContext:550]: Handler process failed: Request [
        method=GET,
        URL=http://blog.lijida.cn/oauth/github/redirect,
        contentType=null,
        characterEncoding=UTF-8,
        local=[
            addr=127.0.0.1,
            port=8080,
            name=127.0.0.1],
        remote=[
            addr=171.221.199.38,
            port=59400,
            host=127.0.0.1],
        headers=[
            Accept=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
            Upgrade-Insecure-Requests=1
            Connection=close
            User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.108 Safari/537.36
            Referer=http://blog.lijida.cn/oauth/github/redirect?referer=http%3A%2F%2Fblog.lijida.cn%2F__0
            Host=blog.lijida.cn:80
            Accept-Encoding=gzip, deflate
            Accept-Language=zh-CN,zh;q=0.9
            X-Real-IP=171.221.199.38
        ]
    ] 
    
    1 回复
  • 88250

    这段日志说的是请求失败,下面应该还有异常日志是导致失败的原因。

  • AdlerED

    网络问题,没连接到 HacPai 的接口。
    你用下边命令:

    curl https://hacpai.com/oauth/solo/client2
    

    看看能不能收到:

    `{"msg":"","code":0,"data":{"clientId":"77f93670fee557xxxxxx","loginAuthURL":"https://github.com/login/oauth/authorize"}}`
    

    或者类似的包,如果请求超时,是运营商的网络连接问题

    1 回复
  • weiweihaha

    解决了,安全组没有配置 443 出入站规则,感谢大佬的热情解答

    1 回复
  • AdlerED

    哈哈哈哈哈,出站规则建议全部允许,只要设置入站规则就好啦

请输入回帖内容 ...