Bug CleverBeagle Pup 2.0 Meteor GraphQL deployment on Heroku - heroku

1) In the first time, when I deployed the origin code to heroku server with git clone https://github.com/cleverbeagle/pup
The launching application didn't work.
I managed to correct this with to copy the content of 'settings-development.json' file and paste in Heroku => myProject => Setttings => Reveal Config Vars => Key : METEOR_SETTINGS and Value : I pasted here the content.
thanks to :
- https://github.com/cleverbeagle/pup/issues/9
- https://github.com/cleverbeagle/pup/issues/197
So, now, the app is showing on server.
2) On Chrome console, I have this error :
50d72c91808ef7fba57f920b67d152d2d57698eb.js?meteor_js_resource=true:9 WebSocket connection to 'ws://localhost:4001/graphql' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
so I changed this in METEOR_SETTINGS
"graphQL": {
"httpUri": "http://localhost:3000/graphql",
"wsUri": "ws://localhost:4001/graphql"
},
to
"graphQL": {
"httpUri": "https://myproject.herokuapp.com:3000/graphql",
"wsUri": "wss://myproject.herokuapp.com:4001/graphql"
},
Note without https and wss, the app is not showing
3) Now on Chrome Console, I have :
this warning :
50d72c91808ef7fba57f920b67d152d2d57698eb.js?meteor_js_resource=true:9 WebSocket connection to 'wss://myproject.herokuapp.com:4001/graphql' failed: WebSocket is closed before the connection is established.
and after several warning above, I have this error :
50d72c91808ef7fba57f920b67d152d2d57698eb.js?meteor_js_resource=true:9 WebSocket connection to 'wss://myproject.herokuapp.com:4001/graphql' failed: WebSocket opening handshake timed out
By using the origin source code from Pup, I can signup on server but I cannot create a new document.
Any help, please ?
Thank you
EDIT 15 JAN 2019
**4) I remove Port like this : **
"httpUri": "https://myproject.herokuapp.com/graphql",
"wsUri": "wss://myproject.herokuapp.com/graphql"
Now, I can create New document on https://myproject.herokuapp.com/documents
but I still have this warning :
fe6fa1ac83e19aa2513ac3f97293600e8dc99e8e.js?meteor_js_resource=true:9
WebSocket connection to 'wss://myproject.herokuapp.com/graphql'
failed: WebSocket is closed before the connection is established.
and this error :
WebSocket connection to 'wss://myproject.herokuapp.com/graphql'
failed: Error during WebSocket handshake: Unexpected response code:
503
any idea ?
Thanks

Related

Socket closed abruptly during opening handshake: rabbitmq using adonisjs 5 connection fail

I'm using node 14.17.0 and adonisjs 5.8.5.
This is my rabbitmq .env :
RABBITMQ_HOSTNAME=localhost
RABBITMQ_USER=
RABBITMQ_PASSWORD=
RABBITMQ_PORT=15672
RABBITMQ_PROTOCOL= 'amqp://'
I try sendToQueue. But I get that's error. Anyone can help?
When you get the problem. Just change RABBITMQ_PORT=15672 become RABBITMQ_PORT=5672 It will passed.

Pusher not able to establish connection

I'm trying to connect to the Liquid exchange's Stream API with pusher. Documentation here
I have constructed a function that is in line with the Pusher library's documentation. Link to that here
My current code looks like this:
require 'pusher-client'
channels_client = PusherClient::Socket.new('LIQUID', {
ws_host: 'tap.liquid.com'
})
and running that gives me an error message of:
D, [2019-08-20Txx:xx:xx.xxxxxx #xxxxx] DEBUG -- : Binding
pusher:connection_established to pusher_global_channel
D, [2019-08-20Txx:xx:xx.xxxxxx #xxxxx] DEBUG -- : Binding
pusher:connection_disconnected to pusher_global_channel
D, [2019-08-20Txx:xx:xx.xxxxxx #xxxxx] DEBUG -- : Binding pusher:error
to pusher_global_channel
D, [2019-08-20Txx:xx:xx.xxxxxx #xxxxx] DEBUG -- : Binding pusher:ping
to pusher_global_channel
If I try to run this after the first command:
channels_client.connect
...it refuses to connect.
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/pusher-client-0.6.2/lib/pusher-client/websocket.rb:17:in
`initialize': No connection could be made because the target machine
actively refused it. - connect(2) for "tap.liquid.com" port 80
(Errno::ECONNREFUSED)
The error comes from tcpsocket.new (Ruby https://ruby-doc.org/stdlib-2.5.1/libdoc/socket/rdoc/TCPSocket.html) in websocket line 17: https://github.com/pusher-community/pusher-websocket-ruby/blob/master/lib/pusher-client/websocket.rb
ws_host tap.liquid.com 80 seems to be invalid, https://pusher.com/docs/channels/library_auth_reference/pusher-websockets-protocol
I have tried using a secure connection, at least in the browser and got a 404 for ws and invalid request, which is good in this case, for https (https://tap.liquid.com/).
You need to configure ssl in the client configuration, but the pusher-client gem as well as one other I have found are pretty old. Maybe it is wise to switch to a more up-to-date library like https://github.com/pusher/pusher-http-ruby/blob/master/README.md
The example contains an option for activated SSL.

WebSocket connection to 'ws://localhost:8080/socket' failed: Error during WebSocket handshake: Unexpected response code: 404

I looked at many other similar questions, but none seem to work for me.
I am following this example: http://www.devglan.com/spring-boot/spring-websocket-integration-example-without-stomp
When, I tried this example alone, it is working perfectly. However, when I tried to integrate it with my main project, it seems to be giving the error: WebSocket connection to 'ws://localhost:8080/socket' failed: Error during WebSocket handshake: Unexpected response code: 404
I am just calling index.html directly in my main project.
I am unable to find the source of error.
Following are all the jars in my main project where error is generated:
classmate-1.3.3.jar
commons-io-1.3.2.jar
commons-net-3.6.jar
groovy-2.4.10.jar
hibernate-validator-5.3.5.Final.jar
jackson-annotations-2.8.0.jar
jackson-core-2.8.8.jar
jackson-databind-2.8.8.jar
javassist-3.21.0-GA.jar
jboss-logging-3.3.1.Final.jar
jcl-over-slf4j-1.7.25.jar
json-20140107.jar
jul-to-slf4j-1.7.25.jar
log4j-over-slf4j-1.7.25.jar
logback-classic-1.1.11.jar
logback-core-1.1.11.jar
ognl-3.0.8.jar
slf4j-api-1.7.25.jar
snakeyaml-1.17.jar
spring-aop-4.3.8.RELEASE.jar
spring-beans-4.3.8.RELEASE.jar
spring-boot-1.5.3.RELEASE.jar
spring-boot-autoconfigure-1.5.3.RELEASE.jar
spring-boot-devtools-1.5.3.RELEASE.jar
spring-boot-starter-1.5.3.RELEASE.jar
spring-boot-starter-logging-1.5.3.RELEASE.jar
spring-boot-starter-thymeleaf-1.5.3.RELEASE.jar
spring-boot-starter-tomcat-1.5.3.RELEASE.jar
spring-boot-starter-web-1.5.3.RELEASE.jar
spring-boot-starter-websocket-1.5.3.RELEASE.jar
spring-context-4.3.8.RELEASE.jar
spring-core-4.3.8.RELEASE.jar
spring-expression-4.3.8.RELEASE.jar
spring-messaging-4.3.8.RELEASE.jar
spring-web-4.3.8.RELEASE.jar
spring-webmvc-4.3.8.RELEASE.jar
spring-websocket-4.3.8.RELEASE.jar
thymeleaf-2.1.5.RELEASE.jar
thymeleaf-layout-dialect-1.4.0.jar
thymeleaf-spring4-2.1.5.RELEASE.jar
tomcat-embed-core-8.5.14.jar
tomcat-embed-el-8.5.14.jar
tomcat-embed-websocket-8.5.14.jar
unbescape-1.1.0.RELEASE.jar
validation-api-1.1.0.Final.jar

Error during WebSocket handshake: Invalid status line

WebSocket connection to 'ws://server-ip:port-name/ws' failed: Error during WebSocket handshake: Invalid status line on tsip_transport.js?svn=241:359
While trying to connect to PBX server on
http://server-ip/call.htm on my server same to which is present on official site below
https://www.doubango.org/sipml5/call.htm
I get the above error.
The code which gives me the error is
var s_url = tsk_string_is_null_or_empty(o_self.o_stack.network.s_websocket_server_url) ?
tsk_string_format("{0}://{1}:{2}",o_self.s_protocol, o_self.s_host, o_self.i_port) : o_self.o_stack.network.s_websocket_server_url;
tsk_utils_log_info("Connecting to '"+s_url+"'");
o_self.o_ws = new WebSocket(s_url, 'sip');
I am getting an error on this line
o_self.o_ws = new WebSocket(s_url, 'sip');
A WebSocket client expects that a WebSocket server returns 101 as the HTTP status code (see RFC 6455 for details). Check what HTTP status code your WebSocket server returns. It will give you a hint.

Socket.IO flashsocket security sandbox error

I have been playing around with node.js and socket.io for the past few days. Everything works fine on my local machine (windows using iss for a webserver), but when uploading it to my remote server (ubuntu box), I get security errors.
[trace] Warning: Failed to load policy file from http://localhost:8000/crossdomain.xml
[trace] *** Security Sandbox Violation ***
[trace] Connection to http://localhost:8000/socket.io/1/ halted - not permitted from http://****/virtualcinema/VirtualCinema.swf
[trace] Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://****/virtualcinema/VirtualCinema.swf cannot load data from http://localhost:8000/socket.io/1/.
The AS3 code it's erroring on is:
Security.loadPolicyFile("xmlsocket://localhost:10843");
socket = new FlashSocket("localhost:8000");
The policy file is being served correctly on port 10843 and I can receive the policy file fine at http://**:10843/ in my browser. Why is it trying to load the policy file on port 8000. That warning does not appear on my local build.
The socket.io code:
socket = io.listen(8000);
socket.configure(function()
{
socket.set("transports", ["flashsocket"]);
socket.set("log level", 2);
});
I'm confused as to why it gets resolved fine when I test it on a localmachine but not on a remote one. Any help would be much appreciated :)
The crossdomain.xml I am using:
<cross-domain-policy>
<allow-access-from domain="*" to-ports="*"/>
</cross-domain-policy>
Fixed. I changed it from pointing to localhost to my servers externalIP.
I had tried this before, but unfortunately the server had cached my swf file and I did not realise it was fixed.
Security.loadPolicyFile("xmlsocket://****.com:10843");
socket = new FlashSocket("****.com:8000");

Resources