franga2000 / BungeeStatus

A PHP powered website to show players the status of your BungeeCord network
GNU General Public License v2.0
9 stars 7 forks source link

where's a syntax error on my servers.json? #7

Open kimpp200 opened 9 years ago

kimpp200 commented 9 years ago

I said

'It only shows "Network status" '

and author said

'You have an error in your server.json syntax. You can check it here: http://yaml-online-parser.appspot.com/'

so i post my servers.json file. I cannot recognize where my json file has an error,

{
  "servers": [
    {
      "Name": "BungeeCord",
      "Adress": "mc.postech.ac.kr",
      "Port": 25565,
      "Description": "The server you connect to"
      "Offline_reason": "inspection"
    },
    {
      "Name": "hub",
      "Adress": "mc.postech.ac.kr",
      "Port": 25548,
      "Description": "Connection server"
      "Offline_reason": "inspection"
    },
    {
      "Name": "main",
      "Adress": "mc.postech.ac.kr",
      "Port": 25566,
      "Description": "semi-vanilla server",
      "Offline_reason": "inspection"
    },
    {
      "Name": "arena",
      "Adress": "mc.postech.ac.kr",
      "Port": 25550,
      "Description": "RPG with mini games"
      "Offline_reason": "inspection"
    },
    {
      "Name": "builders",
      "Adress": "mc.postech.ac.kr",
      "Port": 25552,
      "Description": "Creative server"
      "Offline_reason": "inspection"
    },
    {
      "Name": "apocalypse",
      "Adress": "mc.postech.ac.kr",
      "Port": 25551,
      "Description": "semi-vanilla server",
      "Offline_reason": "inspection"
    },
    {
      "Name": "sky",
      "Adress": "mc.postech.ac.kr",
      "Port": 25547,
      "Description": "Creative server"
      "Offline_reason": "inspection"
    },
    {
      "Name": "pocketmon",
      "Adress": "mc.postech.ac.kr",
      "Port": 25549,
      "Description": "Pocketmon server"
      "Offline_reason": "inspection"
    }
  ]
}
kimpp200 commented 9 years ago

So I erased all things but main like below

{
  "servers": [
    {
      "Name": "main",
      "Adress": "mc.postech.ac.kr",
      "Port": 25566,
      "Description": "semi-vanilla server",
      "Offline_reason": "inspection"
    }
  ]
}

then it shows main, but it shows loading, and when i click the main hyperlink, it shows offline

kimpp200 commented 9 years ago

Now, I find another way.

I changed server list on admin website.

Through that way, it shows the server list well.

However, the other things are loading continuously... and when i click the name of the server,

it shows offline even the server is still working.

In addition, in bungee config file, query is enabled.

like this: https://mc.postech.ac.kr:8443/status/

there's no Refresh timer

franga2000 commented 9 years ago
  1. Did you make sure you enabled query in your server.properties
  2. I think you have an old version

I'll be releasing a new version in a few days that has auto update

franga2000 commented 9 years ago

LOL. Accidentally closed (facepalm)

kimpp200 commented 9 years ago

thanks so much for your reply!

I enabled query but it doesn't seem to work... so I eagerly wait update!

If you update it, please let me know by replying here :D

franga2000 commented 9 years ago

New version released: 1.6. Please close the issue if the new version works

kimpp200 commented 9 years ago

Thanks for your update!

Unfortunately, I stuck on adding server.

This is our webpage which shows network status: https://mc.postech.ac.kr:8443/status/

and I tried to add servers here: https://mc.postech.ac.kr:8443/status/admin

However, it shows error as below

Bad Request

Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please.

Hint: https://mc.postech.ac.kr:8443/

Always thanks for your kindness!

kimpp200 commented 9 years ago

Next, I tried to add a server by editing servers.json file.

[
  {
    "servers": [
      {
        "Name": "main",
        "Adress": "mc.postech.ac.kr",
        "Port": 25566,
        "Description": "semi-vanilla server",
        "Offline_reason": "inspection"
      }
    ]
  }
]

However, it is loading continuously...

I cannot recognize where server.json syntax is incorrect.. would you mind helping me know which part is incorrect?

Of course I set the variables in main's server.properties file as

query.port=25566 enable-query=true server-port=25566

franga2000 commented 9 years ago

It looks like your server doesn't support something that the app needs. I'll send you a debug file to find out why

franga2000 commented 9 years ago

Put the following code in a .php file, open it in a browser, look for a section called Sockets and see if Sockets Support is enabled:

<?php $info = phpinfo(INFO_MODULES) ?>
kimpp200 commented 9 years ago

I did it as you said,

https://mc.postech.ac.kr:8443/status/

I inserted the code in the first line of the status/index.php file.

Do I have to insert that code to another .php file?

franga2000 commented 9 years ago

I checkd and your server does have sockets support so I have no idea why it isn't working. I'll do a bit more debugging when I get to my PC

kimpp200 commented 9 years ago

good works for BungeeStatus 1.7!

However, as you can see here: https://mc.postech.ac.kr:8443/status/

the front page loads infinitely...

and some servers show the data of players e.g., '0/50 Players' and the others not.

Builders, pocketmon, and tribe show the data and main, apocalypse, and arena don't.

franga2000 commented 9 years ago

Are there any errors in your server log?

kimpp200 commented 9 years ago

well... there are just some plugin errors..not bungeestatus.

[Server thread/INFO]: Starting GS4 status listener [Query Listener #1/INFO]: Query running on 127.0.0.1:25566

do i have to set query.port different from server-port?

I set query.port same as server-port

franga2000 commented 9 years ago

I'm sorry for not replying, I didn't see the email notification. I meant your web server (or PHP) log.