Git Product home page Git Product logo

Comments (59)

ahilles107 avatar ahilles107 commented on July 29, 2024

Hey, looks like Superdesk can't connect to Your publisher instance. Can you check in networking tab in developers tools what error you have for calls to publisher? One more thing. Check if your superdesk user have firstname and lastname provided (it's know bug not fixed yet in publisher).

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I have two servers

192.168.1.12 -sp
192.168.1.6 - s

sp=superdesk publish
s=superdesk

This my config (parameters.yml)

# This file is auto-generated during the composer install
parameters:
    env(DATABASE_HOST): 127.0.0.1
    env(DATABASE_PORT): null
    env(DATABASE_NAME): publisher
    env(DATABASE_USER): postgres
    env(DATABASE_PASSWORD): postgres
    env(DATABASE_SERVER_VERSION): 9
    mailer_transport: smtp
    mailer_host: 127.0.0.1
    mailer_user: null
    mailer_password: null
    env(SYMFONY_SECRET): SuperSecretTokenPleaseChangeIt
    swp_updater.version.class: SWP\Bundle\CoreBundle\Version\Version
    env(SWP_DOMAIN): 192.168.1.12
    cache_servers:
        - localhost
    doctrine_cache_driver: array
    sentry.dsn: false
    session_memcached_host: localhost
    session_memcached_port: 11211
    session_memcached_prefix: sess
    session_memcached_expire: 3600
    test_env: doctrine
    allow_origin_cors: '*'
    superdesk_servers: 192.168.1.6
    env(ELASTICA_HOST): localhost
    env(ELASTICA_PORT): 9200
    env(ELASTICA_INDEX_NAME): swp_index
    env(RABBIT_MQ_HOST): localhost
    env(RABBIT_MQ_PORT): 5672
    env(RABBIT_MQ_USER): test
    env(RABBIT_MQ_PASSWORD): test
    env(WEBSOCKET_PORT): 8080
    env(WEBSOCKET_HOST): localhost
    env(PAYWALL_SERVER_URL): null
    env(PAYWALL_SERVER_USERNAME): null
    env(PAYWALL_SERVER_PASSWORD): null
    env(SUBSCRIPTIONS_CACHE_LIFETIME): 86400
    fixtures_type: '%env(FIXTURES_TYPE)%'
    env(FIXTURES_TYPE): dev

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

This config superdesk (api). I not sure need write tenant code or not. I enter

root@ubuntu:~# cat /opt/superdesk/client/dist/config.ec23ae24.js
window.superdeskConfig={
    apps: ['superdesk-publisher'],
    publisher: {
        protocol: "http",
        tenant: 'ef6xed', // subdomain
        domain: '192.168.1.12', // IP address or domain name of your server where Superdesk Publisher is installed
        base: 'api/v1'
    },
};

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

Try too change tenant: 'ef6xed', // subdomain to tenant: null, // subdomain As it should be subdomain name (I know - naming is confusing here, we will improve it).

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I change. same problem

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

And what do you have in response from server for publisher api tenants request?

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I see interesting error
prod.log

[2018-07-20 12:23:25] console.ERROR: Error thrown while running command "rabbitmq:consumer send_webhook --messages=250 --env=prod". Message: "stream_socket_client(): unable to connect to tcp://127.0.0.1:5672 (Connection refused)" {"exception":"[object] (ErrorException(code: 0): stream_socket_client(): unable to connect to tcp://127.0.0.1:5672 (Connection refused) at /var/www/publisher/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php:141)","command":"rabbitmq:consumer send_webhook --messages=250 --env=prod","message":"stream_socket_client(): unable to connect to tcp://127.0.0.1:5672 (Connection refused)"} []
[2018-07-20 12:23:25] console.DEBUG: Command "rabbitmq:consumer analytics_event --messages=250 --env=prod" exited with code "1" {"command":"rabbitmq:consumer analytics_event --messages=250 --env=prod","code":1} []
[2018-07-20 12:23:25] console.DEBUG: Command "rabbitmq:consumer send_webhook --messages=250 --env=prod" exited with code "1" {"command":"rabbitmq:consumer send_webhook --messages=250 --env=prod","code":1} []

12:23:25 ERROR [console] Error thrown while running command "rabbitmq:consumer send_webhook --messages=250 --env=prod". Message: "stream_socket_client(): unable to connect to tcp://127.0.0.1:5672 (Connection refused)" ["exception" => ErrorException { …},"command" => "rabbitmq:consumer send_webhook --messages=250 --env=prod","message" => "stream_socket_client(): unable to connect to tcp://127.0.0.1:5672 (Connection refused)"] []

In StreamIO.php line 141:

stream_socket_client(): unable to connect to tcp://127.0.0.1:5672 (Connecti
on refused)

stderr.log

rabbitmq:consumer [-m|--messages [MESSAGES]] [-r|--route [ROUTE]] [-l|--memory-limit [MEMORY-LIMIT]] [-d|--debug] [-w|--without-signals] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [-t|--tenant TENANT] [--]

I testing. rabbimq working.

http://prntscr.com/k90fyl

login and user test

If you need, I can provide SSH.

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

It's not related to super desk issue. Probably you have some issues with rabbit login config. unable to connect to tcp://127.0.0.1:5672 (Connection refused) - it's clear permissions error on rabbit side.

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

http://prntscr.com/k90fyl - I enable plugin web UI all fine. And I testing python script auth rabbit - all fine.
I check logs

=INFO REPORT==== 20-Jul-2018::12:23:27 ===
Server startup complete; 6 plugins started.

  • rabbitmq_management
  • rabbitmq_web_dispatch
  • webmachine
  • mochiweb
  • rabbitmq_management_agent
  • amqp_client

=INFO REPORT==== 20-Jul-2018::12:23:27 ===
accepting AMQP connection <0.322.0> (127.0.0.1:57908 -> 127.0.0.1:5672)

=INFO REPORT==== 20-Jul-2018::12:23:27 ===
accepting AMQP connection <0.332.0> (127.0.0.1:57910 -> 127.0.0.1:5672)

=INFO REPORT==== 20-Jul-2018::12:34:28 ===
closing AMQP connection <0.322.0> (127.0.0.1:57908 -> 127.0.0.1:5672)

=INFO REPORT==== 20-Jul-2018::12:34:28 ===
closing AMQP connection <0.332.0> (127.0.0.1:57910 -> 127.0.0.1:5672)

=INFO REPORT==== 20-Jul-2018::12:34:29 ===
accepting AMQP connection <0.555.0> (127.0.0.1:57968 -> 127.0.0.1:5672)

=INFO REPORT==== 20-Jul-2018::12:34:29 ===
accepting AMQP connection <0.565.0> (127.0.0.1:57970 -> 127.0.0.1:5672)

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

ok, let's solve first issue with missing data in publisher ui. Rabbit not related here. Show me what response you have for request from super desk to publisher (network tab when you load output control view - https://prnt.sc/k8zlqn)

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

What do you mean? You mean request curl?

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

zrzut ekranu 2018-07-20 o 21 54 00

This view ;)

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

screenshot_105
screenshot_106

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I change null to ""
screenshot_107
screenshot_108

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

Ahh i see - so it works now? Do You have organization and tenants created?

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

Not work.
You mean this?
Organization Publisher (code: 69em0e) has been created and enabled!
Tenant Testing (code: 0jytgu) has been created and enabled!
Or need create using web ui?

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

what do you get from this superdesk/ GET request (second one). You should have auth token there. And ui should run next calls for tenants and routes.

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

You can also change in parameters.yml

allow_origin_cors: '*' to allow_origin_cors: '192.168.1.6'

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I not have. I do not remember this point in manual

"what do you get from this superdesk/ GET request (second one). You should have auth token there. And ui should run next calls for tenants and routes."

allow_origin_cors: '*' to allow_origin_cors: '192.168.1.6' - done

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

Show me what you have in response to this GET request for superdesk/

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

You mean this?

http://192.168.1.12/api/v1/auth/superdesk
screenshot_109
screenshot_110

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

I see you have just options. So it's because this allow_origin_cors. After changing it to allow_origin_cors: '192.168.1.6' You need to clear cache (rm -rf app/cache/prod/*).

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

Done. I do not see effect
screenshot_111

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

screenshot_112

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

You can see that Access-Control-Allow-Origin is still null. So something is wrong. I just checked and on our demo we have it set to allow_origin_cors: '*' so looks like Your nginx is setting this header manually. You can try to hardcore it in your ngins host config (https://serverfault.com/questions/162429/how-do-i-add-access-control-allow-origin-in-nginx). Without this browser will not send get requests to publisher.

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

Edit server superdesk publisher or superdesk?

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

Superdesk Publisher.

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

This original file( download from manual install)

server {
    listen 80 default;
    root /var/www/publisher/web;

    location / {
        try_files $uri /app.php$is_args$args;
    }




    location ~ ^/(app|app_dev|config)\.php(/|$) {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;
    }
}

I edit to

server {
    listen 80 default;
    root /var/www/publisher/web;

    location / {
	 add_header Access-Control-Allow-Origin *;
        try_files $uri /app.php$is_args$args;
		
    }




    location ~ ^/(app|app_dev|config)\.php(/|$) {
	 add_header Access-Control-Allow-Origin *;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

restart nginx after this change (or reload config).

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

Done

screenshot_113
Uploading Screenshot_114.jpg…

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

Not sure it this null isn't problematic. browser still don't send GET request to this endpoint.

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

Yep: https://stackoverflow.com/questions/18945158/chrome-origin-null-is-not-allowed-by-access-control-allow-origin

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

We need to get rid of this null. Question is - why Publisher don't set it correctly.

Try to change allow_origin_cors: '*' in parameters.yml to allow_origin_cors: ['*']

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I see. Am I using config nginx in manual. What needs an edit?
root /var/www/publisher/web; to root /var/www/publisher/; ?

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

Root is ok. try with * in array. I have hope that it will fix it.

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

screenshot_115
This yes?

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

It looks ok. I have no idea why next requests are not created by browser. You can try to remove that hardcoded add_header from config and in parameters set * instead ip address. Check also console tab - maybe there is some js error.

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I remove add_header from config nginx
and I see error 500 superdesk

screenshot_116
screenshot_117

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

ok, go to your superdesk user profile (right top corner and edit profile - set first and last name there)

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

Done

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I see new loading page

screenshot_118
Uploading Screenshot_119.jpg…

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

testing I think this my server SP

screenshot_120

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

Looks like it's solved ;) We will adjust install instructions to use ['*']

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

Good. And next step check rabbitmq?

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

You can use /app_dev.php/ for development - it will tell you more about theme and queries. Now you need some routes, rules and published content. Rabbit looks like php-rabbit connection issue. check if your credentials are ok in parameters.yml. Try to google that issue.

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I think now S show me server SP.
And I have problem rabbitmq. ( I send earlier logs)
I also wanted to ask for what answers rabbitmq?

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

screenshot_121
Uploading Screenshot_122.jpg…

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I using easy login and pass
test and test

I see rabbitmq load
I download python script( testing connect). Result - ok

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

And this output app_dev.php

screenshot_123

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

run composer install --dev to use app_dev. For rabbit we use this library: https://github.com/php-amqplib/php-amqplib Make sure that you have all php extensions enabled and you can connect to rabbit from php script.

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

screenshot_124

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I run this "composer install --dev" and have this error

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

And I want install superdesk and superdesk publish to 1 server. This possible?

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I see need two servers.

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

That's weird - looks like it can't be array but id didn't worked with string.

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

Problem config parameters.yml?

from web-publisher.

ahilles107 avatar ahilles107 commented on July 29, 2024

Yep, looks like nelmio cors bundle don't allow ['*'] But this is how it's in their docs. I will try to check it on Monday.

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

I testing edit to '*' - same problem

from web-publisher.

d1mf avatar d1mf commented on July 29, 2024

How are you?

from web-publisher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.