解决redis集群.redis-cli 启动 Connection refused

./redis-cli -a redis123 --cluster create --cluster-replicas 1 30.4.211.1:7001 30.4.211.1:7002 30.4.211.1:7003 30.4.211.1:7004 30.4.211.1:7005 30.4.211.1:7006
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
Could not connect to Redis at 30.4.211.1:7002: Connection refused

redis集群环境./redis-cli 启动 后无法连接redis节点的问题,一般是redis.conf文件中如下配置项目没有被注释引起的

bind 127.0.0.1
注释后:
#bind 127.0.0.1

注释掉后,最好杀一下端口进程;

lsof -i:7002

然后执行重启服务

./redis-server ../redis.conf

所有的节点都重启完成后;执行如下命令即可;

./redis-cli -a redis123 --cluster create --cluster-replicas 1 30.4.211.1:7001 30.4.211.1:7002 30.4.211.1:7003 30.4.211.1:7004 30.4.211.1:7005 30.4.211.1:7006
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Special Edition Using Perl for Web Programming David Harlan, et al. CONTENTS Chapter 1 Perl Overview Perl Origins H Borrowings H Cost and Licensing H Distribution H G Perl Programs Invocation H Command-Line Arguments H Program Layout H G Data Types Scalars H Arrays H Associative Arrays H File Handles H G Special Variables Environment Variables H Program Arguments H Current Line H System Error Messages H G Flow Control Logical Operators H G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (1 of 24) [2/17/2007 1:22:33 PM] Conditional Expressions H Compound Statements H Loops H Labels H Subroutines H Variable Scope H Patterns Regular Expressions H Matching H Substitution H G From Here G Chapter 2 Introduction to CGI Justifying the Use of CGI Reasons for Using Perl H How to Make Perl Do CGI H G Understanding CGI Calling a Script from a Form H Getting Information to the Script H Processing QUERY_STRING into Useful Chunks H Using Regular Expressions tr/// and s/// H Printing the Page H Creating a Script on Your Web Server H Calling a CGI Script Directly H Limiting Data-File Size H Using the Location Header H Using CGI in Server-Side Includes H G From Here G Chapter 3 Advanced Form Processing and Data Storage Using the POST Method Comparing GET and POST H Processing the Information from a POST-Method Form H G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (2 of 24) [2/17/2007 1:22:34 PM] Making Your Perl Code Modular Defining and Calling Subroutines H Using Variable Aliases H G Using DBM Files for Data Storage Opening a DBM File H Assigning Values to a DBM File H Initializing a DBM File H Adding Data to the DBM File H G Using Complex Forms and Storing Related Data Processing the Form Data and Checking the Password H Working Around the Limitations of DBM Files H G From Here G Chapter 4 Advanced Page Output Parsing the DBM File and Printing Pages Printing a Standard Page H Printing User-Designed Pages H G Returning Data to a Form for Further Revision Filling in Text Fields and Selecting List Items H Saving and Editing User-Designed Pages H G From Here G Chapter 5 Searching Searching the Full Text of Your Site Scanning Directories Using a Recursive Subroutine H Using Recursive Subroutines H Processing the Files in Each Directory H G Using an Index Search Indexing Your Web Site into a DBM File H Performing a Search Using the Index File H G Printing the Resulting Pages Returning Pages from the Nonindex Search H Returning Pages from the Index Search H G From Here G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (3 of 24) [2/17/2007 1:22:34 PM] Chapter 6 Using Dynamic Pages Generating HTML Pages G Understanding the CGI Environment and HTML Generation CGI Environment Variables Using the GET Method H CGI Environment Variables Using the POST Method H G Referring the User to Browser-Specific Web Pages G Using Client Pull with Perl G Using Server Push with Perl G From Here G Chapter 7 Dynamic and Interactive HTML Content in Perl and CGI Creating User-Specific Pages Allowing the User to Shop for Options H Building an HTML Document Based on Options H G Using Server-Side Includes Understanding the SSI Commands H Setting up an Environment for Server-Side Includes H Understanding the Commands H G Understanding Shopping Carts Shopping Cart Using Hidden Fields H Shopping Cart Using HTTP Cookies H G From Here G Chapter 8 Understanding Basic User Authentication Basic User Authentication Processes and User IDs H CGI Program Execution H Access Control H User Identification H G User Authentication on the Apache Server Access Restrictions H G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (4 of 24) [2/17/2007 1:22:34 PM] Apache Configuration Files H Configuration Directives H User Administration Adding Users H Deleting Users H Changing Passwords H Adding Users to Groups H Deleting Users from Groups H G From Here G Chapter 9 Understanding CGI Security Understanding the Security Issues Tracing the Chain of Command H Reading Files H Writing to Files H Storing Variables H Losing the Data H G Managing Sessions The Nature of a Session H The Wrapper H Generic Substitutions H Flow Control H G Designing the Sample Application Program Flow H Data Issues H G Implementing the Sample Application Getting Started: The Main Routine H Getting the CGI Values H Reading the Product Data H Invoking a Specific Function H Parsing an HTML File H Initiating a Login H G Logging In and Out Logging In H Validating the User H G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (5 of 24) [2/17/2007 1:22:34 PM] Logging Out H Managing Session Data Storing Session Data H Retrieving Session Data H G Managing the Orders Building an Order H Reviewing the Order H Placing the Order H G Wrapping Up G From Here G Chapter 10 Site Administration Working with Web Server Log Files Generating HTML Output from a Log File H Reviewing the AccessWatch Log Analyzer H G Understanding File Maintenance G Understanding Robots and the Robot-Exclusion Standard G Configuring Some Common Web Servers O'Reilly's WebSite H NCSA httpd H Apache H G Examining Some Other File- and Site-Administration Issues G From Here G Chapter 11 Database Interaction Justifying Perl/Database Interaction G Examining the Database Options DBI and DBD Database Access Modules for Perl 5 H mSQL and mSQLPerl H Oracle RDBMS and Oraperl H Starting a New Message Thread H Listing Threads and Displaying the Contents of a Single Thread H Navigating Through Messages and Posting Replies H G From Here G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (6 of 24) [2/17/2007 1:22:34 PM] Chapter 12 Database Application Using CGI Fundamental Design and Security Issues Advantages and Disadvantages of a Web/RDBMS Interface H Limitations of HTTP in a Database Context H Security Issues H G A Simple Working Example in Perl Accessing a DBMS from Perl H Defining the Database Schema for the Working Example H Searching the Hotlist H Viewing the Detail Record H Submitting Data to the Hotlist H Generating SQL Code to Transfer Submitted Data H G Perl Tools for Web/DBMS Work WDB H Web/Genera H MiniSQL (mSQL) and W3-mSQL H DBI H ODBC Tools H Some Useful Hotlists H G Problem-Solving Debugging H Tuning Performance H G The Future of Web/Database Interfaces G From Here... G Chapter 13 Special Variables $<I<digit>> G $[ G $ACCUMULATOR G $ARG G $ARGV G $BASETIME G $CHILD_ERROR G $DEBUGGING G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (7 of 24) [2/17/2007 1:22:34 PM] $EFFECTIVE_GROUP_ID G $EFFECTIVE_USER_ID G $EVAL_ERROR G $EXECUTABLE_NAME G $FORMAT_FORMFEED G $FORMAT_LINES_LEFT G $FORMAT_LINES_PER_PAGE G $FORMAT_LINE_BREAK_CHARACTERS G $FORMAT_NAME G $FORMAT_PAGE_NUMBER G $FORMAT_TOP_NAME G $INPLACE_EDIT G $INPUT_LINE_NUMBER G $INPUT_RECORD_SEPARATOR G $LAST_PAREN_MATCH G $LIST_SEPARATOR G $MATCH G $MULTILINE_MATCHING G $OFMT G $OS_ERROR G $OUTPUT_AUTOFLUSH G $OUTPUT_FIELD_SEPARATOR G $OUTPUT_RECORD_SEPARATOR G $PERLDB G $PERL_VERSION G $POSTMATCH G $PREMATCH G $PROCESS_ID G $PROGRAM_NAME G $REAL_GROUP_ID G $REAL_USER_ID G $SUBSCRIPT_SEPARATOR G $SYSTEM_FD_MAX G $WARNING G %ENV<variable_name>,<variable_value> G %INC<file-name>,<file-load-status> G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (8 of 24) [2/17/2007 1:22:35 PM] %SIG<signal-name>,<signal-value> G @ARGV G @INC G From Here... G Chapter 14 Operators ! G != G !~ G % G %= G & G && G &&= G &= G * G ** G **= G *= G + (Unary) G + (Binary) G ++ G += G , G - (Unary) G - (Binary) G -- G -= G -> G . G .. G .= G / G /= G < G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (9 of 24) [2/17/2007 1:22:35 PM] << G <<= G <= G <=> G = G == G => G =~ G > G >= G >> G >>= G ? G LIST Operators (Leftward) G LIST Operators (Rightward) G NAMED Unary Operators G TERMs G " G ^ G ^= G and G cmp G eq G ge G gt G le G lt G ne G not G or G x G x= G xor G | G |= G || G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (10 of 24) [2/17/2007 1:22:35 PM] ||= G ~ G From Here... G Chapter 15 Function List -A Compliance H Syntax H Definition H Example H G -B Compliance H Syntax H Definition H Example H G -b Compliance H Syntax H Definition H Example H G -C Compliance H Syntax H Definition H Example H G -c Compliance H Syntax H Definition H Example H G -d Compliance H Syntax H Definition H Example H G endprotoent Compliance H Syntax H Definition H Example H G endpwent Compliance H Syntax H Definition H Example H G endservent Compliance H Syntax H Definition H Example H G eof Compliance H Syntax H Definition H Example H G eval Compliance H Syntax H Definition H Example H G exec Compliance H Syntax H Definition H Example H G local Compliance H Syntax H Definition H G localtime Compliance H Syntax H Definition H Example H G log Compliance H Syntax H Definition H Example H G lstat Compliance H Syntax H Definition H Example H G m// Compliance H Syntax H Definition H Example H G map Compliance H Syntax H Definition H Example H G setpriority Compliance H Syntax H Definition H Example H G setprotoent Compliance H Syntax H Definition H Example H G setpwent Compliance H Syntax H Definition H Example H G setservent Compliance H Syntax H Definition H Example H G setsockopt Compliance H Syntax H Definition H G shift Compliance H Syntax H Definition H Example H G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (11 of 24) [2/17/2007 1:22:35 PM] -e Compliance H Syntax H Definition H Example H G -f Compliance H Syntax H Definition H Example H G -g Compliance H Syntax H Definition H Example H G -k Compliance H Syntax H Definition H Example H G -l Compliance H Syntax H Definition H Example H G -M Compliance H Syntax H Definition H Example H G -O Compliance H Syntax H Definition H Example H G -o G exists Compliance H Syntax H Definition H Example H G exit Compliance H Syntax H Definition H Example H G exp Compliance H Syntax H Definition H Example H G fcntl Compliance H Syntax H Definition H G fileno Compliance H Syntax H Definition H Example H G flock Compliance H Syntax H Definition H G fork Compliance H Syntax H Definition H Example H G format G mkdir Compliance H Syntax H Definition H Example H G msgctl Compliance H Syntax H Definition H G msgget Compliance H Syntax H Definition H G msgrcv Compliance H Syntax H Definition H G msgsnd Compliance H Syntax H Definition H G my Compliance H Syntax H Definition H G next Compliance H Syntax H Definition H Example H G no Compliance H G shmctl Compliance H Syntax H Definition H G shmget Compliance H Syntax H Definition H G shmread Compliance H Syntax H Definition H G shmwrite Compliance H Syntax H Definition H G shutdown Compliance H Syntax H Definition H G sin Compliance H Syntax H Definition H Example H G sleep Compliance H Syntax H Definition H Example H G socket Compliance H G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (12 of 24) [2/17/2007 1:22:35 PM] Compliance H Syntax H Definition H Example H -p Compliance H Syntax H Definition H Example H G -R Compliance H Syntax H Definition H Example H G -r Compliance H Syntax H Definition H Example H G -S Compliance H Syntax H Definition H Example H G -s Compliance H Syntax H Definition H Example H G -T Compliance H Syntax H Definition H Example H G -t Compliance H G Compliance H Syntax H Definition H Example H formline Compliance H Syntax H Definition H Example H G getc Compliance H Syntax H Definition H Example H G getgrent Compliance H Syntax H Definition H Example H G getgrgid Compliance H Syntax H Definition H Example H G getgrname Compliance H Syntax H Definition H Example H G gethostbyaddr Compliance H Syntax H Definition H Example(Perl5 only) H G gethostbyname G Syntax H Definition H Example H oct Compliance H Syntax H Definition H Example H G open Compliance H Syntax H Definition H Example H G opendir Compliance H Syntax H Definition H Example H G ord Compliance H Syntax H Definition H Example H G pack Compliance H Syntax H Definition H Example H G package Compliance H Syntax H Definition H G pipe Compliance H Syntax H G Syntax H Definition H socketpair Compliance H Syntax H Definition H G sort Compliance H Syntax H Definition H Example H G splice Compliance H Syntax H Definition H Example H G split Compliance H Syntax H Definition H Examples H G sprintf Compliance H Syntax H Definition H Example H G sqrt Compliance H Syntax H Definition H Example H G srand Compliance H Syntax H G CONTENTS http://docs.rinet.ru:8080/Using_Perl5_in_Web/ (13 of 24) [2/17/2007 1:22:35 PM] Syntax H Definition H Example H -u Compliance H Syntax H Definition H Example H G -W Compliance H Syntax H Definition H Example H G -w Compliance H Syntax H Definition H Example H G -X Compliance H Syntax H Definition H Example H G -x Compliance H Syntax H Definition H Example H G -z Compliance H Syntax H Definition H Example H G abs Compliance H Syntax H G Compliance H Syntax H Definition H Example H gethostent Compliance H Syntax H Definition H Example H G getlogin Compliance H Syntax H Definition H Example H G getnetbyaddr Compliance H Syntax H Definition H Example H G getnetbyname Compliance H Syntax H Definition H Example H G getnetent Compliance H Syntax H Definition H Example H G getpeername
iDR SERIES WHAT IS IT? 2 The iDR is a 16 x 16 matrix mixer with an extensive array of audio management tools designed to reduce the need for additional devices to be specified for an installation, or carried in the hire inventory. Pedigree ALLEN&HEATH preamps, 24bit converters and fixed DSP architecture ensure that concert-quality low-latency sound is delivered efficiently to where it is needed. iDR SERIES WHY IS IT SO USEFUL? Anyone with a basic knowledge of traditional console and outboard equipment will be able to design a distributed audio system on their PC using the ‘mixer’ based iDR System Manager software - download it free from www.idrseries.com. iDR comes loaded with flexible DSP tools, essential in sound system configuration and installation. Input & output delays, 4- and 8-band parametric EQ, automatic microphone mixing, frequency conscious dynamics, look-ahead limiter, ambient noise compensator, crossfader and much more are available at your fingertips without having to worry about running out of DSP. Its system of presets allow for full recall of the whole system or individual parameters at the touch of a button. After programming, the iDR unit operates as a stand-alone system controller, with a host of remote control devices available for day-to-day operation. The PL Series complements the powerful features of iDR and comprises wall plates, infra-red hand-held or desk mount controllers connecting to the main unit using CAT5 cable over the RS485-based proprietary PL-Anet bus, while all the major third party devices may also be used to control iDR. For complex systems, the iDR system can be driven in real time by a PC via an Ethernet port, allowing the iDR to be used in hire/live audio situations such as matrix distribution in theatres, or clean feed system for an outside broadcast. Why not connect a WiFi card to your laptop, connect to the internet, set up your system and save your settings on the move? Stay in control from anywhere in the world! Netwo
Introduction During the software development, I have seen many applications that requires incorporating email support. I remember, once I was to develop an application, which sends emails at the specific time to specific people with the customized messages. For that I developed a COM service that used MAPI. MAPI, i.e. Messaging Application Programming Interface, is the standard messaging architecture and a complete set of functions and object-oriented interfaces. Here I have an Email component, a COM DLL, which is a set of messaging functions that helps you create messaging-enabled applications. This COM component uses Simple MAPI to achieve that. Note: MAPI is used by various industry-standard e-mail clients, such as the Microsoft Exchange client, all versions of Microsoft Outlook and Outlook Express, including QUALCOMM Incorporated (Eudora) and Netscape Communications Corporation. So you can use this component with these client applications also. Component Design The CLSID of the Email component is CLSID_Mail and it has only one interface IMail with the interface ID IID_IMail. CMail is the implementation class and contains following data members: m_MAPILogon Function pointer for MAPILogon m_MAPISendMail Function pointer for MAPISendMail m_MAPISendDocuments Function pointer for MAPISendDocuments m_MAPIFindNext Function pointer for MAPIFindNext m_MAPIReadMail Function pointer for MAPIReadMail m_MAPIResolveName Function pointer for MAPIResolveName m_MAPIAddress Function pointer for MAPIAddress m_MAPILogoff Function pointer for MAPILogoff m_MAPIFreeBuffer Function pointer for MAPIFreeBuffer m_MAPIDetails Function pointer for MAPIDetails m_MAPISaveMail Function pointer for MAPISaveMail IMail have the following functions: IsMapiInstalled Checks if the MAPI is installed on the system. It searches Win.INI file for the MAPI key. If found it returns S_OK. InitMapi After checking the through IsMapiInstalled, it initializes the MAPI function pointers. Method should be called once before using the component. put_strProfileName Takes the name of the outlook profile name you are using to send the email. put_strEmailAddress Sets the recipient email address. You can specify more than one comma (,) separated recipient addresses. put_strRecipient Sets the name you want to specify for the recipients, sets the email names of the sender – it may be different from your specified profile email address. put_strSubject Sets the subject of the email. get_strSubject Returns the email subject. put_strMessage Sets email message text. get_strMessage Returns message text. put_strAttachmentFilePath Sets the email attachment with the full path like “c:\abc.txt”. get_strAttachmentFilePath Returns the path of email attachment. put_strAttachmentFile The display name of the attachment (Sample.txt), by default, it’s the same as that specified in put_strAttachmentFilePath. get_strAttachmentFile Returns the attachment file name. Logon Opens a new logon session if not already opened, using specified outlook profile, name and the profile password, you must logon before sending the email. I have set password to NULL assuming that the profile you will specify have NO password, but you can specify your own password. Automatically called by Send method. Logoff Logs off, and closes the session. Automatically called by Send method after sending the email. Send Sends the email, requires valid outlook profile name, recipient email address and a login session to send email. Steps to execute the demo project The demo project demonstrates the way you can use the component to send an email. In order to execute the demo project, the following settings are required: Step 1: You must have some valid Output Express email account or create one named TestProfile. You can create an email profile in Express from Tools>Accounts menu. This will open Internet Accounts property sheet. On the tab All, click the button Add and then Mail. A wizard will let you create an email account, specify the valid email address. For hotmail account, wizard automatically sets the names of email servers. After successfully creating the account, select the account name from the list in All tab (for hotmail account, the default account name is Hotmail). Open account properties by pressing Properties button and change the account name from default name (say Hotmail) to TestProfile. Step 2: Register the DLL All COM DLLs required to be registered. After copying the DLL source code, you can register the DLL by right clicking the DLL and selecting Register DLL or Register COM component option, or simply by double clicking the DLL. Compiling the DLL code in Visual Studio will automatically register the DLL. Step 3: Logged on to the net Make sure you are logged on to the net. If not, outlook will fail to deliver the email, however, you can still check the composed email in your outbox. How to send email? After specifying the information in the dialog box, click the Send button. A warning message will be displayed, click Send button. Note:The warning dialog is displayed because of the security constraints. If you want to get rid of this dialog box, then you will have to use Extended MAPI instead of simple MAPI. Here is the method CTestEmailDlg::OnSend method, which is used to pass the user specified information to the email object and call the IMail::Send method after setting everything. Collapse | Copy Code //##//##////////////////////////////////////////////////////////////// /////////////////////////////////////////////// // // void CTestEmailDlg::OnSend() // // This module is called when send button is pressed and uses //Email COM DLL to send email - Aisha Ikram // Note: dont forget to initialize COM library using CoInitialize(NULL); //##//##//////////////////////////////////////////////////////////////////// /////////////////////////////////////////////// void CTestEmailDlg::OnSend() { UpdateData(); try{ CComPtr<IMAIL> objMail; HRESULT hr; // make sure the DLL is registered hr = objMail.CoCreateInstance(CLSID_Mail); if(SUCCEEDED(hr)) { if(hr== S_OK) { // profile name is compulsory, this is the outlook profile, // i used "outlook express" as configuring it is easier than // "MS outlook" make sure to specify the correct sender's address // for this profile and make sure that outlook express is //the default email client. if(m_strProfile.IsEmpty()) { AfxMessageBox("Please specify email profile name "); return; } if(m_strTo.IsEmpty()) { AfxMessageBox("Please specify recipient's email address "); return; } // by default, it's TestProfile, assumes that a profile with this //name exists in outlook hr= objMail->put_strProfileName((_bstr_t)m_strProfile); hr = objMail->put_strSubject((_bstr_t)m_strSubject); // this is the email or set of email addresses (separated by ,) // which is actually used to send email hr = objMail->put_strEmailAddress((_bstr_t)m_strTo); // recipient is just to show the display name hr = objMail->put_strRecipient((_bstr_t)m_strTo); hr = objMail->put_strAttachmentFilePath((_bstr_t)m_strAttachment); hr = objMail->put_strMessage((_bstr_t)m_strMessage); hr= objMail->Send(); if(hr!=S_OK) AfxMessageBox("Error, make sure the info is correct"); }//if } //if } // try catch(...) { AfxMessageBox("Error, make sure specified info is correct"); } } Check the mail in the recipient inbox. Where to use This component can be extended to incorporate the functionalities like opening an existing inbox to read emails automatically from the inbox and composing new emails etc. It can be used to send emails automatically with customized user messages and attachments to specific people at particular time, especially while using some exe servers or NT services. That's it. If there is any suggestions or comments you are most welcome. Your rating would help me evaluate the standard of my article.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值