MARKLOGIC启动测试连接到http:// localhost:8002被拒绝

时间:2016-04-14 17:21:23

标签: marklogic

使用MarkLogic java-api-client时,我执行boot-test.sh

sh src/test/resources/boot-test.sh 

我得到了

  

线程中的异常" main"   org.apache.http.conn.HttpHostConnectException:连接到   http://localhost:8002拒绝了

这只是一个身份验证问题吗?

我已经更改了

中的密码
java-client-api/src/main/resources/Example.properties

以及我认为是有问题的密码

java-client-api/src/test/java/com/marklogic/client/test/util/TestServerBootstrapper.java

虽然我仍然拒绝连接。我确认服务器的管理端口设置为8002。

同样具有相同的一般问题,无法通过在服务器上运行curl连接到MarkLogic

curl --anyauth --user admin:xxxx -X PUT -d @' ./ one.xml' -H"内容类型:application / xml" ' http://localhost:8000/LATEST/documents?uri=/xml/one.xml'

卷曲:(7)无法连接到主机

我可以通过8001界面访问服务器,所以我认为它有一些配置错误,但我们无法弄明白。我基本上在三个数字海洋中心6服务器上安装了MarkLogic,更改了管理员密码,建立了三个连接节点的集群,并在每个节点上创建了一个数据库和三个森林。否则我相信一切都是默认的。

我在centos 6服务器上安装了以下内容

yum -y install glibc.i686 gdb.x86_64 redhat-lsb.x86_64
rpm -i /tmp/MarkLogic-RHEL6-8.0-5.x86_64.rpm
yum install java-1.7.0-openjdk-devel
yum install -y git
yum install -y httpd
service httpd start
yum install -y nano
yum install -y tree
yum install -y wget
wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
yum install apache-maven
yum update

关于我做错的任何想法?

此致 康特

1 个答案:

答案 0 :(得分:1)

以下版本是https://github.com/jmakeig/marklogic-bootstrapping/blob/master/digitalocean/bootstrap.sh的更新版本。到目前为止,安装工作正常。

正确执行引导代码

java-client-api] #sh src / test / resources / boot-test.sh 在8012端口上为java-unittest数据库创建了java-unittest服务器 Bootstrapped rest服务器,用于端口8012上的单元测试 已安装的bootstrap扩展。响应是HTTP / 1.1 204创建[服务器:MarkLogic,内容长度:0,连接:保持活动,保持活动:超时= 5] 调用bootstrap扩展。响应是HTTP / 1.1 200 OK [服务器:MarkLogic,Content-Type:application / xml; charset = UTF-8,Content-Length:468,Connection:Keep-Alive,Keep-Alive:timeout = 5]

非常感谢所有帮助

#!/bin/bash

# MarkLogic 8.0-5 Digital Ocean Centos 6.7 64bit

# log everything to a file
exec &> $HOME/stackscript.log

# yum -y: assume yes, -q: quiet
yum -yq update
yum -yq install nano tree wget gcc gcc-c++ make zlib-devel pcre-devel openssl-devel java-1.7.0-openjdk-devel
wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
yum -yq install apache-maven

yum -yq groupinstall 'Development Tools'
yum -yq install glibc glibc.i686 lsb

curl -o MarkLogic-RHEL6-8.0-5.x86_64.rpm "https://developer.marklogic.com/download/binaries/8.0/MarkLogic-RHEL6-8.0-5.x86_64.rpm?t=5bfgbebCkZ/1KkgggvKp30&email=xxx%40gmail.com"
rpm -iv MarkLogic-RHEL6-8.0-5.x86_64.rpm
#rm MarkLogic-RHEL6-8.0-5.x86_64.rpm



# Set Linux huge pages
echo "vm.nr_hugepages = 292" >> /etc/sysctl.conf
sysctl -p

# Flush all curren

t rules from iptables
iptables -F

#First, we start with blocking null packets
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP

#The next pattern to reject is a syn-flood attack.
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP

#XMAS packets, also a recon packet.
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP

# Set access for localhost
iptables -A INPUT -i lo -j ACCEPT

#Now we can allow web server traffic:
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT

#Now, let's allow users use our SMTP servers:
iptables -A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 465 -j ACCEPT

# Allow SSH connections on tcp port 22
# This is essential when working on remote servers via SSH to prevent locking yourself out of the system
iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT

#allow us to use outgoing connections (ie. ping from VPS or run software updates);
iptables -I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT 

# We will block everything else, and allow all outgoing connections.
iptables -P OUTPUT ACCEPT
iptables -P INPUT DROP

# Note eth0 interface
iptables -A INPUT -p tcp -m tcp --dport 7999 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 8000 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 8001 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 8002 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 8010 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 8012 -j ACCEPT

service iptables save 

mkdir -p src && cd src
nginxVersion="1.8.1"
wget http://nginx.org/download/nginx-$nginxVersion.tar.gz
tar -xzf nginx-$nginxVersion.tar.gz 
ln -sf nginx-$nginxVersion nginx

cd nginx

./configure \
--user=nginx                          \
--group=nginx                         \
--prefix=/etc/nginx                   \
--sbin-path=/usr/sbin/nginx           \
--conf-path=/etc/nginx/nginx.conf     \
--pid-path=/var/run/nginx.pid         \
--lock-path=/var/run/nginx.lock       \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--with-http_gzip_static_module        \
--with-http_stub_status_module        \
--with-http_ssl_module                \
--with-pcre                           \
--with-file-aio                       \
--with-http_realip_module             \
--without-http_scgi_module            \
--without-http_uwsgi_module           \
--without-http_fastcgi_module

make
make install

useradd -r nginx

wget -O /etc/init.d/nginx "https://gist.github.com/sairam/5892520/raw/b8195a71e944d46271c8a49f2717f70bcd04bf1a/etc-init.d-nginx"
chmod +x /etc/init.d/nginx

chkconfig --add nginx
chkconfig --level 345 nginx on


#Manually Configure
#nano /etc/nginx/nginx.conf to set types_hash_bucket_size and server_names_hash_bucket_size which needs to be increased.

#http {
#    include       mime.types;
#    default_type  application/octet-stream;
    # add the below 2 lines under http around line 20
#    types_hash_bucket_size 64;
#    server_names_hash_bucket_size 128;

#service MarkLogic start
#service nginx start