Go to mongodb
  • Staff completing my previous help request when I try to access superdesk remotely ..

    I get this message when I try to sign in

    Sorry but can not reach the server now.
    Please try again later.
  • 38 Comments sorted by
  • Vote Up1Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    From mongo logs I can see that is not running:

    2017-03-15T06:47:59.665-0700 I STORAGE  [initandlisten] exception in initAndListen: 98 Unable to lock file: /var/lib/mongodb/mongod.lock Resource temporarily unavailable. Is a mongod instance already running?, terminating
    2017-03-15T06:47:59.665-0700 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
    2017-03-15T06:47:59.665-0700 I NETWORK  [initandlisten] shutdown: going to flush diaglog...
    2017-03-15T06:47:59.665-0700 I CONTROL  [initandlisten] now exiting
    2017-03-15T06:47:59.665-0700 I CONTROL  [initandlisten] shutting down with code:100

    try to remove /var/lib/mongodb/mongod.lock and restart mongo again


    %)
  • Hi Pedro,

    Please provide more details, with this little info we can't be of much help.

    Best,

  • Thank you very much for your response:
    following:

    I need to access superdesk remotely, ie run superdesk out of localhost

    But when I run the system, I get this message as attached file.

    My settings

    Superdesk installed on VMware
    Operating system: Ubuntu 16.04
    772 x 509 - 21K
  • Vote Up0Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    Please run this in your VMware
  • Thank you so much for your answer..
    But unfortunately STILL DID NOT FUNCTION, it continues giving the same message as annex

    Would you have another solution?

    Attached the nginx log files
    772 x 509 - 21K
  • Vote Up0Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    What have you used to install it?

    please provide /etc/nginx/conf.d/default.conf and /etc/superdesk.sh

  • Ok .. Grisha attached the requested files ..
    When I ran the script that you sent me at the end of the script came out this error message


    File "/opt/superdesk/env/lib/python3.5/site-packages/pymongo/topology.py", line 189, in select_servers
         Self._error_message (selector))
    Pymongo.errors.ServerSelectionTimeoutError: localhost: 27017: [Errno 111] Connection refused

    The attached files
  • Vote Up0Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    something with your mongo
    $ systemctl status mongod
    cat /var/log/mongodb/mongod.log
    $ systemctl restart mongod
    $ cat /var/log/superdesk/rest.log
    Post edited by Grisha Kostyuk at 2017-03-08 12:42:04
  • Grisha, thank you very much for your help ..
    it's working....

    Now tell me, it is possible to use Superdesk by accessing a port other than port 80 ..

    If possible, where should I set up for a new door,

    Example:
    I need to use superdesk using port 3127 what should I do
  • Vote Up0Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    it is nginx configuration thing.
    replace /etc/nginx/conf.d/default.conf with this, in general three line with 3127 port is new...

    server {
        listen 3127 default;

        location /ws {
            proxy_pass http://localhost:5100;
            proxy_http_version 1.1;
            proxy_buffering off;
            proxy_read_timeout 3600;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";
        }

        location /api {
            proxy_pass http://localhost:5000;
            proxy_set_header Host localhost;
            expires epoch;
        }

        location /contentapi {
            proxy_pass http://localhost:5400;
            proxy_set_header Host localhost;
            expires epoch;
        }

        location /.well-known {
            root /var/tmp;
        }

        location / {
            root /opt/superdesk/client/dist-deploy;

            sub_filter_once off;
            sub_filter_types application/javascript;
            sub_filter 'http://localhost' 'http://$host:3127';
            sub_filter 'ws://localhost/ws' 'ws://$host:3127/ws';
        }
    }

  • Grisha friend thank you very much for the help with the connections .. they are working OK

    Now when I import some photo to the system, it does not render correctly ... it conforms to the attached file.

    Analyzing the code of the program ... it seems to me that it is necessary to correct something in this lines below

    <Img src = "http: // localhost / api / upload / 58c1a67f1d41c810e055b6f3 / raw? _schema = http" alt = "" srcset = "// localhost / api / upload / 58c1a67f1d41c810e055b6f3 / raw? _schema = http 800w">


    Attached is a print of how the photos appear after being imported.

    Could you help me again?
    664 x 568 - 44K
  • Vote Up0Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    Update /api section

        location /api {
            proxy_pass http://localhost:5000;
            proxy_set_header Host localhost;
            expires epoch;

            sub_filter_once off;
            sub_filter_types application/javascript;
            sub_filter 'http://localhost' 'http://$host:3127';
        }

    it should work
  • Grisha, next friend:

    I made the changes in the default.conf file according to your orientation ..

    However, it continues with the same error ..
    That is, the changes did not take effect.

    The nginx log, as well as a console print
    1347 x 340 - 83K
    469 x 380 - 18K
  • Vote Up0Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    A little mistake, must be "sub_filter_types application/json;" for /api

        location /api {
            proxy_pass http://localhost:5000;
            proxy_set_header Host localhost;
            expires epoch;

            sub_filter_once off;
            sub_filter_types application/json;
            sub_filter 'http://localhost' 'http://$host:3127'';
       }

  • Grisha thank you very much for the help is working very well ...

    Now I need to know about you, how do I backup the monogo database in the following situation ...

    I need to migrate the superdesk database from one machine to another ... but when I use Mondodump on machine "A" and try to restore it on machine "B" with the Mongorestore command, Superdesk loses the reference from the database and does not Access more to the base Mongo ...

    Please what you indicate to make database bakups for a migration ...

    Thank you very much in advance
  • Vote Up0Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    With mongo backups, you also need elaticsearch backup, for example using:

    you need two of these
    --type=mapping
    --type=data
  • Grisha
    Não estou conseguindo encontrar o caminho aonde se encontra os índices do elástico, para usar com esse comando abaixo,
    Por favor poderia me dizer qual o parâmtro ORIGEN, oufa, aonde está os índices do elástico ...

    Para referenciar no --input SOURCE .. no comando abaixo, estou tentando / var / lib / mongodb, porém estou recebendo o seguinte erro

    Erro: EISDIR: operação ilegal em um diretório, ler

    Estou tentando fazer isso
    ====================
      Elipsedump --input / var / lib / mongodb --output /var/lib/mongodb/indice/superdesk_mapping.json --type = mapeamento
      Elipsedump --input / var / lib / mongodb --output /var/lib/mongodb/indice/superdesk_data.json --type = data
  • Grisha
    I can not find the path to where the elastic indexes are, to use with this command below,
    Please could you tell me which parameter ORIGIN, oufa, where is the elastic contents ...

    To reference in -input SOURCE .. in the command below, I'm trying / var / lib / mongodb, however I'm getting the following error

    Error: EISDIR: Illegal operation in a directory, read

    I'm trying to do this
    ====================
       Elipsedump --input / var / lib / mongodb --output /var/lib/mongodb/indice/superdesk_mapping.json --type = mapping
       Elipsedump --input / var / lib / mongodb --output /var/lib/mongodb/indice/superdesk_data.json --type = date
  • Vote Up0Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    Backup:
    elasticdump \
      --output=/data/my_index_mapping.json \
      --type=mapping
    elasticdump \
      --output=/data/my_index.json \
      --type=data

    Restore on another server:
    elasticdump \
      --input=/data/my_index_mapping.json

    elasticdump \
      --input=/data/my_index.json \


    %)
  • Grisha

    following:
    The backup worked fine, the restore also runs successfully, but when I call Superdesk ... it does not open the database

    That is, after executing the "elasticdump" commands for backup and restore ... when I call the system the status of the same conforms to the files in attachments
    893 x 620 - 11K
    743 x 307 - 51K
  • Grisha

    Next, even deleting the mongod.lock continues without opening the mongo database.

    Now have the following when i do
    Systemctl mongod restart (result file status_mongod.txt)

    When I do
    Systemctl mongodb restart (result file status_mongodb.txt)

    Even though it does not access the database as mongod.log
    Is there anything else that I need to do?
  • Grisha

    You have some other information of what I can do to solve the problem that I reported in my previous email, that is, after I execute "elasticdump" as you indicated me, however when I run Superdesk simply mongodb DO NOT CONNECT ... as The files that I sent you attached in the previous email ..


    second
    I've been trying to make an email type ingestion for a few days, because of that I need to RUN superdesk in Debug Mode to be able to find out what's happening that does not bring the email in the ingest ..

    Why do I ask you?

    How do I RUN Superdesk in an IDE like Pycharm?

    How do you do to run Superdesk in
    DEBUG?

    Thank you, thank you, my friend ...
  • Hi Grisha

    Friend could give me some more help regarding the topics of my last two posts .. please
  • Vote Up0Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    Sorry, you have problems with backup of elasticsearch, mongo, etc... I can't fix all things you have on server, you should be able to fix them by yourself.

    > How do I RUN Superdesk in an IDE like Pycharm?
    I don't know, I use VIM, not IDE.
  • Ok thanks Grisha for the answers ..

    I need to debug superdesk ... if possible you could tell me how you do to run Superdesk in DEBUG mode
  • OK  thanks Grisha for the answers ..

    I need to debug superdesk ... if possible you could tell me how you do to run superdesk in DEBUG mode.
  • Vote Up0Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    logs are here /var/log/superdesk/ I usually use logs for debug server part and Chrome dev tools for client part. 
  • OK. Muito obrigado por suas respostas, vou fazer o que você faz.
  • OK. Thank you very much for your answers, I'll do what you do.
  • Grisha,
    Could you give me these tips?
    I am using the vim according to your instruction, now I ask you?

    A) is it possible to run Superdesk from the command line of a linux terminal?

    B) using the log file in / var / log / superdesk .. like you
    Does it need to know the value of an internal variable in a python script?

    C) what packages or plugins do you have installed in your "vim" in order to develop for Superdesk effectively?

    D) could you tell me what configuration you use in your "vim" when you are developing

    Thank you very much in advance
  • Vote Up0Vote Down Grisha KostyukGrisha Kostyuk
    Posts: 52Member, Sourcefabric Team
    This is out of superdesk topic.


    But I've been using Vim for a long while, it's my preference, it doesn't fit for all and has a big learning curve...
  • Ok Grisha, thanks and excuse me for the previous question ..

    following:
    I am running inside the virtualenv the following command

    Python manage.py runserver

    With the purpose of executing the superdesk from the flask interpreter .... but I am not succeeding ...
    I ask, how do I run superdesk without being by browser, ie from the interpreter ...

    Could you give me that tip?
  • Grisha

    I'm adapting superdesk to the reality of my company here in Latin America, and for that to happen, I need to make some changes to the codes and create some other modules, however, I'm not able to RUN THE SUPERDESK LOCALLY ..


    Can you give me a help on how to create a development environment for superdesk, this is very IMPORTANT for me and my company ....

    Clarifying, I NEED TO CREATE A DEVELOPMENT ENVIRONMENT for superdesk ....

    After I rode those commands that you sent me:

    Honcho start
    Rest: gunicorn -c gunicorn_config.py wsgi
    Wamp: python3 -u ws.py
    Work: celery -A worker worker
    Beat: celery -A worker beat --pid =
    Capi: gunicorn -c gunicorn_config.py content_api.wsgi

    I received the following errors as files in attachments.

    So I ask for your help again, WHAT SHOULD I DO
    TO RUN THE SUPERDESK LOCALLY IN A DEVELOPMENT ENVIRONMENT ..
  • Grisha

    I'm adapting superdesk to the reality of my company here in Latin America, and for that to happen, I need to make some changes to the codes and create some other modules, however, I'm not able to RUN THE SUPERDESK LOCALLY ..


    Can you give me a help on how to create a development environment for superdesk, this is very IMPORTANT for me and my company ....

    Clarifying, I NEED TO CREATE A DEVELOPMENT ENVIRONMENT for superdesk ....

    After I rode those commands that you sent me:

    Honcho start
    Rest: gunicorn -c gunicorn_config.py wsgi
    Wamp: python3 -u ws.py
    Work: celery -A worker worker
    Beat: celery -A worker beat --pid =
    Capi: gunicorn -c gunicorn_config.py content_api.wsgi

    I received the following errors as files in attachments.

    So I ask for your help again, WHAT SHOULD I DO
    TO RUN THE SUPERDESK LOCALLY IN A DEVELOPMENT ENVIRONMENT ..
  • Grisha,

    I would like your help solving a problem related to "planning" for superdesk ..

    following
    I installed the plugin as described in the URL: https://github.com/superdesk/superdesk-planning

    But it is not working, could you help me on this question
  • Grisha,

    To succeed in the implementations I'm doing in Python code I'm doing the following:

    Supervisorctl stop all
    Honcho start
    Supervisorctl start all

    I ask
    Could you get me your build, that is,
    Could you show me how you do to update your Superdesk code when you are developing it.
    Thanks in advance.
  • Hello!
    I have site superdesk on my domain. The site worked, but something happened. And now when I try to enter the admin panel, I get the following.

    What do I need to do to make the site work again with all the data included in it?

    Thanks
    772 x 509 - 21K