Error resolving address

When I types the following as a stand-alone line: std::endl; I got the following error: statement cannot resolve address for overloaded function Why is that? Cannot I write std::endl; as a stand-

When I types the following as a stand-alone line:

std::endl;

I got the following error:

statement cannot resolve address for overloaded function

Why is that? Cannot I write std::endl; as a stand-alone line?

Thanks.

asked Jan 30, 2011 at 12:33

Simplicity's user avatar

SimplicitySimplicity

46.3k94 gold badges251 silver badges380 bronze badges

1

std::endl is a function template. Normally, it’s used as an argument to the insertion operator <<. In that case, the operator<< of the stream in question will be defined as e.g. ostream& operator<< ( ostream& (*f)( ostream& ) ). The type of the argument of f is defined, so the compiler will then know the exact overload of the function.

It’s comparable to this:

void f( int ){}
void f( double ) {}
void g( int ) {}
template<typename T> void ft(T){}

int main(){
  f; // ambiguous
  g; // unambiguous
  ft; // function template of unknown type...
}

But you can resolve the ambiguity by some type hints:

void takes_f_int( void (*f)(int) ){}

takes_f_int( f ); // will resolve to f(int) because of `takes_f_int` signature
(void (*)(int)) f; // selects the right f explicitly 
(void (*)(int)) ft; // selects the right ft explicitly 

That’s what happens normally with std::endl when supplied as an argument to operator <<: there is a definition of the function

 typedef (ostream& (*f)( ostream& ) ostream_function;
 ostream& operator<<( ostream&, ostream_function )

And this will enable the compiler the choose the right overload of std::endl when supplied to e.g. std::cout << std::endl;.

Nice question!

answered Jan 30, 2011 at 12:50

xtofl's user avatar

7

The most likely reason I can think of is that it’s declaration is:

ostream& endl ( ostream& os );

In other words, without being part of a << operation, there’s no os that can be inferred. I’m pretty certain this is the case since the line:

std::endl (std::cout);

compiles just fine.

My question to you is: why would you want to do this?

I know for a fact that 7; is a perfectly valid statement in C but you don’t see that kind of rubbish polluting my code :-)

answered Jan 30, 2011 at 12:38

paxdiablo's user avatar

paxdiablopaxdiablo

838k230 gold badges1561 silver badges1929 bronze badges

1

std::endl is a function template. If you use it in a context where the template argument cannot be uniquely determined you have to disambiguate which specialization you mean. For example you can use an explicit cast or assign it to a variable of the correct type.

e.g.

#include <ostream>

int main()
{
    // This statement has no effect:
    static_cast<std::ostream&(*)(std::ostream&)>( std::endl );

    std::ostream&(*fp)(std::ostream&) = std::endl;
}

Usually, you just use it in a context where the template argument is deduced automatically.

#include <iostream>
#include <ostream>
int main()
{
    std::cout << std::endl;
    std::endl( std::cout );
}

answered Jan 30, 2011 at 13:30

CB Bailey's user avatar

CB BaileyCB Bailey

733k101 gold badges626 silver badges651 bronze badges

std::endl is a manipulator. It’s actually a function that is called by the a version of the << operator on a stream.

std::cout << std::endl
// would call 
std::endl(std::cout).

Martin York's user avatar

Martin York

253k84 gold badges332 silver badges555 bronze badges

answered Jan 30, 2011 at 12:43

hbn's user avatar

hbnhbn

1,7762 gold badges11 silver badges12 bronze badges

http://www.cplusplus.com/reference/iostream/manipulators/endl/

You can’t have std::endl by itself because it requires a basic_ostream as a type of parameter. It’s the way it is defined.

It’s like trying to call my_func() when the function is defined as void my_func(int n)

answered Jan 30, 2011 at 12:41

Marlon's user avatar

MarlonMarlon

19.7k11 gold badges67 silver badges100 bronze badges

endl is a function that takes a parameter. See std::endl on cplusplus.com

// This works.
std::endl(std::cout);

Martin York's user avatar

Martin York

253k84 gold badges332 silver badges555 bronze badges

answered Jan 30, 2011 at 12:40

sinelaw's user avatar

sinelawsinelaw

16k3 gold badges49 silver badges79 bronze badges

The std::endl terminates a line and flushes the buffer. So it should be connected the stream like cout or similar.

answered Jan 30, 2011 at 12:38

Alexander Chuikov's user avatar

0

#include<iostream>
#include<conio.h>
#include<string.h>
using namespace std;
class student{

      private: 
           string coursecode;
           int number,total;
      public:
           void getcourse(void);
           void getnumber(void);
           void show(void);
      };

        void  student ::getcourse(){

              cout<<"pleas enter the course coden";
              cin>>coursecode;

              }


        void  student::getnumber(){

                     cout<<"pleas enter the number n";
                     cin>>number;

                     }
                void  student::show(){

                             cout<<"coursecode istt"<<coursecode<<"tt and number is "<<number<<"n";

                             } 
                             int main()
                             {

                                   student s;

                                  s.getcourse();
                                   s.getnumber(); 
                                   s.show();
                                   system("pause");









                                   }    

answered Jan 24, 2017 at 12:23

Muhammad Tanzeel's user avatar

Для реализации задачи тестирования на gitlab ci пытаюсь воспользоваться services

integration_test:
  image: $CI_REGISTRY/platform/docker-images/rpm-builder:etl-spark-python-3.6
  stage: test
  variables:
    # KAFKA SERVICES
    KAFKA_HOST: kafka
    ALLOW_ANONYMOUS_LOGIN: "yes"
    ALLOW_PLAINTEXT_LISTENER: "yes"
    KAFKA_CFG_ZOOKEEPER_CONNECT: "zookeeper:2181"
  services:
    - name: $CI_REGISTRY/bitnami/zookeeper:latest
      alias: zookeeper
    - name: $CI_REGISTRY/bitnami/kafka:latest
      alias: kafka
  script:
    # Copy base files for spark
    - cp -ir /app/* ./

при подъеме сервисов возвращается ошибка

Service container logs:
2022-01-17T18:47:42.438533980Z kafka 18:47:42.43 
2022-01-17T18:47:42.439726418Z kafka 18:47:42.43 Welcome to the Bitnami kafka container
2022-01-17T18:47:42.441043769Z kafka 18:47:42.44 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-kafka
2022-01-17T18:47:42.442225944Z kafka 18:47:42.44 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-kafka/issues
2022-01-17T18:47:42.443420255Z kafka 18:47:42.44 
2022-01-17T18:47:42.444662314Z kafka 18:47:42.44 INFO  ==> ** Starting Kafka setup **
2022-01-17T18:47:42.492055880Z kafka 18:47:42.49 WARN  ==> You set the environment variable ALLOW_PLAINTEXT_LISTENER=yes. For safety reasons, do not use this flag in a production environment.
2022-01-17T18:47:42.501865183Z kafka 18:47:42.50 INFO  ==> Initializing Kafka...
2022-01-17T18:47:42.508696785Z kafka 18:47:42.50 INFO  ==> No injected configuration files found, creating default config files
2022-01-17T18:47:42.576396875Z kafka 18:47:42.57 INFO  ==> ** Kafka setup finished! **
2022-01-17T18:47:42.576440084Z 
2022-01-17T18:47:42.594123673Z kafka 18:47:42.59 INFO  ==> ** Starting Kafka **
2022-01-17T18:47:43.474583867Z [2022-01-17 18:47:43,474] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
2022-01-17T18:47:43.938419050Z [2022-01-17 18:47:43,938] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
2022-01-17T18:47:44.048924378Z [2022-01-17 18:47:44,048] INFO Registered signal handlers for TERM, INT, HUP (org.apache.kafka.common.utils.LoggingSignalHandler)
2022-01-17T18:47:44.051763052Z [2022-01-17 18:47:44,051] INFO starting (kafka.server.KafkaServer)
2022-01-17T18:47:44.052194609Z [2022-01-17 18:47:44,052] INFO Connecting to zookeeper on zookeeper:2181 (kafka.server.KafkaServer)
2022-01-17T18:47:44.068206148Z [2022-01-17 18:47:44,067] INFO [ZooKeeperClient Kafka server] Initializing a new session to zookeeper:2181. (kafka.zookeeper.ZooKeeperClient)
2022-01-17T18:47:44.073037886Z [2022-01-17 18:47:44,072] INFO Client environment:zookeeper.version=3.6.3--6401e4ad2087061bc6b9f80dec2d69f2e3c8660a, built on 04/08/2021 16:35 GMT (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073054713Z [2022-01-17 18:47:44,072] INFO Client environment:host.name=253a7ecd266d (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073057592Z [2022-01-17 18:47:44,072] INFO Client environment:java.version=11.0.13 (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073060310Z [2022-01-17 18:47:44,072] INFO Client environment:java.vendor=BellSoft (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073072484Z [2022-01-17 18:47:44,072] INFO Client environment:java.home=/opt/bitnami/java (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073155184Z [2022-01-17 18:47:44,073] INFO Client environment:java.class.path=/opt/bitnami/kafka/bin/../libs/activation-1.1.1.jar:/opt/bitnami/kafka/bin/../libs/aopalliance-3.6.3.jar:/opt/bitnami/kafka/bin/../libs/zstd-jni-1.5.0-2.jar (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073264080Z [2022-01-17 18:47:44,073] INFO Client environment:java.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073282854Z [2022-01-17 18:47:44,073] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073287291Z [2022-01-17 18:47:44,073] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073324331Z [2022-01-17 18:47:44,073] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073346295Z [2022-01-17 18:47:44,073] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073375677Z [2022-01-17 18:47:44,073] INFO Client environment:os.version=4.1.12-124.22.2.el7uek.x86_64 (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073379826Z [2022-01-17 18:47:44,073] INFO Client environment:user.name=? (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073430178Z [2022-01-17 18:47:44,073] INFO Client environment:user.home=? (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073468545Z [2022-01-17 18:47:44,073] INFO Client environment:user.dir=/ (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073488353Z [2022-01-17 18:47:44,073] INFO Client environment:os.memory.free=1010MB (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073543290Z [2022-01-17 18:47:44,073] INFO Client environment:os.memory.max=1024MB (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.073549405Z [2022-01-17 18:47:44,073] INFO Client environment:os.memory.total=1024MB (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.075679856Z [2022-01-17 18:47:44,075] INFO Initiating client connection, connectString=zookeeper:2181 sessionTimeout=18000 watcher=kafka.zookeeper.ZooKeeperClient$ZooKeeperClientWatcher$@3700ec9c (org.apache.zookeeper.ZooKeeper)
2022-01-17T18:47:44.080141410Z [2022-01-17 18:47:44,080] INFO jute.maxbuffer value is 4194304 Bytes (org.apache.zookeeper.ClientCnxnSocket)
2022-01-17T18:47:44.084960045Z [2022-01-17 18:47:44,084] INFO zookeeper.request.timeout value is 0. feature enabled=false (org.apache.zookeeper.ClientCnxn)
2022-01-17T18:47:44.086992807Z [2022-01-17 18:47:44,086] INFO [ZooKeeperClient Kafka server] Waiting until connected. (kafka.zookeeper.ZooKeeperClient)
2022-01-17T18:47:44.094487882Z [2022-01-17 18:47:44,091] ERROR Unable to resolve address: zookeeper:2181 (org.apache.zookeeper.client.StaticHostProvider)
2022-01-17T18:47:44.094502342Z java.net.UnknownHostException: zookeeper: Name or service not known
2022-01-17T18:47:44.094505342Z 	at java.base/java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
2022-01-17T18:47:44.094508179Z 	at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)
2022-01-17T18:47:44.094511436Z 	at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519)
2022-01-17T18:47:44.094526980Z 	at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)
2022-01-17T18:47:44.094529836Z 	at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1509)
2022-01-17T18:47:44.094532442Z 	at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1368)
2022-01-17T18:47:44.094535523Z 	at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1302)
2022-01-17T18:47:44.094538134Z 	at org.apache.zookeeper.client.StaticHostProvider$1.getAllByName(StaticHostProvider.java:88)
2022-01-17T18:47:44.094540779Z 	at org.apache.zookeeper.client.StaticHostProvider.resolve(StaticHostProvider.java:141)
2022-01-17T18:47:44.094543344Z 	at org.apache.zookeeper.client.StaticHostProvider.next(StaticHostProvider.java:368)
2022-01-17T18:47:44.094545978Z 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1207)
2022-01-17T18:47:44.100106437Z [2022-01-17 18:47:44,099] WARN Session 0x0 for sever zookeeper:2181, Closing socket connection. Attempting reconnect except it is a SessionExpiredException. (org.apache.zookeeper.ClientCnxn)
2022-01-17T18:47:44.100122479Z java.lang.IllegalArgumentException: Unable to canonicalize address zookeeper:2181 because it's not resolvable
2022-01-17T18:47:44.100125855Z 	at org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:78)
2022-01-17T18:47:44.100128814Z 	at org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:41)
2022-01-17T18:47:44.100131534Z 	at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1161)
2022-01-17T18:47:44.100134049Z 	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1210)

начинается бодро но в итоге: ERROR Unable to resolve address: zookeeper:2181

В чем может быть проблема и как ее решить?

Skip to navigation
Skip to main content

Red Hat Customer Portal

Infrastructure and Management

  • Red Hat Enterprise Linux

  • Red Hat Virtualization

  • Red Hat Identity Management

  • Red Hat Directory Server

  • Red Hat Certificate System

  • Red Hat Satellite

  • Red Hat Subscription Management

  • Red Hat Update Infrastructure

  • Red Hat Insights

  • Red Hat Ansible Automation Platform

Cloud Computing

  • Red Hat OpenShift

  • Red Hat CloudForms

  • Red Hat OpenStack Platform

  • Red Hat OpenShift Container Platform

  • Red Hat OpenShift Data Science

  • Red Hat OpenShift Online

  • Red Hat OpenShift Dedicated

  • Red Hat Advanced Cluster Security for Kubernetes

  • Red Hat Advanced Cluster Management for Kubernetes

  • Red Hat Quay

  • OpenShift Dev Spaces

  • Red Hat OpenShift Service on AWS

Storage

  • Red Hat Gluster Storage

  • Red Hat Hyperconverged Infrastructure

  • Red Hat Ceph Storage

  • Red Hat OpenShift Data Foundation

Runtimes

  • Red Hat Runtimes

  • Red Hat JBoss Enterprise Application Platform

  • Red Hat Data Grid

  • Red Hat JBoss Web Server

  • Red Hat Single Sign On

  • Red Hat support for Spring Boot

  • Red Hat build of Node.js

  • Red Hat build of Thorntail

  • Red Hat build of Eclipse Vert.x

  • Red Hat build of OpenJDK

  • Red Hat build of Quarkus

Integration and Automation

  • Red Hat Process Automation

  • Red Hat Process Automation Manager

  • Red Hat Decision Manager

All Products

Symptom

QEMU guest migration fails and this error message appears:

# virsh migrate qemu qemu+tcp://192.168.122.12/system
  error: Unable to resolve address name_of_host service '49155': Name or service not known

For example, if the destination host name is «newyork», the error message will appear as:

# virsh migrate qemu qemu+tcp://192.168.122.12/system
error: Unable to resolve address 'newyork' service '49155': Name or service not known

However, this error looks strange as we did not use «newyork» host name anywhere.

Investigation

During migration, libvirtd running on the destination host creates a URI from an address and port where it expects to receive migration data and sends it back to libvirtd running on the source host.

In this case, the destination host (192.168.122.12) has its name set to ‘newyork’. For some reason, libvirtd running on that host is unable to resolve the name to an IP address that could be sent back and still be useful. For this reason, it returned the ‘newyork’ host name hoping the source libvirtd would be more successful with resolving the name. This can happen if DNS is not properly configured or /etc/hosts has the host name associated with local loopback address (127.0.0.1).

Note that the address used for migration data cannot be automatically determined from the address used for connecting to destination libvirtd (for example, from qemu+tcp://192.168.122.12/system). This is because to communicate with the destination libvirtd, the source libvirtd may need to use network infrastructure different from that which virsh (possibly running on a separate machine) requires.

Solution

The best solution is to configure DNS correctly so that all hosts involved in migration are able to resolve all host names.

If DNS cannot be configured to do this, a list of every host used for migration can be added manually to the /etc/hosts file on each of the hosts. However, it is difficult to keep such lists consistent in a dynamic environment.

If the host names cannot be made resolvable by any means, virsh migrate supports specifying the migration host:

# virsh migrate qemu qemu+tcp://192.168.122.12/system tcp://192.168.122.12

Destination libvirtd will take the tcp://192.168.122.12 URI and append an automatically generated port number. If this is not desirable (because of firewall configuration, for example), the port number can be specified in this command:

# virsh migrate qemu qemu+tcp://192.168.122.12/system tcp://192.168.122.12:12345

Another option is to use tunnelled migration. Tunnelled migration does not create a separate connection for migration data, but instead tunnels the data through the connection used for communication with destination libvirtd (for example, qemu+tcp://192.168.122.12/system):

# virsh migrate qemu qemu+tcp://192.168.122.12/system --p2p --tunnelled

  • Печать

Страницы: [1] 2  Все   Вниз

Тема: Монтирование расшареного каталога  (Прочитано 2787 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
freemind

oleg@satellite:~$ sudo mount -t cifs -o username=oleg //B01/сканы/ /mnt/scan
mount error: could not resolve address for B01: Unknown error
подскажите, как побороть?
в сети адреса раздаются dhcp, по ip-адресу монтировать нельзя, в hosts я так понимаю тоже нет смысла прописывать


Онлайн
ALiEN175

systemctl status systemd-resolved
ping -c4 B01

ASUS P5K-C :: Intel Xeon E5450 @ 3.00GHz :: 8 GB DDR2 :: Radeon R7 260X :: XFCE
ACER 5750G :: Intel Core i5-2450M @ 2.50GHz :: 6 GB DDR3 :: GeForce GT 630M :: XFCE


Оффлайн
freemind

oleg@satellite:~$ systemctl status systemd-resolved
● systemd-resolved.service - Network Name Resolution
   Loaded: loaded (/lib/systemd/system/systemd-resolved.service; disabled; vendo
  Drop-In: /lib/systemd/system/systemd-resolved.service.d
           └─resolvconf.conf
   Active: inactive (dead)
     Docs: man:systemd-resolved.service(8)


Онлайн
ALiEN175

sudo systemctl enable systemd-resolved
sudo systemctl start systemd-resolved
ping -c4 B01

ASUS P5K-C :: Intel Xeon E5450 @ 3.00GHz :: 8 GB DDR2 :: Radeon R7 260X :: XFCE
ACER 5750G :: Intel Core i5-2450M @ 2.50GHz :: 6 GB DDR3 :: GeForce GT 630M :: XFCE


Оффлайн
freemind

oleg@satellite:~$ systemctl enable systemd-resolved
oleg@satellite:~$ systemctl start systemd-resolved
oleg@satellite:~$ ping -c4 B01
ping: unknown host B01
oleg@satellite:~$

oleg@satellite:~$ systemctl status systemd-resolved
● systemd-resolved.service - Network Name Resolution
   Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor
  Drop-In: /lib/systemd/system/systemd-resolved.service.d
           └─resolvconf.conf
   Active: active (running) since Сб 2019-09-21 21:00:04 +05; 4min 48s ago
     Docs: man:systemd-resolved.service(8)
 Main PID: 16475 (systemd-resolve)
   Status: "Processing requests..."
   CGroup: /system.slice/systemd-resolved.service
           └─16475 /lib/systemd/systemd-resolved

сен 21 21:00:04 satellite systemd[1]: Starting Network Name Resolution...
сен 21 21:00:04 satellite systemd-resolved[16475]: Positive Trust Anchors:
сен 21 21:00:04 satellite systemd-resolved[16475]: . IN DS    19036 8 2 49aac11d
сен 21 21:00:04 satellite systemd-resolved[16475]: Negative trust anchors: 10.in
сен 21 21:00:04 satellite systemd-resolved[16475]: Using system hostname 'satell
сен 21 21:00:04 satellite systemd-resolved[16475]: Switching to system DNS serve
сен 21 21:00:04 satellite systemd[1]: Started Network Name Resolution.
сен 21 21:02:03 satellite systemd[1]: Started Network Name Resolution.
сен 21 21:03:54 satellite systemd[1]: Started Network Name Resolution.
lines 1-20/20 (END)


Онлайн
ALiEN175

ASUS P5K-C :: Intel Xeon E5450 @ 3.00GHz :: 8 GB DDR2 :: Radeon R7 260X :: XFCE
ACER 5750G :: Intel Core i5-2450M @ 2.50GHz :: 6 GB DDR3 :: GeForce GT 630M :: XFCE


Оффлайн
freemind

oleg@satellite:~$ smbtree -N
WORKGROUP
\SATELLITE      satellite
\SATELLITEKyocera-FS-1125MFP-KPSL Kyocera FS-1125MFP KPSL
\SATELLITEGeneric-CUPS-PDF-Printer Generic CUPS-PDF Printer
\SATELLITEIPC$            IPC Service (satellite)
\SATELLITE1cbase         
\SATELLITEОбщедоступные
\SATELLITEprint$          Printer Drivers
\B01           
\B01Транспорт
\B01Сканы   
\B01принтер
\B01Базы       
\B01Архивы   
\B01Users         
\B01print$          Драйверы принтеров
\B01Kyocera FS-1125MFP GX Kyocera FS-1125MFP GX
\B01IPC$            Удаленный IPC
\B01D$              Стандартный общий ресурс
\B01D             
\B01C$              Стандартный общий ресурс
\B01ADMIN$          Удаленный Admin
oleg@satellite:~$


Оффлайн
victor00000

//B01/

что //google.com/ работает.


Оффлайн
freemind

oleg@satellite:~$ ping -c4 smb://B01/
ping: unknown host smb://B01/

oleg@satellite:~$ ping -c4 B01
ping: unknown host B01


Пользователь добавил сообщение 21 Сентября 2019, 21:03:08:


oleg@satellite:~$ ping -c4 ubuntu.ru
PING ubuntu.ru (138.201.188.48) 56(84) bytes of data.
64 bytes from ubuntu.ru (138.201.188.48): icmp_seq=1 ttl=48 time=72.5 ms
64 bytes from ubuntu.ru (138.201.188.48): icmp_seq=2 ttl=48 time=72.4 ms
64 bytes from ubuntu.ru (138.201.188.48): icmp_seq=3 ttl=48 time=72.3 ms
64 bytes from ubuntu.ru (138.201.188.48): icmp_seq=4 ttl=48 time=72.3 ms

« Последнее редактирование: 21 Сентября 2019, 21:03:30 от freemind »


Оффлайн
victor00000

пишите нормально ИП адрес.
//XXX.XXX.XXX.XXX/


Оффлайн
AnrDaemon

freemind, покажите

cat /etc/nsswitch.conf

« Последнее редактирование: 26 Сентября 2019, 00:24:00 от Aleksandru »

Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…


Оффлайн
AnrDaemon

что даёт?

man nsswitch.conf

Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…


Оффлайн
freemind

oleg@satellite:~$ cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat
gshadow:        files

hosts:          files mdns4_minimal [NOTFOUND=return] dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis


Оффлайн
AnrDaemon

Либо настройте нормально domain-search, либо пишите имена машин полностью, либо уберите «mdns4_minimal [NOTFOUND=return] » из hosts.

Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…


Оффлайн
freemind

подскажите, что такое domain-search, и как его настроить нормально:)

Имя машины B01, что вы имеете ввиду писать полностью?
//B01/, smb://B01/, //WORKGROUP/B01/, smb://WORKGROUP/B01/ не катят

oleg@satellite:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 satellite

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

« Последнее редактирование: 25 Сентября 2019, 11:48:30 от freemind »


  • Печать

Страницы: [1] 2  Все   Вверх

Понравилась статья? Поделить с друзьями:
  • Error reporting e all ini set
  • Error reporting e all e notice php
  • Error reporting client launcher
  • Error reporting bitrix
  • Error reporting 22527 php