Open sfxworks opened 6 years ago
Can you send me your users.conf
file? Please remove the password in it for security.
Also the permissions.conf
file would be useful. You can also replace any sensitive information in there before posting it. Thank you!
No problem. See below. Thanks!
[root@mc-server-dev webapi]# cat user.conf
users {
quantomworks {
password="[omitted]"
permissions="*"
}
}
# Config file version, used to update correctly
version=1
[root@mc-server-dev webapi]# cat permissions.conf
# The access control origin header that is sent with each request. This is useful if you want to prevent CORS, but remember that it must at least include the server where the AdminPanel is running
accessControlOrigin="*"
# The servers which are allowed to pass the X-Forwarded-For header indicating that they are forwarding a request for a client and are themselves a proxy
allowedProxies=[
"127.0.0.1"
]
# Add the IP addresses that are NOT allowed to connect to the Web-API to this list
blacklist=null
# These are the default permissions that a client without a key receives
default {
# All the valid permissions are listed on the redoc endpoint. You can also use the "*" to grant access to all endpoints. Check GitHub for more information about permissions _EXAMPLE_
permissions {
info="*"
}
# The rate limit specifies how many operations per second a client with no key can execute
rateLimit=10
}
# This is an array of keys, defining which keys give access to which endpoints.
keys=[
{
# Set to true to enable this permission. Remember to change the key to something secure first
enabled=false
# The key can be any token/password, but should probably be randomly generated and 16 or more characters long.
key=USER
# The permissions array accepts the same permissions as the default permissions array above.
permissions {
cmd {
"*"=true
}
history {
"*"=true
}
info {
"*"=true
}
player {
"*"=true
}
plugins {
"*"=true
}
world {
"*"=true
}
}
# The number of operations per second that a client with this key can execute
rateLimit=100
},
{
# Set to true to enable this permission. Remember to change the key to something secure first
enabled=false
# The key can be any token/password, but should probably be randomly generated and 16 or more characters long.
key=ADMIN
# The permissions array accepts the same permissions as the default permissions array above.
permissions {
"*"=true
}
# No rate limit or zero = unlimited requests
rateLimit=0
}
]
# Set this to true to enable the blacklist, false to turn it off
useBlacklist=false
# Set this to true to enable the whitelist, false to turn it off
useWhitelist=true
# Config file version, used to update correctly
version=5
# Add IP address that are allowed to connect to the Web-API to this list
whitelist=[
"127.0.0.1",
"68.10.207.127"
]
I can't seem to reproduce this. What version of Web-API are you using? And when exactly does these errors show up? Just when you're viewing the AdminPanel in general? Or when you're trying to login. Also are you running the built-in or a separate version of the AdminPanel (if you're not sure it's probably built-in)?
Did this occur while you were on the "map" page of the AdminPanel?
Sorry for the delay.
This occurs on random pages at random loads/reloads. Will fetch version soon.
So generally all user accounts get a request limit of 10/second, which should be more than enough. You could try adding rateLimit=100
to your users.conf
file after the permissions
entry.
This wouldn't really fix the problem though, as it shouldn't be happening in the first place...
Any updates on this? Otherwise I would close this issue.
Features that worked before are suddenly timing out on a new server with nobody on and with 20 tps...
Randomly getting request timeout exceeded API errors...
They keep happening. These were taken 4 minutes ago from writing this but they keep happening. Also my IP is on the include list which is why I can login. Even refreshing the page it randomly works but its randomly having issues..
Possibly relevant chrome logs: