Google App Engine Python 2.7 SSL stopped working












0















The issue:
the app worked for years, but it has this error since 2018-nov-9
The code uses SSL to send a notificationa via Apple APNS. It uses a taskqueue to send the notifications.



The error in Stackdrivers is: <class 'socket.error'>: [Errno 11] Resource temporarily unavailable
Cloud Tasks is full of tasks that keep retrying.



What I tried:
1- At first I thought that the Apple APNS server may be out of order, so I tried the very same code with the same data on my local machine and it works, so the Apple server works.



2- Then I tried to change the library that I use to send the notifications with one of its fork: https://github.com/djacobs/PyAPNs
In locale it works the same way of the other, in App engine it doesen't work, so a different fork makes no difference.



But the error in App engine was more clear:



File "/base/alloc/tmpfs/dynamic_runtimes/python27g/90ff42587f3b5ce/python27/python27_lib/versions/third_party/ssl-2.7.11/ssl.py", line 843, in do_handshake
self._sslobj.do_handshake()
error: [Errno 11] Resource temporarily unavailable


3- I uploaded the project with a newer installation of the App Engine (ver 220) Everything works (web site, google cloud endpoints, android notifications...) except the notifications to Apple APNS via SSL



In my opinion the problem is connected to the SSL
Please help me










share|improve this question



























    0















    The issue:
    the app worked for years, but it has this error since 2018-nov-9
    The code uses SSL to send a notificationa via Apple APNS. It uses a taskqueue to send the notifications.



    The error in Stackdrivers is: <class 'socket.error'>: [Errno 11] Resource temporarily unavailable
    Cloud Tasks is full of tasks that keep retrying.



    What I tried:
    1- At first I thought that the Apple APNS server may be out of order, so I tried the very same code with the same data on my local machine and it works, so the Apple server works.



    2- Then I tried to change the library that I use to send the notifications with one of its fork: https://github.com/djacobs/PyAPNs
    In locale it works the same way of the other, in App engine it doesen't work, so a different fork makes no difference.



    But the error in App engine was more clear:



    File "/base/alloc/tmpfs/dynamic_runtimes/python27g/90ff42587f3b5ce/python27/python27_lib/versions/third_party/ssl-2.7.11/ssl.py", line 843, in do_handshake
    self._sslobj.do_handshake()
    error: [Errno 11] Resource temporarily unavailable


    3- I uploaded the project with a newer installation of the App Engine (ver 220) Everything works (web site, google cloud endpoints, android notifications...) except the notifications to Apple APNS via SSL



    In my opinion the problem is connected to the SSL
    Please help me










    share|improve this question

























      0












      0








      0








      The issue:
      the app worked for years, but it has this error since 2018-nov-9
      The code uses SSL to send a notificationa via Apple APNS. It uses a taskqueue to send the notifications.



      The error in Stackdrivers is: <class 'socket.error'>: [Errno 11] Resource temporarily unavailable
      Cloud Tasks is full of tasks that keep retrying.



      What I tried:
      1- At first I thought that the Apple APNS server may be out of order, so I tried the very same code with the same data on my local machine and it works, so the Apple server works.



      2- Then I tried to change the library that I use to send the notifications with one of its fork: https://github.com/djacobs/PyAPNs
      In locale it works the same way of the other, in App engine it doesen't work, so a different fork makes no difference.



      But the error in App engine was more clear:



      File "/base/alloc/tmpfs/dynamic_runtimes/python27g/90ff42587f3b5ce/python27/python27_lib/versions/third_party/ssl-2.7.11/ssl.py", line 843, in do_handshake
      self._sslobj.do_handshake()
      error: [Errno 11] Resource temporarily unavailable


      3- I uploaded the project with a newer installation of the App Engine (ver 220) Everything works (web site, google cloud endpoints, android notifications...) except the notifications to Apple APNS via SSL



      In my opinion the problem is connected to the SSL
      Please help me










      share|improve this question














      The issue:
      the app worked for years, but it has this error since 2018-nov-9
      The code uses SSL to send a notificationa via Apple APNS. It uses a taskqueue to send the notifications.



      The error in Stackdrivers is: <class 'socket.error'>: [Errno 11] Resource temporarily unavailable
      Cloud Tasks is full of tasks that keep retrying.



      What I tried:
      1- At first I thought that the Apple APNS server may be out of order, so I tried the very same code with the same data on my local machine and it works, so the Apple server works.



      2- Then I tried to change the library that I use to send the notifications with one of its fork: https://github.com/djacobs/PyAPNs
      In locale it works the same way of the other, in App engine it doesen't work, so a different fork makes no difference.



      But the error in App engine was more clear:



      File "/base/alloc/tmpfs/dynamic_runtimes/python27g/90ff42587f3b5ce/python27/python27_lib/versions/third_party/ssl-2.7.11/ssl.py", line 843, in do_handshake
      self._sslobj.do_handshake()
      error: [Errno 11] Resource temporarily unavailable


      3- I uploaded the project with a newer installation of the App Engine (ver 220) Everything works (web site, google cloud endpoints, android notifications...) except the notifications to Apple APNS via SSL



      In my opinion the problem is connected to the SSL
      Please help me







      google-app-engine ssl






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 13 '18 at 17:52









      chairamchairam

      169311




      169311
























          2 Answers
          2






          active

          oldest

          votes


















          1














          I contacted the Google support. They found out that the problem was due to a misconfiguration in the socket library of the appengine. They solved the problem, my app got back to work. Everything is fine.






          share|improve this answer































            0














            Make sure you are importing the latest version of ssl library in your app.yaml:



            libraries:

            - name: ssl
            version: "2.7.11"





            share|improve this answer
























            • Yes I'm importing the SSL library, that's why it worked years. I opened an issue to Google, it seem be a problem with a new implementation of sockets, with the old implementation everything works. They are investigating.

              – chairam
              Nov 15 '18 at 0:20













            • Yes, but my point was to make sure you had >2.7.11. GAE recently deprecated every version prior to 2.7.11.

              – GAEfan
              Nov 15 '18 at 18:08











            • Yes, thank you >2.7.11 is in place.

              – chairam
              Nov 15 '18 at 18:34











            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53286870%2fgoogle-app-engine-python-2-7-ssl-stopped-working%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            I contacted the Google support. They found out that the problem was due to a misconfiguration in the socket library of the appengine. They solved the problem, my app got back to work. Everything is fine.






            share|improve this answer




























              1














              I contacted the Google support. They found out that the problem was due to a misconfiguration in the socket library of the appengine. They solved the problem, my app got back to work. Everything is fine.






              share|improve this answer


























                1












                1








                1







                I contacted the Google support. They found out that the problem was due to a misconfiguration in the socket library of the appengine. They solved the problem, my app got back to work. Everything is fine.






                share|improve this answer













                I contacted the Google support. They found out that the problem was due to a misconfiguration in the socket library of the appengine. They solved the problem, my app got back to work. Everything is fine.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 19 '18 at 14:04









                chairamchairam

                169311




                169311

























                    0














                    Make sure you are importing the latest version of ssl library in your app.yaml:



                    libraries:

                    - name: ssl
                    version: "2.7.11"





                    share|improve this answer
























                    • Yes I'm importing the SSL library, that's why it worked years. I opened an issue to Google, it seem be a problem with a new implementation of sockets, with the old implementation everything works. They are investigating.

                      – chairam
                      Nov 15 '18 at 0:20













                    • Yes, but my point was to make sure you had >2.7.11. GAE recently deprecated every version prior to 2.7.11.

                      – GAEfan
                      Nov 15 '18 at 18:08











                    • Yes, thank you >2.7.11 is in place.

                      – chairam
                      Nov 15 '18 at 18:34
















                    0














                    Make sure you are importing the latest version of ssl library in your app.yaml:



                    libraries:

                    - name: ssl
                    version: "2.7.11"





                    share|improve this answer
























                    • Yes I'm importing the SSL library, that's why it worked years. I opened an issue to Google, it seem be a problem with a new implementation of sockets, with the old implementation everything works. They are investigating.

                      – chairam
                      Nov 15 '18 at 0:20













                    • Yes, but my point was to make sure you had >2.7.11. GAE recently deprecated every version prior to 2.7.11.

                      – GAEfan
                      Nov 15 '18 at 18:08











                    • Yes, thank you >2.7.11 is in place.

                      – chairam
                      Nov 15 '18 at 18:34














                    0












                    0








                    0







                    Make sure you are importing the latest version of ssl library in your app.yaml:



                    libraries:

                    - name: ssl
                    version: "2.7.11"





                    share|improve this answer













                    Make sure you are importing the latest version of ssl library in your app.yaml:



                    libraries:

                    - name: ssl
                    version: "2.7.11"






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 13 '18 at 18:54









                    GAEfanGAEfan

                    6,8122824




                    6,8122824













                    • Yes I'm importing the SSL library, that's why it worked years. I opened an issue to Google, it seem be a problem with a new implementation of sockets, with the old implementation everything works. They are investigating.

                      – chairam
                      Nov 15 '18 at 0:20













                    • Yes, but my point was to make sure you had >2.7.11. GAE recently deprecated every version prior to 2.7.11.

                      – GAEfan
                      Nov 15 '18 at 18:08











                    • Yes, thank you >2.7.11 is in place.

                      – chairam
                      Nov 15 '18 at 18:34



















                    • Yes I'm importing the SSL library, that's why it worked years. I opened an issue to Google, it seem be a problem with a new implementation of sockets, with the old implementation everything works. They are investigating.

                      – chairam
                      Nov 15 '18 at 0:20













                    • Yes, but my point was to make sure you had >2.7.11. GAE recently deprecated every version prior to 2.7.11.

                      – GAEfan
                      Nov 15 '18 at 18:08











                    • Yes, thank you >2.7.11 is in place.

                      – chairam
                      Nov 15 '18 at 18:34

















                    Yes I'm importing the SSL library, that's why it worked years. I opened an issue to Google, it seem be a problem with a new implementation of sockets, with the old implementation everything works. They are investigating.

                    – chairam
                    Nov 15 '18 at 0:20







                    Yes I'm importing the SSL library, that's why it worked years. I opened an issue to Google, it seem be a problem with a new implementation of sockets, with the old implementation everything works. They are investigating.

                    – chairam
                    Nov 15 '18 at 0:20















                    Yes, but my point was to make sure you had >2.7.11. GAE recently deprecated every version prior to 2.7.11.

                    – GAEfan
                    Nov 15 '18 at 18:08





                    Yes, but my point was to make sure you had >2.7.11. GAE recently deprecated every version prior to 2.7.11.

                    – GAEfan
                    Nov 15 '18 at 18:08













                    Yes, thank you >2.7.11 is in place.

                    – chairam
                    Nov 15 '18 at 18:34





                    Yes, thank you >2.7.11 is in place.

                    – chairam
                    Nov 15 '18 at 18:34


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53286870%2fgoogle-app-engine-python-2-7-ssl-stopped-working%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Full-time equivalent

                    さくらももこ

                    13 indicted, 8 arrested in Calif. drug cartel investigation