inada-s / zdxsv

Gundam vs. Zeta Gundam private game server
https://zdxsv.net
GNU Affero General Public License v3.0
10 stars 6 forks source link

The proxy server received an invalid response from an upstream server #6

Closed kennethim closed 5 years ago

kennethim commented 5 years ago

Hi Inada-s,

I use the command "docker-compose up" to launch the container, but I got the below error when click the "register" button on PS2. Do you have any idea how to solve this issue?

Proxy Error

The proxy server received an invalid response from an upstream server. The proxy server could not handle the request

Reason: Error reading from remote server


Apache/2.4.18 (Ubuntu) Server at www01.kddi-mmbb.jp Port 443

Here is the log message: legacyweb_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message legacyweb_1 | [Sun Oct 20 19:52:00.995044 2019] [mpm_prefork:notice] [pid 8] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations legacyweb_1 | [Sun Oct 20 19:52:00.995137 2019] [core:notice] [pid 8] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND' legacyweb_1 | [Mon Oct 21 08:59:59.837958 2019] [proxy_http:error] [pid 14] (20014)Internal error (specific information not available): [client 172.18.0.4:54834] AH01102: error reading status line from remote server login:80, referer: https://www01.kddi-mmbb.jp/00000020/CRS-top.jsp legacyweb_1 | [Mon Oct 21 08:59:59.838091 2019] [proxy:error] [pid 14] [client 172.18.0.4:54834] AH00898: Error reading from remote server returned by /00000020/register, referer: https://www01.kddi-mmbb.jp/00000020/CRS-top.jsp

inada-s commented 5 years ago

I'm sorry for the lack of docs. probably there is an error on login server. firstly you have to initialize sqlite database 'zdxsv.db'. please try to run 'zdxsv initdb' command and check the database is initialized.

inada-s commented 5 years ago

once a file mounted as directory, docker compose will fail to up. When you got it, run 'docker-compose down'.

kennethim commented 5 years ago

Hi Inada, I tried your method but I still got the same error.


legacyweb_1 [Tue Oct 22 06:33:50.082133 2019] [proxy_http:error] [pid 9] (20014)Internal error (specific information not available): [client 172.26.0.5:42256] AH01102: error reading status line from remote server login:80, referer: https://www01.kddi-mmbb.jp/00000020/register legacyweb_1 [Tue Oct 22 06:33:50.082197 2019] [proxy:error] [pid 9] [client 172.26.0.5:42256] AH00898: Error reading from remote server returned by /00000020/register, referer: https://www01.kddi-mmbb.jp/00000020/register login_1 E1021 21:33:50.0817941 top.go:135] unable to open database file login_1 2019/10/21 21:33:50 http: superfluous response.WriteHeader call from main.(*wrapper).WriteHeader (login.go:67) login_1 2019/10/21 21:33:50 http: panic serving 172.26.0.2:56494: runtime error: invalid memory address or nil pointer dereference

inada-s commented 5 years ago

the error unable to open database file come here. https://github.com/inada-s/zdxsv/blob/a1a7e09b89467256dbd8c3386210cdcf87cb0269/pkg/login/top.go#L135

I guess the database is not initialized or not correctly mounted.

inada-s commented 5 years ago

please initialize database following way.

# on repository root.
$ls zdxsv.db
ls: zdxsv.db: No such file or directory
$make
mkdir -p bin
go build -o ./bin/zdxsv ./src/zdxsv
go build -o ./bin/bench ./src/bench
go build -o ./bin/zproxy ./src/zproxy
$ ./bin/zdxsv initdb local.toml
I1021 23:37:28.622919   77316 main.go:98] [initdb local.toml] 2
$ls zdxsv.db
zdxsv.db
$sqlite3 zdxsv.db
SQLite version 3.24.0 2018-06-04 14:10:15
Enter ".help" for usage hints.
sqlite> .table
account      battle_user  user
sqlite> ^D
kennethim commented 5 years ago

Thanks for your help!!!!!!!!! Everything is OK!!!!^^^^^