[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-28 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15945370#comment-15945370
 ] 

Benjamin Lerer commented on CASSANDRA-1:


Thanks for the review.
Committed into 3.0 at 9b8692c6a4c75b7df29a58b5d3d1d1ee5cb0c3a4 and merged into 
3.11 and trunk.

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-27 Thread Michael Kjellman (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15944106#comment-15944106
 ] 

Michael Kjellman commented on CASSANDRA-1:
--

+1 [~blerer] LGTM!

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-25 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15941721#comment-15941721
 ] 

Benjamin Lerer commented on CASSANDRA-1:


The ticket status is still {{Patch Available}} which means that the patch has 
not been accepted yet.

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-25 Thread Chandra (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15941644#comment-15941644
 ] 

Chandra commented on CASSANDRA-1:
-

Hey , 

Is this change committed just wondering when this change will be available in 
the remote. 

I tried a few moments back after i took the latest changes , and it fails to 
start - ERROR [main] 2017-03-25 13:35:21,001 CassandraDaemon.java:663 - JNA 
failing to initialize properly.

Thanks in adv. 

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-23 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15937981#comment-15937981
 ] 

Benjamin Lerer commented on CASSANDRA-1:


[~mkjellman] Thanks for the reviews.

bq. 1. Should the loading of {{Native.register("winmm")}} in {{WindowsTimer}} 
also be moved into NativeLibraryWindows?
{{WindowsTimer}} is really specific to Windows and according to 
[~JoshuaMcKenzie] 
[comment|https://issues.apache.org/jira/browse/CASSANDRA-1?focusedCommentId=15929978=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15929978]
 we should not prevent startup due to an inability to access the {{winmm.dll}} 
library. So, I would be in favor of keeping it separeted for now.

bq. 2. Looks like the trunk patch didn't get pushed up or potentially just a 
copy paste error? Currently it's just pointing at blerer/trunk.
Sorry for that. It is a copy paste mistake. I fixed it.

bq. 3.  Thanks for putting the MSDN API URL in the method javadoc.
I am pretty sure that otherwise, I will have to end up googling it in a month 
or two ;-) 

bq. 4. In NativeLibraryWindows I think the following logger statements could be 
simplified:
I have pushed a new commit to fix it in all the branches. 

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-22 Thread Michael Kjellman (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15937127#comment-15937127
 ] 

Michael Kjellman commented on CASSANDRA-1:
--

[~blerer] this looks great! Renaming {{CLibrary}} --> {{NativeLibrary}} helps 
make the intent much clearer. 

# Should the loading of {{Native.register("winmm")}} in {{WindowsTimer}} also 
be moved into NativeLibraryWindows?
# Looks like the trunk patch didn't get pushed up or potentially just a copy 
paste error? Currently it's just pointing at blerer/trunk.
# Thanks for putting the MSDN API URL in the method javadoc. :)
# In {{NativeLibraryWindows}} I think the following logger statements could be 
simplified:

{code}
catch (UnsatisfiedLinkError e)
{
logger.warn("JNA link failure, one or more native method will be 
unavailable.");
logger.error("JNA link failure details: {}", e.getMessage());
}
{code}

Can be simplified to:
{code}
logger.error("Failed to link against JNA. Native methods will be unavailable.", 
e);
{code}

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-22 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15937079#comment-15937079
 ] 

Benjamin Lerer commented on CASSANDRA-1:


I force pushed a new patch.
The new patch use the {{Kernel32}} library to support natively the 
{{callGetPid}} method and keep the startup check. As the Windows library is not 
the {{c}} one, the patch also rename {{CLibrary}} to {{NativeLibrary}} as the 
name was misleading.  

||[3.0|https://github.com/apache/cassandra/compare/trunk...blerer:1-3.0]|[utests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-1-3.0-testall/]|[dtests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-1-3.0-dtest/]|
||[3.11|https://github.com/apache/cassandra/compare/trunk...blerer:1-3.11]|[utests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-1-3.11-testall/]|[dtests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-1-3.11-dtest/]|
||[trunk|https://github.com/apache/cassandra/compare/trunk...blerer:trunk]|[utests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-1-trunk-testall/]|[dtests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-1-trunk-dtest/]|



> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-21 Thread Michael Kjellman (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15935346#comment-15935346
 ] 

Michael Kjellman commented on CASSANDRA-1:
--

[~blerer]

* Just chatted quickly with [~jasobrown] and [~jjirsa] and I think hiding the 
fact we're using JNA under the hood and going with {{isAvailable()}} vs. 
{{jnaAvailable()}] is a good change, however, I think that changes the scope a 
bit. In the case of {{CLibraryWindows}} I used the existing Sigar based logic 
to get the current PID of the running JVM as I wasn't sure if the *nix APIs 
would work in Windows land. Thinking about it, this means {{isAvailable()}} is 
a bit more nuanced. For instance, in the current {{CLibraryWindows}} case, yes, 
the {{callGetpid()}} method is "available" but all the other methods that we 
happen to have right now use JNA, which isn't "available" in the Windows case.
* Do you happen to know if the native {{getpid()}} JNA will work on Windows? If 
so we can switch that from Sigar -> JNA for Windows too just like we're already 
doing for the Linux/Darwin case. If so, it makes sense to attempt to load JNA 
and libc in the WIndows case too?
* I don't think we should remove the checkJnaInitialization {{StartupCheck}} at 
minimum in the Linux and Darwin cases. Given that we ship JNA in the release, 
either we can't link against the library it due to an issue or someone removed 
it. Given the performance implications I think we should leave the hard fail in 
place -- but skip it if the current OS type is  Windows.

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-21 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15934880#comment-15934880
 ] 

Benjamin Lerer commented on CASSANDRA-1:


||[3.0|https://github.com/apache/cassandra/compare/trunk...blerer:1-3.0]|[utests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-1-3.0-testall/]|[dtests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-1-3.0-dtest/]|
||[3.11|https://github.com/apache/cassandra/compare/trunk...blerer:1-3.11]|[utests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-1-3.11-testall/]|[dtests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-1-3.11-dtest/]|
||[trunk|https://github.com/apache/cassandra/compare/trunk...blerer:trunk]|[utests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-1-trunk-testall/]|[dtests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-1-trunk-dtest/]|

[~jasobrown], [~mkjellman] could one of you review the patches. Only 3.0 and 
3.11 differ a bit. 

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-17 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15930330#comment-15930330
 ] 

Benjamin Lerer commented on CASSANDRA-1:


I have pushed an initial version of the patch 
[here|https://github.com/apache/cassandra/compare/trunk...blerer:1-3.0].
The patch replace the {{jnaAvailable()}} method by the {{isAvailable()}} method 
which will return {{true}} only if the library has been sucessfully linked.
In the case of Windows {{isAvailable()}} will always return {{false}}.
The patch remove the startup check so the server will start even if JNA is not 
found (in which case a warning would have already been logged).
The {{NativeAccessMBean::isAvailable}} method will now only return {{true}} if 
the native library has been successfully linked.  

If nobody disagree with the approach, I will push it on CI next week. 

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-17 Thread Dave Brosius (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15930281#comment-15930281
 ] 

Dave Brosius commented on CASSANDRA-1:
--

[~blerer] i added it for someone else, so no i don't personally need it

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-17 Thread Jeremy Hanna (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15930068#comment-15930068
 ] 

Jeremy Hanna commented on CASSANDRA-1:
--

I think it's reasonable to not hold up startup if we can still issue a warning 
and still keep the state whether it was able to use JNA to lock memory.

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-17 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15930052#comment-15930052
 ] 

Benjamin Lerer commented on CASSANDRA-1:


Another approach would be to convert  {{jnaAvailable()}} into 
{{isAvailable()}}. This method will return {{true}} if the library has been 
successfully linked and {{false}} otherwise. The startup check will then check 
if the operating system is not Windows that the library has been successfully 
linked and prevent the system to start if it has not.

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-17 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15930034#comment-15930034
 ] 

Benjamin Lerer commented on CASSANDRA-1:


Sorry, I missed the comment pointing at CASSANDRA-5508.



> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-17 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15930023#comment-15930023
 ] 

Benjamin Lerer commented on CASSANDRA-1:


[~dbrosius] you are the one that exposed the information through JMX. Is it 
something that you really need?

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-17 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15930006#comment-15930006
 ] 

Benjamin Lerer commented on CASSANDRA-1:


Then does it really make sense to keep the {{jnaAvailable()}} method? Right 
now, that check does not really bring much because if the library cannot be 
linked the server will start anyway.
Is a warning in the log not enough? I really wonder if anybody is really using 
the NativeMBean to check that jna and mlock are available.
[~jasobrown], [~mkjellman] what is your opinion on that?

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-17 Thread Joshua McKenzie (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15929978#comment-15929978
 ] 

Joshua McKenzie commented on CASSANDRA-1:
-

It's not worth disabling startup due to an inability to access winmm.dll. I 
used that to access the multimedia timer to change the kernel's timer 
coalescing which is strictly a performance improvement and shouldn't block 
startup of a node.

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-17 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15929959#comment-15929959
 ] 

Benjamin Lerer commented on CASSANDRA-1:


I did a bit of digging. JNA is actually used on {{Windows}} by 
{{org.apache.cassandra.utils.WindowsTimer}}. So it makes sense to block startup 
if JNA is not there. 
 

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-17 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15929645#comment-15929645
 ] 

Benjamin Lerer commented on CASSANDRA-1:


I went to look into how the things were working before your change.
The code does a difference between JNA not being there (jna jar not being in 
the classpath) and the fact that it could not link a library. In the first case 
{{jnaAvailable()}} must return {{false}} but in the second case it should 
return true (and an error message should have been logged). The new 
implementation always return {{false}} even if the library is actually there.
So to keep the existing behaviour we would need to check if JNA is in the 
classpath and throw the appropriate errors. The easier way would probably to 
also have the following code in {{CLibraryWindows}} but it feels a bit weird:
{code}
try
{
Native.register("c");
}
catch (NoClassDefFoundError e)
{
logger.warn("JNA not found. Native methods will be disabled.");
jnaAvailable = false;
}
catch (UnsatisfiedLinkError e)
{
logger.warn("JNA link failure, one or more native method will be 
unavailable.");
logger.trace("JNA link failure details: {}", e.getMessage());
}
catch (NoSuchMethodError e)
{
logger.warn("Obsolete version of JNA present; unable to register C 
library. Upgrade to JNA 3.2.7 or later");
jnaAvailable = false;
}
{code} 

Any suggestions?

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-16 Thread Michael Kjellman (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15928895#comment-15928895
 ] 

Michael Kjellman commented on CASSANDRA-1:
--

[~blerer] I don't have a Windows machine to test this unfortunately... but, I 
do know what's going on, although I'm not sure about the correct fix.

The following code from {{StartupChecks}}:

{code}
public static final StartupCheck checkJnaInitialization = new StartupCheck()
{
public void execute() throws StartupException
{
// Fail-fast if JNA is not available or failing to initialize 
properly
if (!CLibrary.jnaAvailable())
throw new 
StartupException(StartupException.ERR_WRONG_MACHINE_STATE, "JNA failing to 
initialize properly. ");
}
};
{code}

This is due to the fact that when I implemented the Windows {{CLibraryWrapper}} 
implementation {{CLibraryWindows}}, I had it return false for jnaAvailable(). 
Given that we only use JNA right now to access libc calls I wasn't aware that 
any of those would be implemented in JNA to do something in Windows.

If that's not correct, I'll throw a very quick patch together to load JNA in 
the Windows implementation, but I'll still need some help to know what wrapped 
methods actually work on Windows.

Should the startup check just be exempted for Windows?

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-15 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15927129#comment-15927129
 ] 

Jason Brown commented on CASSANDRA-1:
-

[~blerer] Sorry to give you more work, but the help is much appreciated!

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-15 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15927120#comment-15927120
 ] 

Benjamin Lerer commented on CASSANDRA-1:


[~jasobrown], [~mkjellman] if you want I can investigate it. It seems that I am 
one of the only Windows dev around here.  

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13333) Cassandra does not start on Windows due to 'JNA link failure'

2017-03-15 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15927018#comment-15927018
 ] 

Jason Brown commented on CASSANDRA-1:
-

caused by CASSANDRA-13233. [~mkjellman], you don't happen have a Windows 
machine to investigate this, perchance? (pretty sure you do not)

> Cassandra does not start on Windows due to 'JNA link failure'
> -
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benjamin Lerer
>Priority: Blocker
>
> Cassandra 3.0 HEAD does not start on Windows. The only error in the logs is: 
> {{ERROR 16:30:10 JNA failing to initialize properly.}} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)