You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Andrew Phillips <an...@apache.org> on 2015/09/05 16:36:02 UTC

Re: google cloud node creation request fail - trying to ssh with node ip after creation

[moving this to user@ - please subscribe to that list if you are not 
already on it, Subhadip. Thanks!]

Hi Subhadip

Purely based on the error message, it would seem that the proxy settings 
you are providing are incorrect:

properties.setProperty(Constants.PROPERTY_PROXY_TYPE, "http");
properties.setProperty(Constants.PROPERTY_PROXY_HOST, "x.x.x.x");
properties.setProperty(Constants.PROPERTY_PROXY_PORT, "xx");
properties.setProperty(Constants.PROPERTY_PROXY_USER, "xxxx");
properties.setProperty(Constants.PROPERTY_PROXY_PASSWORD, "xxxx");

I'm assuming you are supplying an actual IP address or hostname for the 
proxy host, or are you passing "x.x.x.x" literally? You only need the 
proxy settings if you cannot connect directly to the newly created 
machine - otherwise, you do not need to set the PROPERTY_PROXY_* 
properties.

Regards

ap0

Re: Do not block until running for SoftLayer?

Posted by Andrea Turli <an...@gmail.com>.
Hi Subhadip,

could you please paste a snippet of code of what you are trying to do?

is this basic test [1] similar to what you are doing?

Andrea

[1]:
https://github.com/jclouds/jclouds/blob/master/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/SoftLayerComputeServiceContextLiveTest.java

On Wed, Sep 16, 2015 at 12:10 AM, Andrew Phillips <an...@apache.org>
wrote:

> Hi Subhadip
>
> When I tried the same thing for SoftLayer, it's not working.
>>
>> I have to wait approx 5 min till the vm is in RUNNING status to get
>> the nodeMetaDataSet response from CREATENODESINGROUP. Any suggestions?
>>
>
> I'm afraid I don't know enough about the details of the SoftLayer provider
> implementation to be able to give any immediate suggestions :-( Perhaps the
> API call is simply blocking for that amount of time (i.e. there's maybe no
> SSH calls going on)..?
>
> I hope someone on the list with more knowledge of the SoftLayer provider
> is able to help!
>
> Regards
>
> ap
>

Do not block until running for SoftLayer?

Posted by Andrew Phillips <an...@apache.org>.
Hi Subhadip

> When I tried the same thing for SoftLayer, it's not working.
> 
> I have to wait approx 5 min till the vm is in RUNNING status to get
> the nodeMetaDataSet response from CREATENODESINGROUP. Any suggestions?

I'm afraid I don't know enough about the details of the SoftLayer 
provider implementation to be able to give any immediate suggestions :-( 
Perhaps the API call is simply blocking for that amount of time (i.e. 
there's maybe no SSH calls going on)..?

I hope someone on the list with more knowledge of the SoftLayer provider 
is able to help!

Regards

ap

Re: google cloud node creation request fail - trying to ssh with node ip after creation

Posted by Eric Johnson <er...@google.com>.
(repeat, sorry for the spam)

Hi Subhadip,

Since you said the node is being created, you could try SSH'ing to it from
outside of jclouds code using the same machine where you ran the jclouds
code. This will help rule out networking issues.  You could try using the Cloud
SDK <https://cloud.google.com/sdk/> and after installing and
authenticating, you could try,

gcloud --project YOUR_PROJECT compute ssh INSTANCE_NAME --zone
europe-west1-c

You can also use 'gcloud compute instances describe INSTANCE_NAME --zone
europe-west1-c' to ensure that the public IP matches what jclouds was
trying to use.

HTH, Eric

On Sat, Sep 5, 2015 at 8:46 AM, Subhadip Bagui <i....@gmail.com> wrote:

> Hi Andrew,
>
> I'm supplying actual proxy ip and port with username and password, just to
> avoid company credentials I put it here like this. I'm working behind
> firewall so need to go via proxy server.
>
> If I see in actual google cloud account, the node is getting created with
> my hit, but in the response I'm getting is the error mentioned.
>
>
> Regards,
> Subhadip
>
>
> -------------------------------------------------------------------------------------------------------------------
>
> On Sat, Sep 5, 2015 at 8:06 PM, Andrew Phillips <an...@apache.org>
> wrote:
>
> > [moving this to user@ - please subscribe to that list if you are not
> > already on it, Subhadip. Thanks!]
> >
> > Hi Subhadip
> >
> > Purely based on the error message, it would seem that the proxy settings
> > you are providing are incorrect:
> >
> > properties.setProperty(Constants.PROPERTY_PROXY_TYPE, "http");
> > properties.setProperty(Constants.PROPERTY_PROXY_HOST, "x.x.x.x");
> > properties.setProperty(Constants.PROPERTY_PROXY_PORT, "xx");
> > properties.setProperty(Constants.PROPERTY_PROXY_USER, "xxxx");
> > properties.setProperty(Constants.PROPERTY_PROXY_PASSWORD, "xxxx");
> >
> > I'm assuming you are supplying an actual IP address or hostname for the
> > proxy host, or are you passing "x.x.x.x" literally? You only need the
> proxy
> > settings if you cannot connect directly to the newly created machine -
> > otherwise, you do not need to set the PROPERTY_PROXY_* properties.
> >
> > Regards
> >
> > ap0
> >
>

Re: google cloud node creation request fail - trying to ssh with node ip after creation

Posted by Andrew Phillips <an...@apache.org>.
> But strangely the program execution is not coming out of the
> main thread called. After connecting to the node is it trying to
> fetch something which never completes?

If you take a thread dump or look at it using VisualVM or so, can you 
see where it's hanging? Also, have you tried enabling wire logging [1] 
to see which requests may not be completing?

Regards

ap

[1] https://jclouds.apache.org/reference/logging/

Re: google cloud node creation request fail - trying to ssh with node ip after creation

Posted by Andrew Phillips <an...@apache.org>.
> Correct. I dont want to connect to the node on creation. Will
> make a separate call for bootstrap to connect and deploy
> scripts. Is there any way to disable the connect to node ?

You might want to see if setting "blockUntilRunning" to false in the 
TemplateOptions [1] makes any difference. It's not the only reason 
jclouds may try to connect to the box, but setting it to false is at 
least worth a try...

Regards

ap

[1] 
https://jclouds.apache.org/reference/javadoc/1.9.x/org/jclouds/compute/options/TemplateOptions.Builder.html#blockUntilRunning(boolean)

Re: google cloud node creation request fail - trying to ssh with node ip after creation

Posted by Andrew Phillips <an...@apache.org>.
> My doubt is why the request is trying to do ssh while node
> creation. I'm not doing any runScript on the node in my
> computeService request.

Ah, thanks for clarifying - I had misunderstood your question. From what 
I recall, the SSH check is try to verify that the node is actually 
accessible and usable; experience having shown that the status as 
reported by the cloud API itself isn't necessarily a reliable indicator 
of whether the image is "ready".

I take it that in your situation you don't actually plan to access the 
node once you've created it?

Regards

ap

Re: google cloud node creation request fail - trying to ssh with node ip after creation

Posted by Andrew Phillips <an...@apache.org>.
[responding on user@]

> I'm supplying actual proxy ip and port with username and password,

Ah, OK, thanks for clarifying. Does your proxy allow port 22? From the 
following message, I suspect that it might be blocking that port:

WARNING: Error checking reachability of ip:port 146.148.11.83:22

Regards

ap

Re: google cloud node creation request fail - trying to ssh with node ip after creation

Posted by Eric Johnson <er...@google.com.INVALID>.
(repeat, sorry for the spam)

Hi Subhadip,

Since you said the node is being created, you could try SSH'ing to it from
outside of jclouds code using the same machine where you ran the jclouds
code. This will help rule out networking issues.  You could try using the Cloud
SDK <https://cloud.google.com/sdk/> and after installing and
authenticating, you could try,

gcloud --project YOUR_PROJECT compute ssh INSTANCE_NAME --zone
europe-west1-c

You can also use 'gcloud compute instances describe INSTANCE_NAME --zone
europe-west1-c' to ensure that the public IP matches what jclouds was
trying to use.

HTH, Eric

On Sat, Sep 5, 2015 at 8:46 AM, Subhadip Bagui <i....@gmail.com> wrote:

> Hi Andrew,
>
> I'm supplying actual proxy ip and port with username and password, just to
> avoid company credentials I put it here like this. I'm working behind
> firewall so need to go via proxy server.
>
> If I see in actual google cloud account, the node is getting created with
> my hit, but in the response I'm getting is the error mentioned.
>
>
> Regards,
> Subhadip
>
>
> -------------------------------------------------------------------------------------------------------------------
>
> On Sat, Sep 5, 2015 at 8:06 PM, Andrew Phillips <an...@apache.org>
> wrote:
>
> > [moving this to user@ - please subscribe to that list if you are not
> > already on it, Subhadip. Thanks!]
> >
> > Hi Subhadip
> >
> > Purely based on the error message, it would seem that the proxy settings
> > you are providing are incorrect:
> >
> > properties.setProperty(Constants.PROPERTY_PROXY_TYPE, "http");
> > properties.setProperty(Constants.PROPERTY_PROXY_HOST, "x.x.x.x");
> > properties.setProperty(Constants.PROPERTY_PROXY_PORT, "xx");
> > properties.setProperty(Constants.PROPERTY_PROXY_USER, "xxxx");
> > properties.setProperty(Constants.PROPERTY_PROXY_PASSWORD, "xxxx");
> >
> > I'm assuming you are supplying an actual IP address or hostname for the
> > proxy host, or are you passing "x.x.x.x" literally? You only need the
> proxy
> > settings if you cannot connect directly to the newly created machine -
> > otherwise, you do not need to set the PROPERTY_PROXY_* properties.
> >
> > Regards
> >
> > ap0
> >
>

Re: google cloud node creation request fail - trying to ssh with node ip after creation

Posted by Eric Johnson <er...@google.com.INVALID>.
+user, bcc:dev

Hi Subhadip,

Since you said the node is being created, you could try SSH'ing to it from
outside of jclouds code using the same machine where you ran the jclouds
code. This will help rule out networking issues.  You could try using the Cloud
SDK <https://cloud.google.com/sdk/> and after installing and
authenticating, you could try,

gcloud --project YOUR_PROJECT compute ssh INSTANCE_NAME --zone
europe-west1-c

You can also use 'gcloud compute instances describe INSTANCE_NAME --zone
europe-west1-c' to ensure that the public IP matches what jclouds was
trying to use.

HTH, Eric



On Sat, Sep 5, 2015 at 8:46 AM, Subhadip Bagui <i....@gmail.com> wrote:

> Hi Andrew,
>
> I'm supplying actual proxy ip and port with username and password, just to
> avoid company credentials I put it here like this. I'm working behind
> firewall so need to go via proxy server.
>
> If I see in actual google cloud account, the node is getting created with
> my hit, but in the response I'm getting is the error mentioned.
>
>
> Regards,
> Subhadip
>
>
> -------------------------------------------------------------------------------------------------------------------
>
> On Sat, Sep 5, 2015 at 8:06 PM, Andrew Phillips <an...@apache.org>
> wrote:
>
> > [moving this to user@ - please subscribe to that list if you are not
> > already on it, Subhadip. Thanks!]
> >
> > Hi Subhadip
> >
> > Purely based on the error message, it would seem that the proxy settings
> > you are providing are incorrect:
> >
> > properties.setProperty(Constants.PROPERTY_PROXY_TYPE, "http");
> > properties.setProperty(Constants.PROPERTY_PROXY_HOST, "x.x.x.x");
> > properties.setProperty(Constants.PROPERTY_PROXY_PORT, "xx");
> > properties.setProperty(Constants.PROPERTY_PROXY_USER, "xxxx");
> > properties.setProperty(Constants.PROPERTY_PROXY_PASSWORD, "xxxx");
> >
> > I'm assuming you are supplying an actual IP address or hostname for the
> > proxy host, or are you passing "x.x.x.x" literally? You only need the
> proxy
> > settings if you cannot connect directly to the newly created machine -
> > otherwise, you do not need to set the PROPERTY_PROXY_* properties.
> >
> > Regards
> >
> > ap0
> >
>

Re: google cloud node creation request fail - trying to ssh with node ip after creation

Posted by Subhadip Bagui <i....@gmail.com>.
Hi Andrew,

I'm supplying actual proxy ip and port with username and password, just to
avoid company credentials I put it here like this. I'm working behind
firewall so need to go via proxy server.

If I see in actual google cloud account, the node is getting created with
my hit, but in the response I'm getting is the error mentioned.


Regards,
Subhadip

-------------------------------------------------------------------------------------------------------------------

On Sat, Sep 5, 2015 at 8:06 PM, Andrew Phillips <an...@apache.org> wrote:

> [moving this to user@ - please subscribe to that list if you are not
> already on it, Subhadip. Thanks!]
>
> Hi Subhadip
>
> Purely based on the error message, it would seem that the proxy settings
> you are providing are incorrect:
>
> properties.setProperty(Constants.PROPERTY_PROXY_TYPE, "http");
> properties.setProperty(Constants.PROPERTY_PROXY_HOST, "x.x.x.x");
> properties.setProperty(Constants.PROPERTY_PROXY_PORT, "xx");
> properties.setProperty(Constants.PROPERTY_PROXY_USER, "xxxx");
> properties.setProperty(Constants.PROPERTY_PROXY_PASSWORD, "xxxx");
>
> I'm assuming you are supplying an actual IP address or hostname for the
> proxy host, or are you passing "x.x.x.x" literally? You only need the proxy
> settings if you cannot connect directly to the newly created machine -
> otherwise, you do not need to set the PROPERTY_PROXY_* properties.
>
> Regards
>
> ap0
>