当我尝试使用curl http://localhost:9200
它连接到弹性搜索
它工作正常.
但是,当我运行时,curl http://IpAddress:9200
它会抛出一个错误说curl http://localhost:9200
.
如何解决此错误?
我正在执行以下脚本:
gem install rdoc --no-document
gem install bundle
bundle
Run Code Online (Sandbox Code Playgroud)
输出:
+ gem install rdoc --no-document
Successfully installed rdoc-6.1.1
1 gem installed
+ gem install bundle
Successfully installed bundle-0.0.1
Parsing documentation for bundle-0.0.1
Done installing documentation for bundle after 2 seconds
1 gem installed
1 gem installed
+ bundle install
/usr/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
from /usr/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
from /srv/myuser/.gem/ruby/2.5.0/bin/bundle:23:in `<main>'
Run Code Online (Sandbox Code Playgroud)
我添加/srv/myuser/.gem/ruby/2.5.0/bin
到我的路径,所以我能够安装宝石.
该gem env
节目
RubyGems Environment:
- RUBYGEMS VERSION: 2.7.7 …
Run Code Online (Sandbox Code Playgroud) 我遇到了一个问题,我一直试图修复几天,我不知道该做什么,一直在寻找答案,但我找到的所有这些都没有帮助我.
我在这里有点新意,我真的希望有人可以帮助我.您可以告诉我需要提供哪些信息以期找到解决方案.
$ systemctl status nginx.service
nginx.service - Startup script for nginx service
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2016-03-08 13:23:35 GMT; 2min 20s ago
Mar 08 13:23:33 startdedicated.com nginx[8315]: nginx: [emerg] bind() to ------------ f...e)
Mar 08 13:23:33 startdedicated.com nginx[8315]: nginx: [emerg] bind() to ----- f...e)
Mar 08 13:23:34 startdedicated.com nginx[8315]: nginx: [emerg] bind() to ----- f...e)
Mar 08 13:23:34 startdedicated.com nginx[8315]: nginx: [emerg] bind() to ----- f...e)
Mar 08 13:23:35 startdedicated.com …
Run Code Online (Sandbox Code Playgroud) 我正在使用 Ruby on Rails 应用程序尝试 GitHub Actions for CI。
我的设置是使用 VM,而不是在容器中运行 Ruby 构建。
这是我的工作流程 yml。它一直运行而没有错误,直到步骤“设置数据库”。
name: Rails CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:10.10
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: db_test
ports:
- 5432/tcp
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:latest
ports:
- 6379/tcp
steps:
- uses: actions/checkout@v1
- name: Set up ruby 2.5
uses: actions/setup-ruby@v1
with:
ruby-version: 2.5.5
- name: Set up node …
Run Code Online (Sandbox Code Playgroud) 我的用户密码与database.yml中指定的密码相匹配
postgres=# select * from pg_user
;
usename | usesysid | usecreatedb | usesuper | usecatupd | userepl | passwd | valuntil | useconfig
------------+----------+-------------+----------+-----------+---------+----------+----------+-----------
goodsounds | 16386 | t | t | t | t | ******** | |
postgres | 10 | t | t | t | t | ******** | |
(2 rows)
Run Code Online (Sandbox Code Playgroud)
这是错误
rails db:create
Run Code Online (Sandbox Code Playgroud)
这是我的pg_hba.conf:
# Database administrative login by Unix domain socket
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Manjaro 中使用 docker(我的内核版本是 4.19)但它不起作用。
运行后,sudo pamac install docker
我运行sudo systemctl start docker.service
并收到此消息:
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
Run Code Online (Sandbox Code Playgroud)
所以sudo systemctl status docker.service
返回:
? docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2019-04-29 12:28:44 -03; 39s ago
Docs: https://docs.docker.com
Process: 17769 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
Main PID: 17769 …
Run Code Online (Sandbox Code Playgroud) 我目前正在尝试为一个项目设置Elasticsearch。我已经安装Elasticsearch 7.4.1
并且还安装了Java,即openjdk 11.0.4
.
但是当我尝试使用命令启动Elasticsearch 时
sudo systemctl start elasticsearch
Run Code Online (Sandbox Code Playgroud)
我收到以下错误
elasticsearch.service 的作业失败,因为控制进程退出并显示错误代码。
有关详细信息,请参阅“systemctl status elasticsearch.service”和“journalctl -xe”。
当我尝试运行命令时
systemctl status elasticsearch.service
Run Code Online (Sandbox Code Playgroud)
我收到错误消息
? elasticsearch.service - 弹性搜索
已加载:已加载(/usr/lib/systemd/system/elasticsearch.service; 已禁用; 出售
活动:自 UTC 时间周五 2019-11-01 06:09:54 起失败(结果:退出代码);12 秒前
Run Code Online (Sandbox Code Playgroud)Docs: http://www.elastic.co
进程:5960 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DI
主PID:5960(代码=退出,状态=1/FAILURE)
我已经从我的机器上删除/清除了Elasticsearch并重新安装了几次,但它似乎没有解决问题。
我试图修改默认network.host
,并host.port
设置在/etc/default/elasticsearch
以network.host: 0.0.0.0
和http.port: 9200
解决这个问题,但还没有运气。
我需要一些帮助。提前致谢。
我刚刚安装了 PostgreSQL,我正在尝试安装 pgdmin4,但是每当我运行下面的命令来安装 pgadmin4 和 pgadmin4-apache2
sudo apt install pgadmin4 pgadmin4-apache2
Run Code Online (Sandbox Code Playgroud)
我经常收到错误
E: 包 'pgadmin4' 没有安装候选
E: 无法定位包 pgadmin4-apache2
我尝试了很多解决方案,但似乎没有一个能解决问题。我需要帮助。
我尝试更改默认捆绑版本,但它已更新为 2 个默认版本。如何修改为单一默认值?
$ gem list bundler
*** LOCAL GEMS ***
bundler (2.0.1, default: 1.16.6, default: 1.16.2)
Run Code Online (Sandbox Code Playgroud)
如果我执行 gem uninstall 不删除默认值,
$ gem uninstall bundler
Successfully uninstalled bundler-2.0.1
$ gem list bundle
*** LOCAL GEMS ***
bundler (default: 1.16.6, default: 1.16.2)
Run Code Online (Sandbox Code Playgroud)
如何将(如下所示)默认设置为单一版本?
bundler (2.0.1, default: 1.16.6)
Run Code Online (Sandbox Code Playgroud) 我正在使用heroku,每当我尝试推送我的应用程序时,此消息显示出来:
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote:
remote: !
remote: ! You must use Bundler 2 or greater with this lockfile.
remote: !
remote: /tmp/d20181109-104-g861yi/bundler-1.15.2/gems/bundler-1.15.2/lib/bundler/lockfile_parser.rb:108:in `warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)
remote: from /tmp/d20181109-104-g861yi/bundler-1.15.2/gems/bundler-1.15.2/lib/bundler/lockfile_parser.rb:95:in `initialize'
remote: from /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/lib/language_pack/helpers/bundler_wrapper.rb:130:in `new'
remote: from /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/lib/language_pack/helpers/bundler_wrapper.rb:130:in `block in parse_gemfile_lock'
remote: from /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote: from /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote: from /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/lib/language_pack/instrument.rb:17:in `block in instrument'
remote: from …
Run Code Online (Sandbox Code Playgroud)