Forums › Forums › OroCommerce › Synchronizer error
This topic contains 5 replies, has 2 voices, and was last updated by Alex Puscas 7 years, 1 month ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- February 20, 2017 at 2:24 pm #31430
When a user logs in, a red error bar shows the error “Synchronizer cannot connect to server. Please contact your administrator”.
If it is something to do with the websockets setup, could you please provide some advice as to what I need to put into the parameters file.
Many thanks in advance.
- CreatorTopic
- AuthorReplies
- February 21, 2017 at 1:35 am #31431
Hello!
Please take a look at the installation instructions: https://github.com/orocommerce/orocommerce-application .
Specific at Enable WebSocket messaging section:Shell1php app/console clank:server --env=prodYou should to be able to run this command. As you also realized, some ports you configured in parameters.yml might be used by other applications. Please try setting other port for
websocket_bind_port
,websocket_frontend_port
andwebsocket_backend_port
instead of the default8080
.Please remember you need to run
cache:clear
command if you are using the production environment, before runningclank:server
one, in order to update changed parameters in production cache.Shell1php app/console cache:clear --env=prodHope this helps you out!
Alex PuscasFebruary 22, 2017 at 2:16 pm #31432Hi Alex,
I was wondering if you could provide more help please? I have the community edition set up within a hosted environment.
When I start the clank server via SSH, does the SSH session need to stay open? This obviously isn’t ideal, as I would like my hosted version to stand alone without any input from me. Should there be any output in the SSH session when the clank command line is run?
Could you also help me with what IP addresses I need to put in the following parameters:
websocket_bind_address:
websocket_bind_port: 8080
websocket_frontend_host:
websocket_frontend_port: 8080
websocket_backend_host:
websocket_backend_port: 8080Do all the ports need to be different?
Sorry for all the questions, but I am really close to getting the application working and I’m stuck with this last bit.
February 23, 2017 at 12:14 am #31433Hey!
In order to learn more about Synchronization ORO provides, please read the documentation: https://github.com/orocrm/platform/tree/master/src/Oro/Bundle/SyncBundle#orosyncbundle
In order not to get the “Synchronizer cannot connect to server. Please contact your administrator” error message on admin part, you need to be able to run the
clank:server
. By running this command, on your machine, you will probably get some kind of error message, that will explain why you are not able to run that command.
From what you explained in previous posts, my best guess is that this message will be “Could not bind to tcp://0.0.0.0:8080: Address already in use
“. What this actually means is that that specific port on the specific IP address is used by another application.
If this scenario matches yours, you can either change the IP address, or the port. You can try any combination that suits you. To make it more clear, let me give you some configuration examples:YAML123456websocket_bind_address: 0.0.0.1websocket_bind_port: 8080websocket_frontend_host: "*"websocket_frontend_port: 8080websocket_backend_host: "*"websocket_backend_port: 8080or
YAML123456websocket_bind_address: 0.0.0.0websocket_bind_port: 8800websocket_frontend_host: "*"websocket_frontend_port: 8800websocket_backend_host: "*"websocket_backend_port: 8800or any other configuration that suits your machine.
You can start the clank server as a background process (add
&
after the command), via SSH, and you can close the connection after that:Shell1php app/console clank:server --env=prod &There should be output of
clank:server
. Typical output that I get is:PowerShell12345678910$ php app/console clank:server --env=prodStarting ClankLaunching Ratchet WS Server on: 0.0.0.0:808013537 connected13537 disconnected13574 connected13574 disconnected13583 connected13583 disconnected13588 connectedand so on. But by running it in background, you won’t see the output, unless you log it somewhere.
Let me know if you managed to fix your issue. If you have any more questions, feel free to ask them all.
AlexFebruary 23, 2017 at 2:48 pm #31434HI Alex,
Thank you for your comprehensive reply. The output I get when I reset the parameters back to default are as follows:
Starting Clank
Launching Ratchet WS Server on: 0.0.0.0:8080
1765 connected
1765 disconnected
1806 connected
1806 disconnected
1811 connected
1811 disconnectedI think this suggests that it is working as expected, but I’m still getting the error message. With that in mind, would that also stop me from being able to select quantities and add the product to an order?
I really appreciate your help.
Nick
February 24, 2017 at 4:55 am #31435Hey Nick!
Please check if the binding between the IP:Port and Clank Server:
PowerShell1$ netstat --numeric-ports -l | grep 8080Output should be close to:
Shell1tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTENTry using
127.0.0.1
IP address if there seam to be issues.With working Synchronization or not, you should be able to select quantities and add products to orders or perform any other action ORO Commerce supports without any issues.
Synchronization uses Clank Server to push to browser information about grid changes for example. It is not necessary to start clank server for ORO Commerce to work. - AuthorReplies
The forum ‘OroCommerce’ is closed to new topics and replies.