Comments (59)
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.
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.
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.
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.
I change. same problem
from web-publisher.
And what do you have in response from server for publisher api tenants
request?
from web-publisher.
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.
login and user test
If you need, I can provide SSH.
from web-publisher.
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.
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.
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.
What do you mean? You mean request curl?
from web-publisher.
This view ;)
from web-publisher.
from web-publisher.
from web-publisher.
Ahh i see - so it works now? Do You have organization and tenants created?
from web-publisher.
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.
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.
You can also change in parameters.yml
allow_origin_cors: '*'
to allow_origin_cors: '192.168.1.6'
from web-publisher.
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.
Show me what you have in response to this GET
request for superdesk/
from web-publisher.
You mean this?
http://192.168.1.12/api/v1/auth/superdesk
from web-publisher.
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.
from web-publisher.
from web-publisher.
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.
Edit server superdesk publisher or superdesk?
from web-publisher.
Superdesk Publisher.
from web-publisher.
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.
restart nginx after this change (or reload config).
from web-publisher.
Done
from web-publisher.
Not sure it this null
isn't problematic. browser still don't send GET request to this endpoint.
from web-publisher.
from web-publisher.
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.
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.
Root is ok. try with * in array. I have hope that it will fix it.
from web-publisher.
from web-publisher.
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.
I remove add_header from config nginx
and I see error 500 superdesk
from web-publisher.
ok, go to your superdesk user profile (right top corner and edit profile - set first and last name there)
from web-publisher.
Done
from web-publisher.
I see new loading page
from web-publisher.
testing I think this my server SP
from web-publisher.
Looks like it's solved ;) We will adjust install instructions to use ['*']
from web-publisher.
Good. And next step check rabbitmq?
from web-publisher.
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.
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.
from web-publisher.
I using easy login and pass
test and test
I see rabbitmq load
I download python script( testing connect). Result - ok
from web-publisher.
And this output app_dev.php
from web-publisher.
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.
from web-publisher.
I run this "composer install --dev" and have this error
from web-publisher.
And I want install superdesk and superdesk publish to 1 server. This possible?
from web-publisher.
I see need two servers.
from web-publisher.
That's weird - looks like it can't be array but id didn't worked with string.
from web-publisher.
Problem config parameters.yml?
from web-publisher.
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.
I testing edit to '*' - same problem
from web-publisher.
How are you?
from web-publisher.
Related Issues (20)
- Not found: /api/bindings/%2F/e/swp_websocket_exchange/q/swp_websocket HOT 2
- Theme could not be installed, files are reverted to previous version!
- Can't install default theme HOT 1
- Logging out does not trigger a back-channel logout to OAuth service
- No logging in prod env
- Tenant for host could not be found HOT 10
- grunt build - GC - Javascript heap out of memory HOT 2
- Command "translation:extract" is not defined. HOT 1
- Documentation - theme
- Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error Error!!! help HOT 1
- Tenant for host "123abc" could not be found! Please check tenants configuration. Help!!!
- We facing this issue while installing publisher
- Another Error
- An exception occurred while executing 'DELETE FROM swp_package_author': HOT 1
- Elasticsearch down HOT 1
- Feature request: Follow author HOT 1
- Bug: Article updatedAt field is updated when media is converted to webp HOT 3
- Bug: Duplicate messages are added to image_conversion queue HOT 1
- ERROR: relation "swp_user_reset_password_request" does not exist
- Optimize heavy media file transport in getAssetAction HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web-publisher.