Packer times out on WinRM connect - vsphere

Description
I am attempting to automate the generation of a Windows Server 2016 "golden-image" using Packer (vmware-iso builder) & vSphere. The VM is created successfully, the autounattend.xml runs successfully, and the VM runs all first reboot activities. After this, the VM/packer sits at "Waiting for WinRM to become available..." until it times out.
NOTE: We only use static IPs. No DHCP.
Packer => 1.3.4
vSphere => 6.5
vmware-iso builder => latest
Background
I have ensured that:
The "guest ip hack" has been implemented.
esxcli system settings advanced set -o /Net/GuestIPHack -i 1
VNC ports 5900-6000 are open.
SSH is enabled.
I can connect via winrm from the server running packer to the VM manually through PowerShell.
The credentials being used are correct.
The network_adapter_type is set to VMXNET3.
VMware tools are installed.
Packer JSON
{
"variables": {
"name": "",
"vm_name": "",
"guest_os_type": "",
"tools_upload_flavor": "",
"headless": "false",
"iso_url": "",
"iso_checksum": "",
"iso_checksum_type": "",
"disk_size": "60000",
"admin_user": "",
"admin_password": "",
"memsize": "4096",
"numvcpus": "2",
"network_name": "",
"vsphere_server": "",
"vsphere_user": "",
"vsphere_pass": "",
"vsphere_datastore": ""
},
"builders": [
{
"name": "{{user `name`}}",
"vm_name": "{{user `vm_name`}}",
"keep_registered": false,
"ovftool_options": [
"--noSSLVerify"
],
"type": "vmware-iso",
"guest_os_type": "{{user `guest_os_type`}}",
"tools_upload_flavor": "{{user `tools_upload_flavor`}}",
"headless": "{{user `headless`}}",
"boot_wait": "1m",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"disk_size": "{{user `disk_size`}}",
"floppy_files": [
"./2016/resources/autounattend.xml",
"./2016/resources/feature-reset.ps1",
"./2016/resources/postinstall.xml",
"./common/configure-winrm.ps1",
"./common/configure-ip.ps1",
"./common/configure-domain.ps1",
"./common/install-vmware-tools.ps1"
],
"vnc_disable_password": true,
"communicator": "winrm",
"winrm_insecure": true,
"winrm_username": "{{user `admin_user`}}",
"winrm_password": "{{user `admin_password`}}",
"winrm_timeout": "6h",
"shutdown_command": "C:/windows/system32/sysprep/sysprep.exe /generalize /oobe /unattend:A:/postinstall.xml /quiet /shutdown",
"remote_type": "esx5",
"remote_host": "{{user `vsphere_server`}}",
"remote_password": "{{user `vsphere_pass`}}",
"remote_username": "{{user `vsphere_user`}}",
"remote_datastore": "{{user `vsphere_datastore`}}",
"skip_compaction": false,
"network_adapter_type": "VMXNET3",
"vmx_data": {
"gui.fitguestusingnativedisplayresolution": false,
"memsize": "{{user `memsize`}}",
"numvcpus": "{{user `numvcpus`}}",
"virtualhw.productcompatibility": "esx",
"virtualHW.version": 10,
"scsi0.virtualDev": "lsisas1068",
"ethernet0.networkName": "{{user `network_name`}}"
},
"vmx_data_post": {
"ide0:0.startConnected": false,
"ide0:1.startConnected": false,
"ide1:0.startConnected": false,
"ide1:1.startConnected": false,
"ide0:0.deviceType": "cdrom-raw",
"ide0:1.deviceType": "cdrom-raw",
"ide1:0.deviceType": "cdrom-raw",
"ide1:1.deviceType": "cdrom-raw",
"ide0:0.clientDevice": true,
"ide0:1.clientDevice": true,
"ide1:0.clientDevice": true,
"ide1:1.clientDevice": true,
"ide0:0.present": false,
"ide0:1.present": false,
"ide1:0.present": true,
"ide1:1.present": false,
"ide0:0.fileName": "emptyBackingString",
"ide0:1.fileName": "emptyBackingString",
"ide1:0.fileName": "emptyBackingString",
"ide1:1.fileName": "emptyBackingString"
}
}
]
}
Output
==> win-server-2016-template: Retrieving ISO
win-server-2016-template: Found already downloaded, initial checksum matched, no download needed: https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO
==> win-server-2016-template: Creating floppy disk...
win-server-2016-template: Copying files flatly from floppy_files
win-server-2016-template: Copying file: ./2016/resources/autounattend.xml
win-server-2016-template: Copying file: ./2016/resources/feature-reset.ps1
win-server-2016-template: Copying file: ./2016/resources/postinstall.xml
win-server-2016-template: Copying file: ./common/configure-winrm.ps1
win-server-2016-template: Copying file: ./common/configure-ip.ps1
win-server-2016-template: Copying file: ./common/configure-domain.ps1
win-server-2016-template: Copying file: ./common/install-vmware-tools.ps1
win-server-2016-template: Done copying files from floppy_files
win-server-2016-template: Collecting paths from floppy_dirs
win-server-2016-template: Resulting paths from floppy_dirs : []
win-server-2016-template: Done copying paths from floppy_dirs
==> win-server-2016-template: Uploading Floppy to remote machine...
==> win-server-2016-template: Remote cache was verified skipping remote upload...
==> win-server-2016-template: Creating required virtual machine disks
==> win-server-2016-template: Building and writing VMX file
==> win-server-2016-template: Registering remote VM...
==> win-server-2016-template: Starting virtual machine...
==> win-server-2016-template: Waiting 1m0s for boot...
==> win-server-2016-template: Connecting to VM via VNC (esxihost.domain.com:5900)
==> win-server-2016-template: Typing the boot command over VNC...
==> win-server-2016-template: Waiting for WinRM to become available...
Debug Log
2019/02/12 00:45:50 packer.exe: 2019/02/12 00:45:50 [DEBUG] Opening new ssh session
2019/02/12 00:45:50 packer.exe: 2019/02/12 00:45:50 [DEBUG] starting remote command: esxcli --formatter csv network vm list
2019/02/12 00:45:51 packer.exe: 2019/02/12 00:45:51 [DEBUG] Error getting WinRM host: EOF
2019/02/12 00:45:56 packer.exe: 2019/02/12 00:45:56 [DEBUG] Opening new ssh session
2019/02/12 00:45:56 packer.exe: 2019/02/12 00:45:56 [DEBUG] starting remote command: esxcli --formatter csv network vm list
2019/02/12 00:45:56 packer.exe: 2019/02/12 00:45:56 [DEBUG] Error getting WinRM host: EOF
2019/02/12 00:46:01 packer.exe: 2019/02/12 00:46:01 [DEBUG] Opening new ssh session
2019/02/12 00:46:01 packer.exe: 2019/02/12 00:46:01 [DEBUG] starting remote command: esxcli --formatter csv network vm list
2019/02/12 00:46:02 packer.exe: 2019/02/12 00:46:02 [DEBUG] Error getting WinRM host: EOF
Full log file.
Update
This appears to be an issue with packer not being able to obtain the IP address from the ESXi host (Error getting WinRM host: EOF).

Related

Azure SQL Edge container failed to start on M1, when mapping volume to relative path

On an M1 Macbook, I followed online examples and successfully start Azure SQL Edge container with basic configuration.
Then I want to map a volume (mySpecialFolder) by "Path to the host, relative to the Compose file".
Here we want "./mySpecialFolder:/tmp", not "mySpecialFolder:/tmp".
services:
mssql:
container_name: mssql
image: "mcr.microsoft.com/azure-sql-edge:latest"
environment:
SA_PASSWORD: "something"
ACCEPT_EULA: "Y"
expose:
- 1433
ports:
- 1433:1433
networks:
- sql
volumes:
- ./mySpecialFolder:/tmp
- mssqlsystem:/var/opt/mssql
It failed to load and reports
Azure SQL Edge will run as non-root by default.
This container is running as user mssql.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2140520.
2022/07/29 11:00:39 [launchpadd] INFO: Extensibility Log Header: <timestamp> <process> <sandboxId> <sessionId> <message>
2022/07/29 11:00:39 [launchpadd] WARNING: Failed to load /var/opt/mssql/mssql.conf ini file with error open /var/opt/mssql/mssql.conf: no such file or directory
2022/07/29 11:00:39 [launchpadd] INFO: DataDirectories = /bin:/etc:/lib:/lib32:/lib64:/sbin:/usr/bin:/usr/include:/usr/lib:/usr/lib32:/usr/lib64:/usr/libexec/gcc:/usr/sbin:/usr/share:/var/lib:/opt/microsoft:/opt/mssql-extensibility:/opt/mssql/mlservices:/opt/mssql/lib/zulu-jre-11:/opt/mssql-tools
2022/07/29 11:00:39 Drop permitted effective capabilities.
2022/07/29 11:00:39 [launchpadd] INFO: Polybase remote hadoop bridge disabled
2022/07/29 11:00:39 [launchpadd] INFO: Launchpadd is connecting to mssql on localhost:1431
2022/07/29 11:00:39 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection.
This program has encountered a fatal error and cannot continue running at Fri Jul 29 11:00:40 2022
The following diagnostic information is available:
Reason: 0x00000007
Status: 0xc0000002
Message: Failed to load KM driver [Npfs]
Stack Trace:
file://package4/windows/system32/sqlpal.dll+0x000000000030E879
file://package4/windows/system32/sqlpal.dll+0x000000000030DB54
file://package4/windows/system32/sqlpal.dll+0x000000000030AB96
file://package4/windows/system32/sqlpal.dll+0x000000000030961D
file://package4/windows/system32/sqlpal.dll+0x000000000034EE01
Stack:
IP Function
---------------- --------------------------------------
0000aaaac9c2ba70 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()+0x25d0
0000aaaac9c2b618 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()+0x2178
0000aaaac9c39d74 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()+0x108d4
0000aaaac9c3a75c std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()+0x112bc
0000aaaac9ced6c4 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_
0000ffffb9e44df8 S_SbtUnimplementedInstruction+0x2542b4
0000ffffb9e4472c S_SbtUnimplementedInstruction+0x253be8
0000ffffb9e45238 S_SbtUnimplementedInstruction+0x2546f4
0000ffffb9e3ca90 S_SbtUnimplementedInstruction+0x24bf4c
0000ffffb9e395dc S_SbtUnimplementedInstruction+0x248a98
0000ffffb9ed8ddc S_SbtUnimplementedInstruction+0x2e8298
0000ffffb9e38e44 S_SbtUnimplementedInstruction+0x248300
0000ffffb9e38b98 S_SbtUnimplementedInstruction+0x248054
0000ffffb9e38604 S_SbtUnimplementedInstruction+0x247ac0
0000ffffb9e38ffc S_SbtUnimplementedInstruction+0x2484b8
0000ffffbdb248a4 CallGuestFunction+0x84
0000ffffbdb1f964 Sbt::Dispatcher::SimulateCpu(Sbt::GuestCtx*)+0x2c
0000ffffbdb20d9c Sbt::RuntimeImpl::SimulateCpu(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)+0x3c8
0000ffffbdb219e4 Sbt::SimulateCpu(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)+0x30
0000ffffbdb22c04 SbtRtSimulateCpu+0x84
0000aaaac9c42164 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()+0x18cc4
0000aaaac9c3fe34 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()+0x16994
Process: 24 - sqlservr
Thread: 28 (application thread 0x4)
Instance Id: 76bd6c34-28e2-4a7f-9e5a-f3ffa17d9c1a
Crash Id: a022551e-96fe-4a59-ada3-4da01d244653
Build stamp: 06cd67626d2ebedd8721dc1bd892cdda65157cdcd6ac004bb81acdd6498ec618
Distribution: Ubuntu 18.04.6 LTS aarch64
Processors: 5
Total Memory: 8232747008 bytes
Timestamp: Fri Jul 29 11:00:40 2022
Last errno: 2
Last errno text: No such file or directory

Unable to connect with AWS host url using Embedded C SDK

I am trying to run subscribe_publish_sample on device(ARM architecture). For this I have cross compiled the code and copied to device. Required certificates also copied to device. I am getting following error.
Please let me know for any mistake.
ERROR: iot_tls_connect L#164 failed
! mbedtls_net_connect returned -0x52
ERROR: main L#190 Error(-23) connecting to 215740087218.iot.ap-south-1.amazonaws.com:8883
Configurations :
#define AWS_IOT_MQTT_HOST "215740087218.iot.ap-south-1.amazonaws.com" ///< Customer specific MQTT HOST. The same will be used for Thing Shadow
#define AWS_IOT_MQTT_PORT 8883 ///< default port for MQTT/S
#define AWS_IOT_MQTT_CLIENT_ID "RaspberryPi" ///< MQTT client ID should be unique for every device
#define AWS_IOT_MY_THING_NAME "RaspberryPi" ///< Thing Name of the Shadow this device is associated with
#define AWS_IOT_ROOT_CA_FILENAME "rootCA.crt" ///< Root CA file name
#define AWS_IOT_CERTIFICATE_FILENAME "7256bcd191-certificate.pem.crt" ///< device signed certificate file name
#define AWS_IOT_PRIVATE_KEY_FILENAME "7256bcd191-private.pem.key" ///< Device private key filename
// =================================================
======================================================================================
Certificates copied to device :
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs# ls
7256bcd191-certificate.pem.crt 7256bcd191-private.pem.key 7256bcd191-public.pem.key README.txt rootCA.crt
ARN : arn:aws:iot:ap-south-1:215740087218:thing/RaspberryPi
Policy attached : arn:aws:iot:ap-south-1:215740087218:policy/RaspberrypiPolicy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iot:*",
"Resource": "*"
}
]
}
==============================================================================
Debug Logs for sample :
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/samples/linux/subscribe_publish_sample# ./subscribe_publish_sample
AWS IoT SDK Version 3.0.1-
DEBUG: main L#159 rootCA /home/root/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/samples/linux/subscribe_publish_sample/../../../certs/rootCA.crt
DEBUG: main L#160 clientCRT /home/root/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/samples/linux/subscribe_publish_sample/../../../certs/7256bcd191-certificate.pem.crt
DEBUG: main L#161 clientKey /home/root/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/samples/linux/subscribe_publish_sample/../../../certs/7256bcd191-private.pem.key
Connecting...
DEBUG: iot_tls_connect L#130
. Seeding the random number generator...
DEBUG: iot_tls_connect L#138 . Loading the CA root certificate ...
DEBUG: iot_tls_connect L#144 ok (0 skipped)
DEBUG: iot_tls_connect L#146 . Loading the client cert. and key...
DEBUG: iot_tls_connect L#159 ok
DEBUG: iot_tls_connect L#161 . Connecting to 215740087218.iot.ap-south-1.amazonaws.com/8883...
ERROR: iot_tls_connect L#164 failed
! mbedtls_net_connect returned -0x52
ERROR: main L#190 Error(-23) connecting to 215740087218.iot.ap-south-1.amazonaws.com:8883
telnet logs :
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs# telnet 215740087218.iot.ap-south-1.amazonaws.com 8883
telnet: bad address '215740087218.iot.ap-south-1.amazonaws.com'
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs#
ping response:
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs# ping 215740087218.iot.ap-south-1.amazonaws.com
ping: bad address '215740087218.iot.ap-south-1.amazonaws.com'
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs#
Mosquitto_sub response :
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs# mosquitto_sub --cafile rootCA.crt --cert 7256bcd191-certifi
cate.pem.crt --key 7256bcd191-private.pem.key -h 215740087218.iot.ap-south-1.amazonaws.com -p 8883 -q 0 -d -t sdkTest/sub -i Raspberr
yPi
Unable to connect (Lookup error.).
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs#
The host name you provided seems to be incorrect:
nslookup 215740087218.iot.ap-south-1.amazonaws.com
Server: 127.0.1.1
Address: 127.0.1.1#53
** server can't find 215740087218.iot.ap-south-1.amazonaws.com: NXDOMAIN
This is confirmed by the error as well (in net_socket.h from the SDK):
#define MBEDTLS_ERR_NET_UNKNOWN_HOST -0x0052 /**< Failed to get an IP address for the given hostname. */
Read AWS IoT Connecting Devices. You need to provide the endpoint specific to your account.

Running Zookeeper 3.4.12 and Solr 6.5.1 with Systemd - Solr immediately shuts down after starting

I'm fairly new systemd and zookeeper. Please be patient, thanks.
Any help is appreciated!
The Setup:
Suse 12 Enterprise
No init.d, only systemd
zookeeper 3.4.12 is running via systemd and listening on default port 2181
solr 6.5.1 must also run via systemd, but immediately after start solr decide to shutdown for unknown reason
solr.log shows establishing connecting to zookeeper and shortly after a warning and shutdown
zookeeper logfile don't has not a single line about solr dropping out
I'm confused and unable to determine if this issue with systemd unit files or zookeeper <-> solr issue.
Questions:
Is the unit file solr.service correct? (I'm not sure about that, examples on net are very scarse)
Is this systemd issue or zookeeper problem?
Which logs can I switch turn on to get more insight?
As #MatsLindh points out this is an sytemd issue. Solr log WARN was just a coincident.
journalctl -u solr
Sep 05 16:42:36 mucs75561 systemd[1]: Started Apache Solr Service.
Sep 05 16:42:40 mucs75561 solr[15732]: [98B blob data]
Sep 05 16:42:40 mucs75561 solr[15732]: Started Solr server on port 8983
(pid=15857). Happy searching!
Sep 05 16:42:40 mucs75561 solr[15942]: Sending stop command to Solr running on port 8983 ...
waiting up to 180 seconds to allow Jetty process 15857 to stop gracefully.
The solr.log tells a different story (tail -n 1000 -f /opt/xxx/solr-6.5.1/server/logs/solr.log)
cat /opt/xxx/solr-6.5.1/server/logs/solr.log
16:42:38.594 INFO (main) [ ] o.e.j.s.Server jetty-9.3.14.v20161028
16:42:38.992 INFO (main) [ ] o.a.s.s.SolrDispatchFilter ___ _ Welcome to Apache Solr™ version 6.5.1
16:42:38.996 INFO (main) [ ] o.a.s.s.SolrDispatchFilter / __| ___| |_ _ Starting in cloud mode on port 8983
16:42:38.996 INFO (main) [ ] o.a.s.s.SolrDispatchFilter \__ \/ _ \ | '_| Install dir: /opt/xxx/solr-6.5.1
16:42:39.016 INFO (main) [ ] o.a.s.s.SolrDispatchFilter |___/\___/_|_| Start time: 2018-09-05T16:42:38.998Z
16:42:39.017 INFO (main) [ ] o.a.s.s.StartupLoggingUtils Property solr.log.muteconsole given. Muting ConsoleAppender named CONSOLE
16:42:39.035 INFO (main) [ ] o.a.s.c.SolrResourceLoader Using system property solr.solr.home: /opt/xxx/solr-6.5.1/server/solr
16:42:39.099 INFO (main) [ ] o.a.s.s.SolrDispatchFilter Loading solr.xml from SolrHome (not found in ZooKeeper)
16:42:39.100 INFO (main) [ ] o.a.s.c.SolrXmlConfig Loading container configuration from /opt/xxx/solr-6.5.1/server/solr/solr.xml
16:42:39.413 INFO (main) [ ] o.a.s.u.UpdateShardHandler Creating UpdateShardHandler HTTP client with params: socketTimeout=600000&connTimeout=60000&retry=true
16:42:39.418 INFO (main) [ ] o.a.s.c.ZkContainer Zookeeper client=localhost:2181/solr
16:42:39.510 INFO (main) [ ] o.a.s.c.Overseer Overseer (id=null) closing
16:42:39.514 INFO (main) [ ] o.a.s.c.OverseerElectionContext I am going to be the leader 192.168.18.49:8983_solr
16:42:39.519 INFO (main) [ ] o.a.s.c.Overseer Overseer (id=72167078483197975-192.168.18.49:8983_solr-n_0000000009) starting
16:42:39.616 INFO (main) [ ] o.a.s.c.ZkController Register node as live in ZooKeeper:/live_nodes/192.168.18.49:8983_solr
16:42:39.622 INFO (OverseerStateUpdate-72167078483197975-192.168.18.49:8983_solr-n_0000000009) [ ] o.a.s.c.c.ZkStateReader Updated live nodes from ZooKeeper... (0) -> (1)
16:42:39.812 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Found 0 core definitions underneath /opt/xxx/solr-6.5.1/server/solr
16:42:39.898 INFO (main) [ ] o.e.j.s.Server Started #1864ms
16:42:40.549 INFO (ShutdownMonitor) [ ] o.a.s.c.CoreContainer Shutting down CoreContainer instance=966739377
16:42:40.557 INFO (ShutdownMonitor) [ ] o.a.s.c.Overseer Overseer (id=72167078483197975-192.168.18.49:8983_solr-n_0000000009) closing
16:42:40.558 INFO (OverseerStateUpdate-72167078483197975-192.168.18.49:8983_solr-n_0000000009) [ ] o.a.s.c.Overseer Overseer Loop exiting : 192.168.18.49:8983_solr
16:42:40.566 WARN (zkCallback-5-thread-1-processing-n:192.168.18.49:8983_solr) [ ] o.a.s.c.c.ZkStateReader ZooKeeper watch triggered, but Solr cannot talk to ZK: [KeeperErrorCode = Session expired for /live_nodes]
16:42:40.566 INFO (ShutdownMonitor) [ ] o.a.s.m.SolrMetricManager Closing metric reporters for: solr.node
My /etc/systemd/system/solr.service:
[Unit]
Description=Apache Solr Service
After=syslog.target network.target nss-lookup.target
Requires=zookeeper.service
[Service]
User=xxx
Group=tomcat
WorkingDirectory=/opt/xxx/solr-6.5.1/
Environment=SOLR_INCLUDE=/opt/xxx/solr-6.5.1/bin/solr.in.sh
ExecStart=/opt/xxx/solr-6.5.1/bin/solr start -m 4g -c -z localhost:2181/solr
ExecStop=/opt/xxx/solr-6.5.1/bin/solr stop -all
[Install]
WantedBy=default.target
Thanks, for reading!
systemd requires the service that it starts to remain running. Since the Solr startup scripts exits after starting Solr (i.e. it daemonizes the process and leaves it running in the background), systemd thinks it's dead and attempts to stop it.
You can start solr in the foreground with bin/solr start -f:
-f Start Solr in foreground; default starts Solr in the background
and sends stdout / stderr to solr-PORT-console.log

Ansible install RethinkDB on ubuntu 16

I am trying to use ansible package to install a specific version of RethinkDB on ubuntu 16.04.
I use :
- name: Ensure rethinkDB package repository is present
apt_repository: repo='deb http://download.rethinkdb.com/apt xenial main' state=present
tags:
- rethinkdb
- name: install RethinkDB
package: name=rethinkdb-2.3.2 state=latest
tags:
- rethinkdb
However I get the following error:
TASK [install RethinkDB]
******************************************************* task path: /Users/nha/.../playbook.yml:173 fatal:
[machine]: FAILED! => {"changed": false, "failed": true, "msg": "No
package matching 'rethinkdb-2.3.2' is available"} to retry, use:
--limit #ops/ansible/playbook.retry
Even leaving out the version, I get the error:
TASK [install RethinkDB]
******************************************************* task path: /Users/nha/.../playbook.yml:173 fatal:
[machine]: FAILED! => {"cache_update_time": 0, "cache_updated": false,
"changed": false, "failed": true, "msg": "'/usr/bin/apt-get -y -o
\"Dpkg::Options::=--force-confdef\" -o
\"Dpkg::Options::=--force-confold\" install 'rethinkdb'' failed:
E: There were unauthenticated packages and -y was used without
--allow-unauthenticated\n", "stderr": "E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "stdout":
"Reading package lists...\nBuilding dependency tree...\nReading state
information...\nThe following additional packages will be installed:\n
libcurl3\nThe following NEW packages will be installed:\n libcurl3
rethinkdb\n0 upgraded, 2 newly installed, 0 to remove and 0 not
upgraded.\nNeed to get 11.2 MB of archives.\nAfter this operation,
40.2 MB of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n rethinkdb\n", "stdout_lines":
["Reading package lists...", "Building dependency tree...", "Reading
state information...", "The following additional packages will be
installed:", " libcurl3", "The following NEW packages will be
installed:", " libcurl3 rethinkdb", "0 upgraded, 2 newly installed, 0
to remove and 0 not upgraded.", "Need to get 11.2 MB of archives.",
"After this operation, 40.2 MB of additional disk space will be
used.", "WARNING: The following packages cannot be authenticated!", "
rethinkdb"]} to retry, use: --limit #ops/ansible/playbook.retry
The first error message states that the RethinkDB apt repo doesn't contain a package for a 2.3.2 version.
The second error is because you haven't yet added the apt key to trust this repo. RethinkDB's Ubuntu installation instructions also mentions that you will need to add their apt key.
You can easily do this with the apt_key module:
- name: add rethinkdb apt key
apt_key: url=https://download.rethinkdb.com/apt/pubkey.gpg
As an aside, it doesn't really make much sense to specify a version and then also specify latest on the state.

Creating setup for SQL Server 2008 Express with WIX

The command below runs successfully on the command line but when I put it to Wix Bootstrapper project it gives me an error.
The code that I run on command line is
setup.exe /ACTION=INSTALL /Q /ISSVCPASSWORD="password6161*"
/RSSVCPASSWORD="password6161*" /SAPWD="password6161*"
/INSTANCENAME="aaa5554" /SECURITYMODE="SQL"
/ConfigurationFile=ConfigurationFile.INI
The code that I write into the Wix
<Chain DisableSystemRestore="yes">
<PackageGroupRef Id="SqlServerExpress"/>
</Chain>
<?define InstanceName = "HyperionSSSS321312" ?>
<PackageGroup Id="SqlServerExpress">
<ExePackage Id="Sql2008Express"
DisplayName="SQL Server 2008 Express"
Cache="no"
Compressed="no"
PerMachine="no"
Permanent="no"
Vital="yes"
Name="Package\SqlServer\setup.exe"
SourceFile="Package\SqlServer\setup.exe"
InstallCommand="/ACTION=INSTALL /Q /ISSVCPASSWORD=test* /RSSVCPASSWORD=test* /SAPWD=test* /INSTANCENAME=$(var.InstanceName) /INSTANCEID=$(var.InstanceName) /SECURITYMODE=SQL /ConfigurationFile=ConfigurationFile.INI"
UninstallCommand="/Action=Uninstall /INSTANCENAME=$(var.InstanceName) /FEATURES=SQL /Q /HIDECONSOLE">
<ExitCode Value ="3010" Behavior="forceReboot" />
</ExePackage>
</PackageGroup>
When I run the setup file that Wix produced for me it fails
The log is below
1AC:32FC][2014-05-23T17:48:29]w321: Skipping dependency registration on package with no dependency providers: Sql2008Express
[11AC:32FC][2014-05-23T17:48:29]i000: Setting string variable 'WixBundleLog_Sql2008Express' to value 'C:\Users\BARIS~1.VEL\AppData\Local\Temp\SetupBoot_20140523174827_0_Sql2008Express.log'
[11AC:32FC][2014-05-23T17:48:29]i000: Setting string variable 'WixBundleRollbackLog_Sql2008Express' to value 'C:\Users\BARIS~1.VEL\AppData\Local\Temp\SetupBoot_20140523174827_0_Sql2008Express_rollback.log'
[11AC:32FC][2014-05-23T17:48:29]i201: Planned package: Sql2008Express, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: Yes, dependency: None
[11AC:32FC][2014-05-23T17:48:29]i207: Planned related bundle: {c1dddf1e-71bd-4847-b7c6-161cb0096f1a}, type: Upgrade, default requested: None, ba requested: None, execute: None, rollback: None, dependency: None
[11AC:32FC][2014-05-23T17:48:29]i299: Plan complete, result: 0x0
[11AC:32FC][2014-05-23T17:48:29]i300: Apply begin
[11AC:32FC][2014-05-23T17:48:29]i000: Caching bundle from: 'C:\Users\BARIS~1.VEL\AppData\Local\Temp\{19453c37-f078-45d3-939a-92a23e74184d}\.be\SetupBoot.exe' to: 'C:\Users\baris.velioglu\AppData\Local\Package Cache\{19453c37-f078-45d3-939a-92a23e74184d}\SetupBoot.exe'
[11AC:32FC][2014-05-23T17:48:29]i320: Registering bundle dependency provider: {19453c37-f078-45d3-939a-92a23e74184d}, version: 1.0.0.0
[11AC:1390][2014-05-23T17:48:29]i338: Acquiring package: Sql2008Express, payload: Sql2008Express, copy from: D:\EAE_Automation\EAE_Automation\EAE_Automation\SetupBoot\bin\Debug\Package\SqlServer\setup.exe
[11AC:1390][2014-05-23T17:48:29]i000: Setting string variable 'WixBundleLastUsedSource' to value 'D:\EAE_Automation\EAE_Automation\EAE_Automation\SetupBoot\bin\Debug\'
[11AC:1390][2014-05-23T17:48:29]i305: Verified acquired payload: Sql2008Express at path: C:\Users\baris.velioglu\AppData\Local\Package Cache\.unverified\Sql2008Express, moving to: C:\Users\baris.velioglu\AppData\Local\Package Cache\7E1E6EE9199D5AFD8117B8385E59B8EAAE724D2C\Package\SqlServer\setup.exe.
[11AC:32FC][2014-05-23T17:48:29]i301: Applying execute package: Sql2008Express, action: Install, path: C:\Users\baris.velioglu\AppData\Local\Package Cache\7E1E6EE9199D5AFD8117B8385E59B8EAAE724D2C\Package\SqlServer\setup.exe, arguments: '"C:\Users\baris.velioglu\AppData\Local\Package Cache\7E1E6EE9199D5AFD8117B8385E59B8EAAE724D2C\Package\SqlServer\setup.exe" /ACTION=INSTALL /Q /ISSVCPASSWORD=enerji2014* /RSSVCPASSWORD=enerji2014* /SAPWD=enerji2014* /INSTANCENAME=HyperionSSSS321312 /INSTANCEID=HyperionSSSS321312 /SECURITYMODE=SQL /ConfigurationFile=ConfigurationFile.INI'
[11AC:32FC][2014-05-23T17:48:29]e000: Error 0x84c4000e: Process returned error: 0x84c4000e
[11AC:32FC][2014-05-23T17:48:29]e000: Error 0x84c4000e: Failed to configure per-user EXE package.
[11AC:32FC][2014-05-23T17:48:29]i319: Applied execute package: Sql2008Express, result: 0x84c4000e, restart: None
[11AC:32FC][2014-05-23T17:48:29]e000: Error 0x84c4000e: Failed to execute EXE package.
[11AC:32FC][2014-05-23T17:48:29]i351: Removing cached package: Sql2008Express, from path: C:\Users\baris.velioglu\AppData\Local\Package Cache\7E1E6EE9199D5AFD8117B8385E59B8EAAE724D2C\
[11AC:32FC][2014-05-23T17:48:29]i330: Removed bundle dependency provider: {19453c37-f078-45d3-939a-92a23e74184d}
[11AC:32FC][2014-05-23T17:48:29]i352: Removing cached bundle: {19453c37-f078-45d3-939a-92a23e74184d}, from path: C:\Users\baris.velioglu\AppData\Local\Package Cache\{19453c37-f078-45d3-939a-92a23e74184d}\
[11AC:32FC][2014-05-23T17:48:29]i399: Apply complete, result: 0x84c4000e, restart: None, ba requested restart: No

Resources