2016-10-17 9 views
1

を通じて私は、Perl-CGI「Javaランタイムのための十分なメモリが」apacheの

my $result = `export _JAVA_OPTIONS="-Xms1024M -Xmx1024M";/opt/mapr/drill/drill-1.6.0/bin/sqlline -u "jdbc:drill:drillbit=172.16.50.16" --showHeader=false --silent <<EOF 
$query 
EOF`; 

から以下のようにapacheのドリルSQLを実行しようとしていますが、私は閲覧しようとすると、私は以下のエラーを取得しています:

# There is insufficient memory for the Java Runtime Environment to continue. 
# Native memory allocation (mmap) failed to map 2555904 bytes for committing reserved memory. 
# An error report file with more information is saved as: 
# /tmp/hs_err_pid16431.log 


cat /tmp/hs_err_pid16431.log 
# 
# There is insufficient memory for the Java Runtime Environment to continue. 
# Native memory allocation (mmap) failed to map 2555904 bytes for committing reserved memory. 
# Possible reasons: 
# The system is out of physical RAM or swap space 
# In 32 bit mode, the process size limit was hit 
# Possible solutions: 
# Reduce memory load on the system 
# Increase physical memory or swap space 
# Check if swap backing store is full 
# Use 64 bit Java on a 64 bit OS 
# Decrease Java heap size (-Xmx/-Xms) 
# Decrease number of Java threads 
# Decrease Java thread stack sizes (-Xss) 
# Set larger code cache with -XX:ReservedCodeCacheSize= 
# This output file may be truncated or incomplete. 
# 
# Out of Memory Error (os_linux.cpp:2638), pid=16431, tid=0x00007f61fae76700 
# 
# JRE version: (8.0_101-b13) (build) 
# Java VM: OpenJDK 64-Bit Server VM (25.101-b13 mixed mode linux-amd64 compressed oops) 
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again 
# 

--------------- T H R E A D --------------- 

Current thread (0x00007f61f4011800): JavaThread "Unknown thread" [_thread_in_vm, id=16467, stack(0x00007f61fad76000,0x00007f61fae77000)] 

--------------- P R O C E S S --------------- 

何が間違っている可能性がありますか?または、perl-CGIからJavaヒープメモリサイズを通知する方法は?

両方で使用されるJavaバージョンでも同じ(64ビット)です。

コマンドは、コマンドラインで実行するとうまく動作します。

答えて

1

これはselinuxの問題です。 Selinuxは、javaプロセスがメモリ割り当てコマンドを実行することを許可していません。ログを確認してください/etc/httpd/logs/ssl_error_log

に以下のファイル名を指定して実行

sudo semodule -i /usr/share/selinux/targeted/java.pp.bz2

sudo restorecon -r -v /usr

コマンド
関連する問題