lftp does not list files but allows download - sftp
I am writing a script to move files to and from an sftp server using lftp (version 3.7.3 running on an old FreeBSD server).
The problem is that lftp does not list existing files by executing ls and cls. It only lists directories.
I have tried mget * to fetch all files but that failed as well.
On the contrary cat and mget work perfectly if the filename is specified.
Clearing and then turning off the lftp cache did not make a difference.
I 've read this link but it not my case. If I do "ls temp.txt" I get nothing instead of an error as in the link, although the file exists.
I can list the files using WinSCP and AnyFTP (an android app), so I guess it does not have anything to do with permissions.
Any ideas?
I managed to get this by adding a file named rc in ~/.lftp/ containing the word debug:
lftp myUserName#remoteHostIP:~> ls
---- Running connect program (ssh -a -x -s -l myUserName remoteHostIP sftp)
---> sending a packet, length=5, type=1(INIT), id=0
<--- myUserName#remoteHostIP's password: XXXX
<--- got a packet, length=5, type=2(VERSION), id=0
---- protocol version set to 3
---> sending a packet, length=10, type=16(REALPATH), id=1
<--- got a packet, length=47, type=104(NAME), id=1
---- home set to /myUserName/
---- path on wire is `/myUserName/'
---> sending a packet, length=22, type=11(OPENDIR), id=2
<--- got a packet, length=22, type=102(HANDLE), id=2
---- got file handle 4F70656E44697248616E646C65 (13)
---> sending a packet, length=22, type=12(READDIR), id=3
<--- got a packet, length=1238, type=104(NAME), id=3
---- file name count=11
---> sending a packet, length=22, type=12(READDIR), id=4
---> sending a packet, length=22, type=12(READDIR), id=5
<--- got a packet, length=28, type=101(STATUS), id=4
---- status code=1(EOF), message=End of file
---- eof
drw-rw-rw 1 root root 0 Nov 6 20:03 test
drw-rw-rw 1 root root 0 Nov 6 12:52 test1
---> sending a packet, length=22, type=4(CLOSE), id=6
<--- got a packet, length=28, type=101(STATUS), id=5
---- status code=1(EOF), message=End of file
<--- got a packet, length=24, type=101(STATUS), id=6
---- status code=0(OK), message=Success
lftp myUserName#remoteHostIP:~>
I also managed to list the files using java.
This is the WinSCP log file:
. 2017-11-07 18:08:30.735 --------------------------------------------------------------------------
. 2017-11-07 18:08:30.735 WinSCP Version 5.5.6 (Build 4746) (OS 6.1.7601 Service Pack 1 - Windows 7 Professional)
. 2017-11-07 18:08:30.735 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2017-11-07 18:08:30.735 Local account: mydomain\myWinUserName
. 2017-11-07 18:08:30.735 Working directory: C:\Program Files (x86)\WinSCP
. 2017-11-07 18:08:30.735 Process ID: 3116
. 2017-11-07 18:08:30.735 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe"
. 2017-11-07 18:08:30.736 Time zone: Current: GMT+2, Standard: GMT+2 (GTB Standard Time), DST: GMT+3 (GTB Daylight Time), DST Start: 26/3/2017, DST End: 29/10/2017
. 2017-11-07 18:08:30.736 Login time: Τρίτη, 7 Νοέμβριος 2017 6:08:30 μμ
. 2017-11-07 18:08:30.736 --------------------------------------------------------------------------
. 2017-11-07 18:08:30.736 Session name: myUserName#remoteHostIP (Site)
. 2017-11-07 18:08:30.736 Host name: remoteHostIP (Port: 22)
. 2017-11-07 18:08:30.736 User name: myUserName (Password: Yes, Key file: No)
. 2017-11-07 18:08:30.736 Tunnel: No
. 2017-11-07 18:08:30.736 Transfer Protocol: SFTP
. 2017-11-07 18:08:30.736 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2017-11-07 18:08:30.736 Proxy: none
. 2017-11-07 18:08:30.736 Send buffer: 262144
. 2017-11-07 18:08:30.736 SSH protocol version: 2; Compression: No
. 2017-11-07 18:08:30.736 Bypass authentication: No
. 2017-11-07 18:08:30.736 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2017-11-07 18:08:30.736 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2017-11-07 18:08:30.736 SSH Bugs: A,A,A,A,A,A,A,A,A,A
. 2017-11-07 18:08:30.736 Simple channel: Yes
. 2017-11-07 18:08:30.736 Return code variable: Autodetect; Lookup user groups: A
. 2017-11-07 18:08:30.736 Shell: default
. 2017-11-07 18:08:30.736 EOL: 0, UTF: 2
. 2017-11-07 18:08:30.736 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2017-11-07 18:08:30.736 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2017-11-07 18:08:30.736 Local directory: C:\Users\myComputerName.mydomain\Documents, Remote directory: /myUserName, Update: Yes, Cache: No
. 2017-11-07 18:08:30.736 Cache directory changes: No, Permanent: Yes
. 2017-11-07 18:08:30.736 DST mode: 1; Timezone offset: 0h 0m
. 2017-11-07 18:08:30.736 --------------------------------------------------------------------------
. 2017-11-07 18:08:30.846 Looking up host "remoteHostIP"
. 2017-11-07 18:08:30.846 Connecting to remoteHostIP port 22
. 2017-11-07 18:08:30.899 Server version: SSH-2.0-CoreFTP-0.3.3
. 2017-11-07 18:08:30.899 Using SSH protocol version 2
. 2017-11-07 18:08:30.899 We claim version: SSH-2.0-WinSCP_release_5.5.6
. 2017-11-07 18:08:30.911 Doing Diffie-Hellman group exchange
. 2017-11-07 18:08:31.159 Doing Diffie-Hellman key exchange with hash SHA-256
. 2017-11-07 18:08:32.181 Verifying host key rsa2 0x10001,0xcc1f532a43799760 7ff06787b19253a9 14e9acf3b711f594 1bd693efd365e88c 51281a973ecfd0c2 cfd758a92844a16e 704a0caa9fada7a0 235a4f2f00155466 a4fa7c6eabb16adc 89db04638e6904cf 8b50592da6072836 23c0517af0ccd732 d6d59d5f7665ab55 c20c428e702b94c9 18e9289271cdfe98 7972a59dd9ea48b9 79ccf8b13bbcc567 cac1952274a9d4db 689de1d09862f3a1 e88fb7576bd280c9 f50e4d6e72ec0e99 2fea70d254c87be5 b5505b5aa8ae90a9 71552671a65e32b7 a91d27b7eeac5922 6eb057c5a02bd8c7 4e54d87de9c13b55 d49291a3b8424e15 5eb8d90d4908f48e ba2ad7cf99af5d61 0b9530a426e70098 ac7454b39f66f07f with fingerprint ssh-rsa 2048 76:a0:49:c8:6f:54:9a:8b:82:3b:19:d0:2a:c3:c7:e3
. 2017-11-07 18:08:32.206 Host key matches cached key
. 2017-11-07 18:08:32.206 Host key fingerprint is:
. 2017-11-07 18:08:32.206 ssh-rsa 2048 76:a0:49:c8:6f:54:9a:8b:82:3b:19:d0:2a:c3:c7:e3
. 2017-11-07 18:08:32.206 Initialised AES-256 SDCTR client->server encryption
. 2017-11-07 18:08:32.206 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2017-11-07 18:08:32.214 Initialised AES-256 SDCTR server->client encryption
. 2017-11-07 18:08:32.214 Initialised HMAC-SHA-256 server->client MAC algorithm
! 2017-11-07 18:08:32.222 Using username "myUserName".
. 2017-11-07 18:08:32.269 Prompt (7, SSH password, , &Password: )
. 2017-11-07 18:08:32.269 Using stored password.
. 2017-11-07 18:08:32.316 Sent password
. 2017-11-07 18:08:32.327 Access granted
. 2017-11-07 18:08:32.327 Opening session as main channel
. 2017-11-07 18:08:32.336 Opened main channel
. 2017-11-07 18:08:32.557 Started a shell/command
. 2017-11-07 18:08:32.569 --------------------------------------------------------------------------
. 2017-11-07 18:08:32.569 Using SFTP protocol.
. 2017-11-07 18:08:32.569 Doing startup conversation with host.
> 2017-11-07 18:08:32.621 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2017-11-07 18:08:32.834 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2017-11-07 18:08:32.834 SFTP version 3 negotiated.
. 2017-11-07 18:08:32.834 We believe the server has signed timestamps bug
. 2017-11-07 18:08:32.834 We will use UTF-8 strings when appropriate
. 2017-11-07 18:08:32.873 Changing directory to "/myUserName".
. 2017-11-07 18:08:32.873 Getting real path for '/myUserName'
> 2017-11-07 18:08:32.873 Type: SSH_FXP_REALPATH, Size: 21, Number: 16
< 2017-11-07 18:08:32.882 Type: SSH_FXP_NAME, Size: 47, Number: 16
. 2017-11-07 18:08:32.882 Real path is '/myUserName'
. 2017-11-07 18:08:32.882 Trying to open directory "/myUserName".
> 2017-11-07 18:08:32.882 Type: SSH_FXP_LSTAT, Size: 21, Number: 263
< 2017-11-07 18:08:32.892 Type: SSH_FXP_ATTRS, Size: 37, Number: 263
. 2017-11-07 18:08:32.892 Getting current directory name.
. 2017-11-07 18:08:33.023 Listing directory "/myUserName".
> 2017-11-07 18:08:33.023 Type: SSH_FXP_OPENDIR, Size: 21, Number: 523
< 2017-11-07 18:08:33.032 Type: SSH_FXP_HANDLE, Size: 22, Number: 523
> 2017-11-07 18:08:33.032 Type: SSH_FXP_READDIR, Size: 22, Number: 780
< 2017-11-07 18:08:33.053 Type: SSH_FXP_NAME, Size: 1238, Number: 780
> 2017-11-07 18:08:33.053 Type: SSH_FXP_READDIR, Size: 22, Number: 1036
< 2017-11-07 18:08:33.073 Type: SSH_FXP_STATUS, Size: 28, Number: 1036
< 2017-11-07 18:08:33.073 Status code: 1
> 2017-11-07 18:08:33.073 Type: SSH_FXP_CLOSE, Size: 22, Number: 1284
. 2017-11-07 18:08:33.073 temp.txt;-;4;2017-11-06T10:58:10.000Z;"" [0];"" [0];rw-rw-rw-;1
. 2017-11-07 18:08:33.073 temp2222.txt;-;5;2017-11-06T18:09:34.000Z;"" [0];"" [0];rw-rw-rw-;1
. 2017-11-07 18:08:33.073 test;D;0;2017-11-06T18:03:00.000Z;"" [0];"" [0];rw-rw-rw-;1
. 2017-11-07 18:08:33.074 test1;D;0;2017-11-06T10:52:43.000Z;"" [0];"" [0];rw-rw-rw-;1
. 2017-11-07 18:08:33.074 test2.txt;-;8;2017-11-06T18:02:41.000Z;"" [0];"" [0];rw-rw-rw-;1
. 2017-11-07 18:08:33.074 test3.txt;-;8;2017-11-06T18:02:41.000Z;"" [0];"" [0];rw-rw-rw-;1
. 2017-11-07 18:08:33.074 test4.txt;-;8;2017-11-06T18:02:41.000Z;"" [0];"" [0];rw-rw-rw-;1
. 2017-11-07 18:08:33.074 test5.txt;-;8;2017-11-06T18:02:41.000Z;"" [0];"" [0];rw-rw-rw-;1
. 2017-11-07 18:08:33.074 test6.txt;-;8;2017-11-06T18:02:41.000Z;"" [0];"" [0];rw-rw-rw-;1
. 2017-11-07 18:08:33.074 test7.txt;-;8;2017-11-06T18:02:41.000Z;"" [0];"" [0];rw-rw-rw-;1
. 2017-11-07 18:08:33.074 test8.txt;-;8;2017-11-06T18:02:41.000Z;"" [0];"" [0];rw-rw-rw-;1
. 2017-11-07 18:08:33.173 Startup conversation with host finished.
. 2017-11-07 18:08:34.064 Not refreshing directory, caching is off.
Related
artifactory docker push error unknown: Method Not Allowed
we are using artifactory pro license and installed artifactory through helm on kubernetes. when we create a docker local repo(The Repository Path Method) and push docker image, we get 405 method not allowed errror. (docker login/ pull is working normally.) ########## error msg # docker push art2.bee0dev.lge.com/docker-local/hello-world e07ee1baac5f: Pushing [==================================================>] 14.85kB unknown: Method Not Allowed ########## we are using haproxy load balancer that is used for TLS, in front of Nginx Ingress Controller. (nginx ingress controller's http nodeport is 31071) please help us how can we solve the problem. The artifactory and haproxy settings are as follows. ########## value.yaml global: joinKeySecretName: "artbee-stg-joinkey-secret" masterKeySecretName: "artbee-stg-masterkey-secret" storageClass: "sa-stg-netapp8300-bee-blk-nonretain" ingress: enabled: true defaultBackend: enabled: false hosts: ["art2.bee0dev.lge.com"] routerPath: / artifactoryPath: /artifactory/ className: "" annotations: kubernetes.io/ingress.class: "nginx" nginx.ingress.kubernetes.io/proxy-body-size: "0" nginx.ingress.kubernetes.io/proxy-read-timeout: "600" nginx.ingress.kubernetes.io/proxy-send-timeout: "600" nginx.ingress.kubernetes.io/configuration-snippet: | proxy_pass_header Server; proxy_set_header X-JFrog-Override-Base-Url https://art2.bee0dev.lge.com; labels: {} tls: [] additionalRules: [] ## Artifactory license. artifactory: name: artifactory replicaCount: 1 image: registry: releases-docker.jfrog.io repository: jfrog/artifactory-pro # tag: pullPolicy: IfNotPresent labels: {} updateStrategy: type: RollingUpdate migration: enabled: false customInitContainersBegin: | - name: "init-mount-permission-setup" image: "{{ .Values.initContainerImage }}" imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}" securityContext: runAsUser: 0 runAsGroup: 0 allowPrivilegeEscalation: false capabilities: drop: - NET_RAW command: - 'bash' - '-c' - if [ $(ls -la /var/opt/jfrog | grep artifactory | awk -F' ' '{print $3$4}') == 'rootroot' ]; then echo "mount permission=> root:root"; echo "change mount permission to 1030:1030 " {{ .Values.artifactory.persistence.mountPath }}; chown -R 1030:1030 {{ .Values.artifactory.persistence.mountPath }}; else echo "already set. No change required."; ls -la {{ .Values.artifactory.persistence.mountPath }}; fi volumeMounts: - mountPath: "{{ .Values.artifactory.persistence.mountPath }}" name: artifactory-volume database: maxOpenConnections: 80 tomcat: maintenanceConnector: port: 8091 connector: maxThreads: 200 sendReasonPhrase: false extraConfig: 'acceptCount="100"' customPersistentVolumeClaim: {} license: ## licenseKey is the license key in plain text. Use either this or the license.secret setting licenseKey: "???" secret: dataKey: resources: requests: memory: "2Gi" cpu: "1" limits: memory: "20Gi" cpu: "8" javaOpts: xms: "1g" xmx: "12g" admin: ip: "127.0.0.1" username: "admin" password: "!swiit123" secret: dataKey: service: name: artifactory type: ClusterIP loadBalancerSourceRanges: [] annotations: {} persistence: mountPath: "/var/opt/jfrog/artifactory" enabled: true accessMode: ReadWriteOnce size: 100Gi type: file-system storageClassName: "sa-stg-netapp8300-bee-blk-nonretain" nginx: enabled: false ########## ########## haproxy config frontend cto-stage-http-frontend bind 10.185.60.75:80 bind 10.185.60.76:80 bind 10.185.60.201:80 bind 10.185.60.75:443 ssl crt /etc/haproxy/ssl/bee0dev.lge.com.pem ssl-min-ver TLSv1.2 ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 bind 10.185.60.76:443 ssl crt /etc/haproxy/ssl/bee0dev.lge.com.pem ssl-min-ver TLSv1.2 ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 bind 10.185.60.201:443 ssl crt /etc/haproxy/ssl/bee0dev.lge.com.pem ssl-min-ver TLSv1.2 ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 mode http option forwardfor option accept-invalid-http-request acl k8s-cto-stage hdr_end(host) -i -f /etc/haproxy/web-ide/cto-stage use_backend k8s-cto-stage-http if k8s-cto-stage backend k8s-cto-stage-http mode http redirect scheme https if !{ ssl_fc } option tcp-check balance roundrobin server lgestgbee04v 10.185.60.78:31071 check fall 3 rise 2 ##########
The request doesn't seem to be landing at the correct endpoint. Please remove the semi-colon from the docker command and retry again. docker push art2.bee0dev.lge.com;/docker-local/hello-world Try executing it like below, docker push art2.bee0dev.lge.com/docker-local/hello-world
fluent-bit to Loki - "log" field is not being parsed/filtered
I have: a simple Python app ("iss-web") writing JSON log output to stdout the Python app ("iss-web") is within a Docker Container the Python app ("iss-web") Container logging driver is set to "fluentd" a separate Container running "fluent/fluent-bit:1.7" to collect the Python app JSON log output Loki 2.2.1 deployed via a Container to receive the Python app log output from fluent-bit Grafana connected to Loki to visualize the log data The issue is that the "log" field is not filtered/parsed by fluent-bit, therefore in Loki/Grafana the content of the "log" field is not parsed and used as "Detected fields". "iss-web" docker-compose.yml version: '3' services: iss-web: build: ./iss-web image: iss-web container_name: iss-web env_file: - ./iss-web/app.env ports: - 46664:46664 logging: driver: fluentd options: tag: iss.web redis: image: redis container_name: redis ports: - 6379:6379 logging: driver: "json-file" options: max-file: ${LOG_EXPIRE} max-size: ${LOG_SEGMENT} "fluent-bit" docker-compose.yml version: '3' services: fluent-bit: image: fluent/fluent-bit:1.7 container_name: fluent-bit environment: - LOKI_URL=http://135.86.186.75:3100/loki/api/v1/push user: root volumes: - ./fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf - ./parsers.conf:/fluent-bit/etc/parsers.conf ports: - "24224:24224" - "24224:24224/udp" fluent-bit.conf [SERVICE] Flush 1 Daemon Off log_level debug Parsers_File /fluent-bit/etc/parsers.conf [INPUT] Name forward Listen 0.0.0.0 port 24224 [FILTER] Name parser Match iss.web Key_Name log Parser docker Reserve_Data On Preserve_Key On [OUTPUT] Name loki Match * host 135.86.186.75 port 3100 labels job=fluentbit [OUTPUT] Name stdout Match * parsers.conf I've tried with/without Time_Key, Time_Format, Time_Keep [PARSER] Name docker Format json #Time_Key time #Time_Format %Y-%m-%dT%H:%M:%S.%L #Time_Keep On # Command | Decoder | Field | Optional Action # =============|==================|================= #Decode_Field_As escaped_utf8 log do_next Decode_Field_As json log fluent-bit log extract [0] iss.web: [1620640820.000000000, {"log"=>"{'timestamp': '2021:05:10 11:00:20.439513', 'epoch': 1620640820.4395688, 'pid': 1, 'level': 'DEBUG', 'message': '/ping', 'data': {'message': 'PONG', 'timestamp': '1620640820.4394963', 'version': '0.1'}}", "container_id"=>"bffd720e9ac1e8c3992c1120eed37e00c536cd44ec99e9c13cf690d840363f80", "container_name"=>"/iss-web", "source"=>"stdout"}] Grafana/Loki screen I would expect the "Detected fields" to contain pid=1, message=/ping etc
I needed a "json.dumps" in my "logger": def log(message, level="INFO", **extra): out = {"timestamp": get_now(), "epoch": get_epoch(), "pid": get_pid(), "level": level, "message": message} if extra: out |= extra print(json.dumps(out), flush=True) return True
Is there a spring data redis mapping the Redisson framework
As the title says, was there a spring data redis mapping to the Redisson framework (http://redisson.org)
Short answer There is Spring Data Redis integration Long answer Consider Spring Data Redis integration as another type of connector or binding (check here for the connector term). The library provides RedissonConnectionFactory (implements RedisConnectionFactory) which would be the base for working with e.g. #RedisHash and spring cache abstraction (#EnableCaching). There's also a redisson-spring-boot-starter but make sure not to have lettuce or jedis in classpath because org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration (provided by spring-boot-autoconfigure) might create a RedisConnectionFactory before org.redisson.spring.starter.RedissonAutoConfiguration (provided by redisson-spring-boot-starter)!
Add redisson-spring-boot-starter dependency into your project: compile 'org.redisson:redisson-spring-boot-starter:3.13.5' Add settings into application.settings file common spring boot props: spring: redis: database: host: port: password: ssl: timeout: cluster: nodes: sentinel: master: nodes: redisson: file: classpath:redisson.yaml config: | clusterServersConfig: idleConnectionTimeout: 10000 connectTimeout: 10000 timeout: 3000 retryAttempts: 3 retryInterval: 1500 failedSlaveReconnectionInterval: 3000 failedSlaveCheckInterval: 60000 password: null subscriptionsPerConnection: 5 clientName: null loadBalancer: !<org.redisson.connection.balancer.RoundRobinLoadBalancer> {} subscriptionConnectionMinimumIdleSize: 1 subscriptionConnectionPoolSize: 50 slaveConnectionMinimumIdleSize: 24 slaveConnectionPoolSize: 64 masterConnectionMinimumIdleSize: 24 masterConnectionPoolSize: 64 readMode: "SLAVE" subscriptionMode: "SLAVE" nodeAddresses: - "redis://127.0.0.1:7004" - "redis://127.0.0.1:7001" - "redis://127.0.0.1:7000" scanInterval: 1000 pingConnectionInterval: 0 keepAlive: false tcpNoDelay: false threads: 16 nettyThreads: 32 codec: !<org.redisson.codec.FstCodec> {} transportMode: "NIO" 3.Use Redisson through spring bean with RedissonClient interface or RedisTemplate/ReactiveRedisTemplate objects
AMQP server on localhost:5672 is unreachable: [Errno 111] ECONNREFUSED
i am trying to add additional compute node on different virtual machine to the pre-installed openstack. I disabled the firewall services,enable to ping other virtual machine.. but still compute node is not able to register with Rabbitmq service running on controller node.. Here it is my nova.conf file... [DEFAULT] dhcpbridge_flagfile=/etc/nova/nova.conf dhcpbridge=/usr/bin/nova-dhcpbridge state_path=/var/lib/nova lock_path=/var/lock/nova force_dhcp_release=True iscsi_helper=tgtadm libvirt_use_virtio_for_bridges=True connection_type=libvirt root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf verbose=True ec2_private_dns_show_ip=True api_paste_config=/etc/nova/api-paste.ini volumes_path=/var/lib/nova/volumes enabled_apis=ec2,osapi_compute,metadata rpc_backend = rabbit auth_strategy = keystone use_neutron = True firewall_driver = nova.virt.firewall.NoopFirewallDriver my_ip = #compute node ip rabbit_host= #controller_node_ip rabbit_port = 5672 rabbit_userid = stackrabbit rabbit_password = devstack rabbit_use_ssl = False rabbit_virtual_host=/ [keystone_authtoken] auth_uri = http://controller_node_ip:5000 auth_url = http://controller_node_ip:35357 memcached_servers = controller_node_ip:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = nova password = devstack auth_host = controller_node_ip auth_port = 35357 auth_protocol = http [vnc] enabled = True vncserver_listen = 0.0.0.0 vncserver_proxyclient_address = $my_ip novncproxy_base_url = http://controller_node_ip:6080/vnc_auto.html [glance] api_servers = http://controller_node_ip:9292 [oslo_concurrency] lock_path = /var/lib/nova/tmp Here it is my nova-compute.log: 2016-09-20 19:08:57.701 7201 INFO oslo.messaging._drivers.impl_rabbit [-] Reconnecting to AMQP server on localhost:5672 2016-09-20 19:08:57.701 7201 INFO oslo.messaging._drivers.impl_rabbit [-] Delaying reconnect for 1.0 seconds... 2016-09-20 19:08:58.708 7201 ERROR oslo.messaging._drivers.impl_rabbit [-] AMQP server on localhost:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 30 seconds... Please suggest me something so that i can resolve this issue... Thank you in advance...
I encountered this when expanding my nova-compute estate (although I'm not using Devstack). In my newly created compute server, the following was seen in /var/log/nova/nova-compute.log : - 2017-11-14 11:40:53.287 52408 ERROR oslo.messaging._drivers.impl_rabbit [req-adfd6dc7-fe8c-4de5-8401-58d325c3b4a8 - - - - -] [be6e0302-dfc8-4512-8b48-0d824fc6ea14] AMQP server on 127.0.0.1:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 1 seconds. Client port: None The solution was quite simple. I checked /var/log/sysinfo (I run ubuntu; /var/log/messages for those on Redhat systems) and could see the following lines:- Nov 14 12:01:48 compute2 systemd[1]: Started OpenStack Compute. Nov 14 12:01:49 compute2 nova-compute[3222]: Traceback (most recent call last): Nov 14 12:01:49 compute2 nova-compute[3222]: File "/usr/bin/nova-compute", line 10, in <module> Nov 14 12:01:49 compute2 nova-compute[3222]: sys.exit(main()) Nov 14 12:01:49 compute2 nova-compute[3222]: File "/usr/lib/python2.7/dist-packages/nova/cmd/compute.py", line 42, in main Nov 14 12:01:49 compute2 nova-compute[3222]: config.parse_args(sys.argv) Nov 14 12:01:49 compute2 nova-compute[3222]: File "/usr/lib/python2.7/dist-packages/nova/config.py", line 52, in parse_args Nov 14 12:01:49 compute2 nova-compute[3222]: default_config_files=default_config_files) Nov 14 12:01:49 compute2 nova-compute[3222]: File "/usr/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2355, in __call__ Nov 14 12:01:49 compute2 nova-compute[3222]: self._namespace._files_permission_denied) Nov 14 12:01:49 compute2 nova-compute[3222]: oslo_config.cfg.ConfigFilesPermissionDeniedError: Failed to open some config files: /etc/nova/nova.conf Nov 14 12:01:49 compute2 systemd[1]: nova-compute.service: Main process exited, code=exited, status=1/FAILURE Which shows that my /etc/nova/nova.conf file was unreadable. It turns out this was because I used scp to copy the nova.conf from my first compute to my new machine, and the file was read-only to the root user. The solution was to (on my new compute) cd /etc/nova/ chown nova:nova nova.conf service nova-compute restart
PEM_read_bio_X509 failed when load pem or crt file
i compile install nginx 1.4.4 and openssl 1.0.1h,after install i generate .pem and .key file and put them under conf directory,when i want to start it shows something was wrong. nginx$ sbin/nginx nginx: [emerg] PEM_read_bio_X509("/home/work/nginx/conf/33iq.crt") failed (SSL:) it only can see PEM_read_bio_X509 failed but no ssl error info,how to find out what is wrong with it? openssl x509 -in /home/work/nginx/conf/33iq.crt -inform PEM -text -noout Certificate: Data: Version: 1 (0x0) Serial Number: 9271295828916739212 (0x80aa426f5a249c8c) Signature Algorithm: sha1WithRSAEncryption Issuer: C=UN, ST=CD, L=sodaf, O=ser, OU=fas, CN=ea/emailAddress=abc#baidu.com Validity Not Before: Jul 14 10:12:12 2014 GMT Not After : Jul 14 10:12:12 2015 GMT Subject: C=UN, ST=CD, L=sodaf, O=ser, OU=fas, CN=ea/emailAddress=abc#163.com Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (1024 bit) Modulus: ... eb:ce:5a:36:ae:ca:e8:26:2d Exponent: 65537 (0x10001) Signature Algorithm: sha1WithRSAEncryption ... 76:68