Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 22 18:59
    andreyv closed #1146
  • Nov 22 18:59
    andreyv commented #1146
  • Nov 22 18:29
    andreyv commented #1158
  • Nov 22 16:40

    andreyv on master

    Make PrintingService translatab… (compare)

  • Nov 22 16:40
    andreyv closed #1152
  • Nov 22 16:40
    andreyv commented #1152
  • Nov 22 16:17
    andreyv commented #1151
  • Nov 22 15:20

    andreyv on master

    Don't open title page input fil… (compare)

  • Nov 22 15:20
    andreyv closed #1150
  • Nov 22 15:20
    andreyv commented #1150
  • Nov 15 20:37
    CristianCantoro closed #1166
  • Nov 15 20:37
    CristianCantoro commented #1166
  • Nov 15 20:36
    CristianCantoro closed #1168
  • Nov 15 20:36
    CristianCantoro commented #1168
  • Nov 15 11:52
    wil93 commented #1168
  • Nov 15 11:48
    CristianCantoro opened #1168
  • Nov 15 11:44
    CristianCantoro reopened #1166
  • Nov 15 11:44
    CristianCantoro commented #1166
  • Nov 15 11:35
    CristianCantoro commented #1166
  • Nov 15 11:30
    CristianCantoro closed #1166
Andrey Vihrov
@andreyv
Please, try to run psql -d cmsdb -U cmsuser -c '\dt' under your normal user account; what does it output?
MacTin
@MacTin
ok
FATAL: Peer authentication failed for user "cmsuser"
Andrey Vihrov
@andreyv
That is the problem. Please check that the DB password for cmsuser is correct, and that password authentication is allowed for the user (see /etc/postgresql/10/main/pg_hba.conf or similar depending on your postgres version).
Probably you need to set the md5 or similar authentication method for the user
Default is peer authentication, but your Unix user is not cmsuser, so it can't work in this case
MacTin
@MacTin
the pg_hba.conf

PostgreSQL Client Authentication Configuration File

===================================================

#

Refer to the "Client Authentication" section in the PostgreSQL

documentation for a complete description of this file. A short

synopsis follows.

#

This file controls: which hosts are allowed to connect, how clients

are authenticated, which PostgreSQL user names they can use, which

databases they can access. Records take one of these forms:

#

local DATABASE USER METHOD [OPTIONS]

host DATABASE USER ADDRESS METHOD [OPTIONS]

hostssl DATABASE USER ADDRESS METHOD [OPTIONS]

hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]

#

(The uppercase items must be replaced by actual values.)

#

The first field is the connection type: "local" is a Unix-domain

socket, "host" is either a plain or SSL-encrypted TCP/IP socket,

"hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a

plain TCP/IP socket.

#

DATABASE can be "all", "sameuser", "samerole", "replication", a

database name, or a comma-separated list thereof. The "all"

keyword does not match "replication". Access to replication

must be enabled in a separate record (see example below).

#

USER can be "all", a user name, a group name prefixed with "+", or a

comma-separated list thereof. In both the DATABASE and USER fields

you can also write a file name prefixed with "@" to include names

from a separate file.

#

ADDRESS specifies the set of hosts the record matches. It can be a

host name, or it is made up of an IP address and a CIDR mask that is

an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that

specifies the number of significant bits in the mask. A host name

that starts with a dot (.) matches a suffix of the actual host name.

Alternatively, you can write an IP address and netmask in separate

columns to specify the set of hosts. Instead of a CIDR-address, you

can write "samehost" to match any of the server's own IP addresses,

or "samenet" to match any address in any subnet that the server is

directly connected to.

#

METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",

"gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".

Note that "password" sends passwords in clear text; "md5" or

"scram-sha-256" are preferred since they send encrypted passwords.

#

OPTIONS are a set of options for the authentication in the format

NAME=VALUE. The available options depend on the different

authentication methods -- refer to the "Client Authentication"

section in the documentation for a list of which options are

available for which authentication methods.

#

Database and user names containing spaces, commas, quotes and other

special characters must be quoted. Quoting one of the keywords

"all", "sameuser", "samerole" or "replication" makes the name lose

its special character, and just match a database or username with

that name.

#

This file is read on server startup and when the server receives a

SIGHUP signal. If you edit the file on a running system, you have to

SIGHUP the server for the changes to take effect, run "pg_ctl reload",

or execute "SELECT pg_reload_conf()".

#

Put your actual configuration here

----------------------------------

#

If you want to allow non-local connections, you need to add more

"host" records. In that case you will also need to make PostgreSQL

listen on a non-local interface via the listen_addresses

configuration parameter, or via the -i or -h command line switches.

DO NOT DISABLE!

If you change this first entry you will need to make sure that the

database superuser can access the database using some other method.

Noninteractive access to all databases is required during automatic

maintenance (custom daily cronjobs, replication, and similar tasks).

#

Database administrative login by Unix domain socket

local all postgres peer

TYPE DATABASE USER ADDRESS METHOD

"local" is for

"local" is for Unix domain socket connections only

local all all peer

IPv4 local connections:

host all all 127.0.0.1/32 md5

IPv6 local connections:

host all all ::1/128 md5

Allow replication connections from localhost, by a user with the

replication privilege.

local replication all peer
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5

Andrey Vihrov
@andreyv
How does your connection string in cms.conf look, excluding the password?
Andrey Vihrov
@andreyv
@MacTin Anyway, the problem is that your Unix user is not named cmsuser but rather something else. You can fix this by either enabling password authentication for the DB user cmsuser in pg_hba.conf, or, from the looks of the current contents, also by replacing the IP address in cms.conf connection string with 127.0.0.1. There is a link to pg_hba.conf documentation above.
MacTin
@MacTin
I think I fixed the problem
I had created the cmsdb database
and ,I can see ll tables,
            List of relations
Schema | Name | Type | Owner
--------+-----------------------+-------+---------
public | admins | table | cmsuser
public | announcements | table | cmsuser
public | attachments | table | cmsuser
public | contests | table | cmsuser
public | datasets | table | cmsuser
public | evaluations | table | cmsuser
public | executables | table | cmsuser
public | files | table | cmsuser
public | fsobjects | table | cmsuser
public | managers | table | cmsuser
public | messages | table | cmsuser
public | participations | table | cmsuser
public | printjobs | table | cmsuser
public | questions | table | cmsuser
public | statements | table | cmsuser
public | submission_results | table | cmsuser
public | submissions | table | cmsuser
public | tasks | table | cmsuser
public | teams | table | cmsuser
public | testcases | table | cmsuser
:
MacTin
@MacTin
Now, mozilla show this message "Firefox no pudo establecer una conexión con el servidor en localhost:8889."
please, help me.
Andrey Vihrov
@andreyv
@MacTin Have you completed all the steps in https://cms.readthedocs.io/en/v1.4/Running%20CMS.html#configuring-cms and https://cms.readthedocs.io/en/v1.4/Running%20CMS.html#id1? Can you see cmsAdminWebServer running in the process list? What logs do you see at /var/local/log/cms/AdminWebServer-0/last.log?
MacTin
@MacTin
yes,I can, this s the output
umactin@vUbuntu:~/cms/scripts$ cmsAdminWebServer
2020-09-23 06:11:38,903 - INFO [<unknown>] Using configuration file /usr/local/etc/cms.conf.
2020-09-23 06:11:43,121 - INFO [Admin,0] AdminWebServer 0 up and running!
2020-09-23 06:11:43,123 - INFO [Admin,0] Established connection with localhost:21100 (AdminWebServer,0) (local address: 127.0.0.1:57138).
2020-09-23 06:11:43,124 - INFO [Admin,0] Established connection with 127.0.0.1:57138 (local address: 127.0.0.1:21100).
^C2020-09-23 06:12:07,851 - WARNING [Admin,0] AdminWebServer,0 received request to shut down.
2020-09-23 06:12:07,855 - INFO [Admin,0] AdminWebServer 0 is shutting down
2020-09-23 06:12:07,856 - INFO [Admin,0] Terminated connection with localhost:21100 (AdminWebServer,0) (local address: 127.0.0.1:57138): Disconnection requested.
the last log is: 2020-09-22 22:49:02,339 - INFO [Log,0 Main service::run] LogService 0 up and running!
MacTin
@MacTin
Is localhost:8889 the orrect url?
MacTin
@MacTin
but the mozzilla did not found the localhost:8889 URL
Andrey Vihrov
@andreyv
@MacTin I see AdminWebServer 0 is shutting down in the output. Normally, you should be starting cmsResourceService -a (see the docs) and leave it running. In the process list, you'll see various CMS services. You can use e.g. screen to keep cmsResourceService running at all times.
mostafa ammar
@mostafaammar79_twitter
any tutorials how to create a distributed setup for cms . web server and multiple worker servers and remote database setup
mostafa ammar
@mostafaammar79_twitter

any tutorials how to create a distributed setup for cms . web server and multiple worker servers and remote database setup

@wil93

MacTin
@MacTin
Thank you, the cms system is working .
MacTin
@MacTin
Is there examples about Contests,
MacTin
@MacTin
or, where can i find example tasks?
Andrey Vihrov
@andreyv
@MacTin The simplest way is just to create the tasks yourself. For example, you can use the AdminWebServer interface to create a "Sum" task where, given two numbers, you need to output their sum. After setting task type (Batch) and limits, you can add it to a contest, and then the task will appear in the contestant interface.
MacTin
@MacTin
Thank you
Edoardo Morassutto
@edomora97

any tutorials how to create a distributed setup for cms . web server and multiple worker servers and remote database setup

A while ago I made a step-by-step tutorial for deploying cms on Google Cloud Platform. It's a little bit out of date, but can be useful for starting up from scratch.

https://docs.google.com/presentation/d/1GA6UNPa9wBrihoATKHcINNlCOgcmQrBCAX9yk85d4Tk/

Enjoy!

@mostafaammar79_twitter

MacTin
@MacTin
At now the rankingWebServer do not show users, and when a user submit a program, the rankingWebServer process show this output:

umactin@vUbuntu:~/cms/scripts$ cmsRankingWebServer
2020-09-30 04:45:40.870 INF Using config file /usr/local/etc/cms.ranking.conf.

2020-09-30 04:46:30.466 INF Unauthorized request.
http://localhost:8890/submissions/

{'username': 'usern4me', 'password': 'passw0rd'}

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/gevent/pywsgi.py", line 935, in handle_one_response
self.run_application()
File "/usr/local/lib/python3.6/dist-packages/gevent/pywsgi.py", line 908, in run_application
self.result = self.application(self.environ, self.start_response)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/wsgi.py", line 766, in call
return self.app(environ, start_response)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/wsgi.py", line 826, in call
return app(environ, start_response)
File "/usr/local/lib/python3.6/dist-packages/cms-1.4rc1-py3.6.egg/cmsranking/RankingWebServer.py", line 102, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/wsgi.py", line 48, in <lambda>
return update_wrapper(lambda a: f(a)(*a[-2:]), f)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/exceptions.py", line 155, in call
response = self.get_response(environ)
File "/usr/local/lib/python3.6/dist-packages/cms-1.4rc1-py3.6.egg/cmsranking/RankingWebServer.py", line 76, in get_response
response = Unauthorized.get_response(self, environ)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/exceptions.py", line 141, in get_response
if self.response is not None:
AttributeError: 'CustomUnauthorized' object has no attribute 'response'
Wed Sep 30 04:46:30 2020 {'REMOTE_ADDR': '::ffff:127.0.0.1', 'REMOTE_PORT': '43486', 'HTTP_HOST': 'localhost:8890', (hidden keys: 24)} failed with AttributeError

::ffff:127.0.0.1 - - [2020-09-30 04:46:30] "PUT /submissions/ HTTP/1.1" 500 161 0.003792

Andrey Vihrov
@andreyv
@MacTin Please check that the ranking credentials in cms.ranking.conf match the rankings URL in cms.conf
MacTin
@MacTin
ok , the match was incorrect, but now cmsRankingWebserve show this output

2020-09-30 12:18:34.725 WRN Invalid data.
http://localhost:8890/submissions/

{'9': {'task': 'Suma_20a_2bb', 'time': 1601486302, 'user': 'MacTinStudent'}}

Exception cmsranking.Entity.InvalidData:

    [entity 9] Inconsistent data

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/cms-1.4rc1-py3.6.egg/cmsranking/RankingWebServer.py", line 216, in put_list
    self.store.merge_list(data)
  File "/usr/local/lib/python3.6/dist-packages/cms-1.4rc1-py3.6.egg/cmsranking/Store.py", line 256, in merge_list
    raise exc
  File "/usr/local/lib/python3.6/dist-packages/cms-1.4rc1-py3.6.egg/cmsranking/Store.py", line 250, in merge_list
    raise InvalidData("Inconsistent data")

::ffff:127.0.0.1 - - [2020-09-30 12:18:34] "PUT /submissions/ HTTP/1.1" 400 303 0.026695

.
MacTin
@MacTin
.
Andrey Vihrov
@andreyv
@MacTin Probably you need to remove old data, see https://cms.readthedocs.io/en/v1.4/RankingWebServer.html#removing-data
MacTin
@MacTin
thanks, andrey vihrov
RezwanArefin01
@RezwanArefin01
Is the current tps loader compatible with ioi-2017/tps? I am getting some key errors when trying to load the examples there..
MacTin
@MacTin
Thanks Andrey Vihrov@andreyv, I can watch the cms working very well, but I have to learn more about it , is there any book? or Resources?
RezwanArefin01
@RezwanArefin01
Hello!
I am facing a problem. The ranking web server is not updating the scores for OutputOnly Tasks. However, the 'Ranking' page in admin web server shows the correct scores.
I have tried dropping the ranking web server's data and restarting the contest + ranking web server, still the same issue. The ranking web server is updating all other tasks' scores but not the output only.
What could be the problem?
I am on version 1.4.rc1.
Score Type for the OutputOnly Task is 'Sum'. If it matters.
Andrey Vihrov
@andreyv
@RezwanArefin01 First check ProxyService and RWS logs for anything suspicious
AutocompleteFailed
@AutocompleteFailed
Hi, I have installed CMS and created a new contest as described in the documentation. However I can't add any tasks since none are available in the 'select new task' drop down menu on the web admin page. Have I made a mistake in installation?
AutocompleteFailed
@AutocompleteFailed
I have subsequently worked out how to import the example contest with its tasks.
Does CMS have support for the Learning Tools Interoperability protocol?