Failed to connect to APNS - ios

We are facing a strange problem with APNS.
We have a live app and it is able to send Push Message from the API domain. But we are preparing to move it to another server where we are testing with the IP instead of domain.
We are using the same settings and code, but APNS keeps failing returning the following error:
NOTICE: Failed to connect to APNS: 0 .
We have checked thoroughly, we have 2195 and 2196 ports open and SSL installed on our new server.
Can anyone please tell me if APNS keeps failing because of using IP instead of domain name?
Regards,
SG

Apple docs say:
The IP address range for the push service is subject to change; the
expectation is that providers will connect by hostname rather than IP
address. The push service uses a load balancing scheme that yields a
different IP address for the same hostname. However, the entire
17.0.0.0/8 address block is assigned to Apple, so you can specify that range in your firewall rules.

Related

Connecting using SnowSQL denied 403 error

I am trying to configure JDBC but kept getting the same error I am getting using snowsql:
250001 (08001): Failed to connect to DB. Verify the account name is correct: JG3409.canada-central.azure.snowflakecomputing.com:443. 000403: 403: HTTP 403: Forbidden
If the error message is unclear, enable logging using -o log_level=DEBUG and see the log to find out the cause. Contact support for further help.
Goodbye!
I have configured the config file, and I have double checked the account, company, region, reset password to only use alphanumeric.
I have used both forms of the URL
The only possibility is that I am using a trial account, but I can't imagine that this would limit external non-browser connections?
I use a simple user/password, I have whitelisted my IP and I don't have a problem with a proxy or a firewall. I can successfully connect using a browser.. using:
https://app.snowflake.com/canada-central.azure/jg63409
Important contents of the config file:
[connections]
accountname=JG3409
#accountname=uegxydq-pz20606
region=canada-central.azure
username=ASHSNOWFLAKE
any ideas?
Your account is not JG3409 but JG63409 based on this link:
https://app.snowflake.com/canada-central.azure/jg63409
Try in your browser:
https://jg63409.canada-central.azure.snowflakecomputing.com
I found out using snowcd that my computer could not connect via my home router.
When I used my personal hotspot on my (5G) phone, snowcd passed all the tests immediately. The problem then arose how to adjust the network security policy to allow a CIDR block of network addresses through since my phone uses a new address every time I connect, and I can't edit the policy to allow my phone while connected via my phone (for obvious reasons)
Catch 22
123.45.0.0/16 is not accepted in the new Snowflake UI, and 0.0.0.0 doesn't work for me, but the documentation gave me a clue.. the new UI doesn't separate by commas, so I switched to the old UI and voila!
Incidentally the OLD UI uses the same URL as SnowSQL so I picked up my error in my account number there as well (although I should have seen it earlier).
Diabolical but thanks #Sergiu too!

How to connect a device to a Rails server via TCP?

let me explain what I've already completed and what is needed to be done.
What's I've done
Rails server with PG database that returns some data to a user from DB via GET request.
What's needs to be completed
I need to connect the device to this server via TCP. The manufacturer of the device asks me to provide the server address and the port, so he can configure the device to send some messages to the port provided. This messages should be recorded to DB (this part is not important, just to let you know the flow I'm trying to achieve) and then a user can get those messages by GET request mentioned above.
The question
How to set up the Rails server to accept TCP messages from the device to a specified port? How to handle those messages? E.g. the simplest: how to print the message received?
Is it even possible with Rails? If you have a better option on how to achieve the flow mentioned above, please share it.
I'd appreciate some help with code or links.
Just start your rails server with command rails s -b 0.0.0.0
this will bind your public IP with your server so that you can connect with other devices to your rails server.
for example your IP is 192.168.64.40 so, after this command you can do like 192.168.64.40:3000 in to other device's browser so that they can connect to your rails server

pusher issue on connection wrong cluster

This is the issue I am getting:
application-169dad56b7bb7d53e3aaeaf87e8fc05c.js:156 Pusher : Error : {"type":"WebSocketError","error":{"type":"PusherError","data":{"code":4001,"message":"App key 2395af13c928012b447b not in this cluster. Did you forget to specify the cluster?"}}}
This error means that you haven't specified the Pusher cluster to connect to, or specified one that is not the same as the one your app was configured to use in Pusher's Dashboard.
Specify the cluster to connect to as described here. The cluster your app is configured to use is shown at the bottom left of your app's page in the dashboard.

How do i find the ip address of a server in a homegroup

I have a number of devices connected to a server. When it restarts the ip address might change. How would the remaining devices find the new address?
I want to automate the process since I want to distribute the software and there won't be any network administrator.
I found solutions like configuring a DHCP server or manually configuring the router, but it won't possible to manually configure the routers of the devices that would use the software.
What you could do is following :-
Assign static IP-Address to the server; it could be done by adding a reservation for server's IP-Address based on the MAC address of the server in the router. Check your router manual for how to add IP-Address reservation for a designated MAC-Address.
Once server has got a static IP-Address, your work would be so easy to achieve. You either need to ensure that the clients make an entry of the server's hostname and the corresponding static IP into the client's host name OR if you've an adhoc connection(WiFi/Bluetooth), it would do that automatically without your intervention.
That's it, you have a static IP-Address for your server and you have mapping of server's IP-Address and hostname into each client's etc/hosts file(not needed for adhoc connections as explained above).

Blackberry Push notification : Java.io.IOException:Network operation(Subscribe)failed. Make sure that Content Provider Url is accessible

I am working on blackberry Push Notification and facing a big issue while registering from the device. I'm getting the Exception:
Java.io.IOException:Network operation(Subscribe)failed. Make sure that Content Provider Url is accessible..
I go through this guide and set up all things according to it.
However I am unable to register. My tomcat server is running and I can access content provider URL from my computer and the same from device's browser.
PC URL is: https:/loaclhost:8443/sample-push-initiator
I changed local host to IP address of my Computer. and can access it over WiFi.
Please help me regarding this.
Your push initiator URL must be publicly accessible from the internet to be accessible from your device. Using localhost or any local IP address (e.g. 192.168.0.2) won't work.
You'll have to set up your router to forward traffic on port 8443 to your PC's local IP.
You should ensure that this URL is accessible from your blackberry normal web browser (not the hotspot browser) before trying with the sample push app.

Resources